Don't dist gir/cairo-1.0.gir, it's generated
authorColin Walters <walters@verbum.org>
Fri, 25 Mar 2011 22:07:06 +0000 (18:07 -0400)
committerColin Walters <walters@verbum.org>
Fri, 25 Mar 2011 22:08:26 +0000 (18:08 -0400)
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
configure.ac
gir/cairo-1.0.gir.in

index 5751f80..02a4ea1 100644 (file)
@@ -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
index fdc5d2e..44a5b56 100644 (file)
@@ -256,7 +256,6 @@ AC_MSG_RESULT([$GLIBSRC])
 
 AC_CONFIG_FILES([
 Makefile
-gir/cairo-1.0.gir
 giscanner/config.py
 m4/Makefile
 tests/Makefile
index 2c29406..15e4b12 100644 (file)
@@ -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"