diff options
author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2011-12-01 11:16:38 +0100 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2011-12-05 16:05:06 -0200 |
commit | c8d8eed99341726d8789ddd866b594d4a4471414 (patch) | |
tree | fafd1c88ed937e8c1c8c3ffd48ba49d9296c21cf /Makefile.introspection | |
parent | 699803c532e72754440760fdeda054f86eea5638 (diff) | |
download | gobject-introspection-c8d8eed99341726d8789ddd866b594d4a4471414.tar.gz |
Makefile.introspection: allow buildir girs in subdirs
Formerly, trying to build gi/Foo-1.0.gir resulted in namespace being set to "gi/Foo"
Trying to build g-i/Foo-1.0.gir was even setting it to "g"
This fixes this behaviour by only considerating the filename without dirs.
Btw, ensure that the directory exists
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
https://bugzilla.gnome.org/show_bug.cgi?id=665276
Diffstat (limited to 'Makefile.introspection')
-rw-r--r-- | Makefile.introspection | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.introspection b/Makefile.introspection index 228cdde2..755dd15c 100644 --- a/Makefile.introspection +++ b/Makefile.introspection @@ -50,7 +50,7 @@ _gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1)))) # Namespace and Version is either fetched from the gir filename # or the _NAMESPACE/_VERSION variable combo -_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(1)))) +_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1))))) _gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=)))) # _PROGRAM is an optional variable which needs it's own --program argument @@ -129,6 +129,7 @@ $(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)), # sure these are built before running the scanner. Libraries and programs # 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) \ $(INTROSPECTION_SCANNER_ARGS) \ --namespace=$(_gir_namespace) \ |