[glib/wip/meson: 34/35] meson: Use glib-mkenums directly instead of via build_mkenum.py
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/meson: 34/35] meson: Use glib-mkenums directly instead of via build_mkenum.py
- Date: Mon, 8 May 2017 12:36:47 +0000 (UTC)
commit f374b3ffb9d5433ec1ce0552e700da7bfd6a596c
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Sat Mar 25 11:09:46 2017 +0530
meson: Use glib-mkenums directly instead of via build_mkenum.py
This is no longer needed because we use templates and custom targets
can capture output just fine on all platforms.
gio/build_mkenum.py | 25 -------------------------
gio/meson.build | 14 ++++++++------
2 files changed, 8 insertions(+), 31 deletions(-)
---
diff --git a/gio/meson.build b/gio/meson.build
index 524634e..80284e6 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -633,23 +633,25 @@ gio_headers += settings_headers
gio_headers += gdbus_headers
install_headers(gio_headers, subdir : 'glib-2.0/gio/')
-gio_build_mkenum = find_program('build_mkenum.py')
-
+# We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
+# in PATH, which means you can't bootstrap glib with its own glib-mkenums.
gioenumtypes_h = custom_target('gioenumtypes_h',
output : 'gioenumtypes.h',
+ capture : true,
input : gio_headers,
install : true,
install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
- command : [gio_build_mkenum, python, glib_mkenums,
- '@OUTPUT@', meson.current_source_dir(),
+ command : [python, glib_mkenums,
+ '--template', meson.current_source_dir() + '/gioenumtypes.h.template',
'@INPUT@', gnetworking_h])
gioenumtypes_c = custom_target('gioenumtypes_c',
output : 'gioenumtypes.c',
+ capture : true,
input : gio_headers,
depends : [gioenumtypes_h],
- command : [gio_build_mkenum, python, glib_mkenums,
- '@OUTPUT@', meson.current_source_dir(),
+ command : [python, glib_mkenums,
+ '--template', meson.current_source_dir() + '/gioenumtypes.c.template',
'@INPUT@', gnetworking_h])
gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]