[gobject-introspection] Makefile.introspection: allow buildir girs in subdirs



commit c8d8eed99341726d8789ddd866b594d4a4471414
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date:   Thu Dec 1 11:16:38 2011 +0100

    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

 Makefile.introspection |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.introspection b/Makefile.introspection
index 228cdde..755dd15 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) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]