[gobject-introspection] Don't dist gir/cairo-1.0.gir, it's generated



commit 752a97f9609bfe15b522a30dc0ca6d2c5b5acfc8
Author: Colin Walters <walters verbum org>
Date:   Fri Mar 25 18:07:06 2011 -0400

    Don't dist gir/cairo-1.0.gir, it's generated
    
    We should not be disting it, because it contains values derived
    from configure.  Extract it out of STATIC_GIRSOURCES, and also
    move it to a Makefile rule rather than AC_SUBST as it should be
    so it gets cleaned properly.

 Makefile-gir.am      |   12 +++++++++++-
 configure.ac         |    1 -
 gir/cairo-1.0.gir.in |    4 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/Makefile-gir.am b/Makefile-gir.am
index 5751f80..02a4ea1 100644
--- a/Makefile-gir.am
+++ b/Makefile-gir.am
@@ -1,7 +1,6 @@
 BUILT_GIRSOURCES =
 
 STATIC_GIRSOURCES =               \
-        gir/cairo-1.0.gir           \
         gir/DBus-1.0.gir           \
         gir/DBusGLib-1.0.gir           \
         gir/fontconfig-2.0.gir      \
@@ -14,6 +13,17 @@ STATIC_GIRSOURCES =               \
         gir/xrandr-1.3.gir
 EXTRA_DIST += $(STATIC_GIRSOURCES)
 
+cairogirdir=$(GIR_DIR)
+cairogir_DATA = gir/cairo-1.0.gir
+gir/cairo-1.0.gir: gir/cairo-1.0.gir.in Makefile
+	sed \
+	-e s,%CAIRO_SHARED_LIBRARY%,$(CAIRO_SHARED_LIBRARY), \
+	-e s,%CAIRO_GIR_PACKAGE%,$(CAIRO_GIR_PACKAGE), \
+	< $< > $  tmp && mv $  tmp $@
+BUILT_SOURCES += gir/cairo-1.0.gir
+CLEANFILES += gir/cairo-1.0.gir
+EXTRA_DIST += cairo-1.0.gir.in
+
 # Doesn't seem to work to do gir/%.typelib =(
 gir/cairo-1.0.typelib: g-ir-compiler
 gir/DBus-1.0.typelib: g-ir-compiler
diff --git a/configure.ac b/configure.ac
index fdc5d2e..44a5b56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,7 +256,6 @@ AC_MSG_RESULT([$GLIBSRC])
 
 AC_CONFIG_FILES([
 Makefile
-gir/cairo-1.0.gir
 giscanner/config.py
 m4/Makefile
 tests/Makefile
diff --git a/gir/cairo-1.0.gir.in b/gir/cairo-1.0.gir.in
index 2c29406..15e4b12 100644
--- a/gir/cairo-1.0.gir.in
+++ b/gir/cairo-1.0.gir.in
@@ -3,9 +3,9 @@
             xmlns="http://www.gtk.org/introspection/core/1.0";
             xmlns:c="http://www.gtk.org/introspection/c/1.0";
             xmlns:glib="http://www.gtk.org/introspection/glib/1.0";>
-  <package name="@CAIRO_GIR_PACKAGE@"/>
+  <package name="%CAIRO_GIR_PACKAGE%"/>
   <namespace name="cairo" version="1.0"
-	     shared-library="@CAIRO_SHARED_LIBRARY@"
+	     shared-library="%CAIRO_SHARED_LIBRARY%"
 	     c:identifier-prefixes="cairo"
 	     c:symbol-prefixes="cairo">
     <record name="Context" c:type="cairo_t" foreign="1"



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