[gnumeric] Make introspection build with no libspreadsheet installed.



commit e6ff10d8b095d54cdc308092ac29156123118842
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Jul 22 21:50:16 2012 +0200

    Make introspection build with no libspreadsheet installed.

 ChangeLog       |    5 +++++
 configure.in    |    1 +
 src/Makefile.am |   46 ++++++++++++++++++----------------------------
 3 files changed, 24 insertions(+), 28 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 14fea6d..22705c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-22  Jean Brefort  <jean brefort normalesup org>
+
+	* configure.in: make introspection build with no libspreadsheet installed.
+	* src/Makefile.am: ditto.
+
 2012-07-21  Jean Brefort  <jean brefort normalesup org>
 
 	* component/gnumeric.c (go_gnm_component_set_data),
diff --git a/configure.in b/configure.in
index 0b87e1b..6a5c8c0 100644
--- a/configure.in
+++ b/configure.in
@@ -39,6 +39,7 @@ AC_SUBST([VERSION_IFACE], [version_iface])
 dnl Almost like epoch.major but development versions look forward to the next
 dnl stable release.
 AC_SUBST([GNUMERIC_API_VER], [1.12])
+AC_SUBST([GNUMERIC_API_VER_], [1_12])
 
 dnl This one is created by autoheader, ...
 AC_CONFIG_HEADERS(gnumeric-config.h)
diff --git a/src/Makefile.am b/src/Makefile.am
index a6657a2..2b2d710 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,13 @@
 #
 # Gnumeric's Makefile.am
 # Author: Miguel de Icaza (miguel kernel org)
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = \
+	-v --accept-unprefixed
+INTROSPECTION_COMPILER_ARGS = \
+	--includedir=$(srcdir) \
+    --includedir=.
 
 SUBDIRS = tools cut-n-paste-code
 
@@ -485,40 +492,23 @@ GNOME_Gnumeric-gtk.xml: GNOME_Gnumeric-gtk.xml.in
 	sed -e 's/ _name *=/ name=/' <$<  >$@
 DISTCLEANFILES = GNOME_Gnumeric-gtk.xml
 
-BUILT_GIRSOURCES = Gnm- GNUMERIC_API_VER@.gir
-
-Gnm- GNUMERIC_API_VER@.gir: $(libspreadsheet_include_HEADER)
-Gnm- GNUMERIC_API_VER@.gir: $(libspreadsheet_la_SOURCES)
-Gnm- GNUMERIC_API_VER@.gir: libspreadsheet.la
-Gnm- GNUMERIC_API_VER@.gir: $(INTROSPECTION_SCANNER) Makefile
-	$(AM_V_GEN) $(INTROSPECTION_SCANNER) -v --namespace Gnm \
-		--nsversion="@GNUMERIC_API_VER@" \
-	    --add-include-path=$(srcdir) --add-include-path=. \
-	    --include=GObject-2.0 \
-	    --include=Gio-2.0 \
-	    --include=libxml2-2.0 \
-	    --include=Gsf-1 \
-	    --include=GOffice-0.10 \
-	    --library=libspreadsheet.la \
-	    --libtool="$(LIBTOOL)" \
-	    --output $@ \
-	    --pkg libspreadsheet- GNUMERIC_API_VER@ \
-	    --accept-unprefixed \
-	    -I$(top_srcdir) \
-	    $(libspreadsheet_include_HEADERS) $(libspreadsheet_la_SOURCES)
-
 if HAVE_INTROSPECTION
 
+INTROSPECTION_GIRS += Gnm- GNUMERIC_API_VER@.gir
+
+Gnm- GNUMERIC_API_VER@.gir: $(INTROSPECTION_SCANNER) libspreadsheet.la Makefile
+Gnm_ GNUMERIC_API_VER_@_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0 GOffice- GOFFICE_API_VER@
+Gnm_ GNUMERIC_API_VER_@_gir_CFLAGS = $(AM_CPPFLAGS)
+Gnm_ GNUMERIC_API_VER_@_gir_LIBS = libspreadsheet.la
+Gnm_ GNUMERIC_API_VER_@_gir_FILES = $(libspreadsheet_la_SOURCES) $(libspreadsheet_include_HEADERS)
+
+
 girdir = $(GIRDIR)
-gir_DATA = $(BUILT_GIRSOURCES)
+gir_DATA = $(INTROSPECTION_GIRS)
 
 typelibsdir = $(TYPELIBDIR)
-typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
 
-%.typelib: %.gir $(INTROSPECTION_COMPILER)
-	$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(INTROSPECTION_COMPILER) --includedir=$(srcdir) --includedir=. $(G_IR_COMPILER_OPTS) $< -o $(builddir)/$(@F)
-
 endif # HAVE_INTROSPECTION
-



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