diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-01-23 23:33:11 -0500 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-03-30 23:12:21 +0200 |
commit | 92d9c387687cf71f7113df54f0297fb0633c9afc (patch) | |
tree | dda7067879923733b8d7d1acfa7cb84498893a4d /Makefile.introspection | |
parent | 2699b11503550bcfde7a31bf867e4cf780d3d5f9 (diff) | |
download | gobject-introspection-92d9c387687cf71f7113df54f0297fb0633c9afc.tar.gz |
Makefile.introspection: pass *FLAGS to scanner
automake provides a few mechanisms for setting the various user-defined
variables CFLAGS, CPPFLAGS, LDFLAGS that g-ir-scanner passes through to
the C compiler.
- can be set in the environment
- can be given as a commandline option to configure:
./configure LDFLAGS=-L/usr/local/lib
- can be given as a commandline option to make:
make LDFLAGS=-L/usr/local/lib
Currently, g-ir-scanner only checks for the variables in the
environment, whereas the correct value to use will always be the value
that is available from the Makefile, eg: $(LDFLAGS).
We could pass these variables as new arguments to the scanner, but the
easiest thing to do is promote them to the environment where the scanner
can see them.
https://bugzilla.gnome.org/show_bug.cgi?id=722887
Diffstat (limited to 'Makefile.introspection')
-rw-r--r-- | Makefile.introspection | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.introspection b/Makefile.introspection index b458166f..973d9d33 100644 --- a/Makefile.introspection +++ b/Makefile.introspection @@ -84,6 +84,8 @@ _gir_silent_compiler = $(_gir_silent_compiler_$(V)) _gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity)) _gir_silent_compiler_0 = @echo " GICOMP $(1)"; +_gir_default_scanner_env = CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + # # Creates a GIR by scanning C headers/sources # $(1) - Name of the gir file (output) @@ -131,7 +133,7 @@ $(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)), # needs to be added manually. $(1): $$($(_gir_name)_FILES) @ $(MKDIR_P) $(dir $(1)) - $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \ + $(_gir_silent_scanner_prefix) $(_gir_default_scanner_env) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \ $(INTROSPECTION_SCANNER_ARGS) \ --namespace=$(_gir_namespace) \ --nsversion=$(_gir_version) \ |