From e84c9e75efc9d82262a5ec6036cc737c6089ab30 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 24 Nov 2017 02:29:01 +0530 Subject: g-ir-scanner: Don't require SRCDIR and BUILDDIR env vars When building with Meson, we cannot set environment variables while running custom targets and our builddir layout is different from Autotools anyway. Now g-ir-scanner and friends can autodetect when they're being run uninstalled by Meson and will find _giscanner.so and the giscanner python files in the build directory. This is very similar to what gdbus-codegen uses in glib/gio. Same for girepository/gdump.c. --- gir/meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gir/meson.build') diff --git a/gir/meson.build b/gir/meson.build index 5ae0acd1..e471b269 100644 --- a/gir/meson.build +++ b/gir/meson.build @@ -38,9 +38,6 @@ girdir = join_paths(get_option('datadir'), 'gir-1.0') install_data(gir_files, install_dir: girdir) scanner_command = [ - find_program('env'), - 'UNINSTALLED_INTROSPECTION_SRCDIR=' + meson.source_root(), - 'UNINSTALLED_INTROSPECTION_BUILDDIR=' + meson.build_root(), girscanner, '--output=@OUTPUT@', '--no-libtool', @@ -136,6 +133,7 @@ glib_gir = custom_target('gir-glib', input: glib_files, output: 'GLib-2.0.gir', depends: giscanner_pymod, + depend_files: giscanner_built_files, install: true, install_dir: girdir, command: glib_command + [ @@ -193,6 +191,7 @@ gobject_gir = custom_target('gir-gobject', input: gobject_files, output: 'GObject-2.0.gir', depends: [glib_gir, giscanner_pymod], + depend_files: giscanner_built_files, install: true, install_dir: girdir, command: gobject_command + [ @@ -234,6 +233,7 @@ gir_files += custom_target('gir-gmodule', input: gmodule_files, output: 'GModule-2.0.gir', depends: [glib_gir, giscanner_pymod], + depend_files: giscanner_built_files, install: true, install_dir: girdir, command: gmodule_command + [ @@ -316,6 +316,7 @@ gir_files += custom_target('gir-gio', input: gio_files, output: 'Gio-2.0.gir', depends: [gobject_gir, giscanner_pymod], + depend_files: giscanner_built_files, install: true, install_dir: girdir, command: gio_command + [ @@ -333,6 +334,7 @@ gir_files += custom_target('gir-girepository', input: girepo_gir_sources, output: 'GIRepository-2.0.gir', depends: [gobject_gir, giscanner_pymod], + depend_files: giscanner_built_files, install: true, install_dir: girdir, command: scanner_command + [ -- cgit v1.2.1