From c8d8eed99341726d8789ddd866b594d4a4471414 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Thu, 1 Dec 2011 11:16:38 +0100 Subject: 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 https://bugzilla.gnome.org/show_bug.cgi?id=665276 --- Makefile.introspection | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile.introspection') 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) \ -- cgit v1.2.1