[anjuta] build: Use the correct headers for the IAnjuta introspection module



commit 408cf6f841367745f71fd622f2d6382923ae9e27
Author: Johannes Schmid <jhs gnome org>
Date:   Fri Feb 18 15:42:19 2011 +0100

    build: Use the correct headers for the IAnjuta introspection module
    
    That should fix build issues that come up once in a while when an interface
    is removed.

 autogen.sh                                  |    2 +-
 configure.ac                                |    1 -
 libanjuta/Makefile.am                       |   48 ++++++-
 libanjuta/interfaces/Makefile.am.iface      |  185 +++++++++++++++++++--------
 libanjuta/interfaces/anjuta-idl-compiler.pl |   20 +--
 5 files changed, 180 insertions(+), 76 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 845d783..8332a71 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,7 +6,7 @@ test -z "$srcdir" && srcdir=.
 
 echo "Generating initial interface files"
 sh -c "cd $srcdir/libanjuta/interfaces && \
-perl anjuta-idl-compiler.pl libanjuta && \
+perl anjuta-idl-compiler.pl libanjuta $srcdir/libanjuta/interfaces/libanjuta.idl && \
 touch iface-built.stamp"
 
 test -n "$srcdir" || srcdir=`dirname "$0"`
diff --git a/configure.ac b/configure.ac
index 0a59d08..1c3a3d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -785,7 +785,6 @@ po/Makefile.in
 libanjuta/Makefile
 libanjuta/libanjuta-3.0.pc
 libanjuta/anjuta-version.h
-libanjuta/interfaces/Makefile
 src/Makefile
 pixmaps/Makefile
 pixmaps/16x16/Makefile
diff --git a/libanjuta/Makefile.am b/libanjuta/Makefile.am
index bdfee7e..9a40ece 100644
--- a/libanjuta/Makefile.am
+++ b/libanjuta/Makefile.am
@@ -1,5 +1,4 @@
-
-SUBDIRS = interfaces 
+include interfaces/Makefile.am.iface
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir) \
@@ -124,7 +123,44 @@ libanjuta_3_la_SOURCES= \
 	anjuta-entry.h \
 	anjuta-entry.c
 
+# interfaces
+noinst_LTLIBRARIES = libanjuta-interfaces.la
+libanjuta_interfaces_la_LIBADD = $(ANJUTA_LIBS) $(XML_LIBS)
+
+libanjuta_interfaces_includedir = $(includedir)/libanjuta-3.0/libanjuta/interfaces
+libanjuta_interfaces_include_HEADERS =  $(libanjuta_interfaces_include)
+
+BUILT_SOURCES = iface-built.stamp
+
+iface-built.stamp: interfaces/libanjuta.idl interfaces/anjuta-idl-compiler.pl
+	savedir=`pwd` && \
+	cd $(srcdir) && perl interfaces/anjuta-idl-compiler.pl libanjuta  interfaces/libanjuta.idl && \
+	echo 'GInterface' > hierarchy.txt && grep -e '^[[:space:]|\t]*interface' \
+	interfaces/libanjuta.idl  | sed -e 's/\binterface\b\s*/\t/' | sed -e 's/\t/    /g' \
+	>> hierarchy.txt && \
+	touch iface-built.stamp && \
+	echo "changing to $$savedir" && \
+	cd $$savedir && \
+	make
+
+files_idl = interfaces/libanjuta.idl
+idldir = $(libanjuta_interfaces_includedir)
+idl_HEADERS = $(files_idl)
+
+ianjuta-marshal.h: interfaces/ianjuta-marshal.list
+	$(AM_V_GEN)@GLIB_GENMARSHAL@ \
+	        --prefix=anjuta_cclosure_marshal $(srcdir)/interfaces/ianjuta-marshal.list --header > xgen-gmc \
+	&& cp xgen-gmc $(@F) \
+	&& rm -f xgen-gmc
+
+ianjuta-marshal.c: interfaces/ianjuta-marshal.h interfaces/ianjuta-marshal.list
+	$(AM_V_GEN)echo "#include \"ianjuta-marshal.h\"" > xgenc-gmc \
+	&& @GLIB_GENMARSHAL@ \
+	        --prefix=anjuta_cclosure_marshal $(srcdir)/interfaces/ianjuta-marshal.list --body >> xgenc-gmc \
+	&& cp xgenc-gmc $(@F) \
+	&& rm -f xgenc-gmc
 
+# Glade module
 if HAVE_PLUGIN_GLADE
 
 # For now install in our own prefix
@@ -147,6 +183,8 @@ catalog_DATA = anjuta-glade.xml
 
 endif
 
+# libanjuta
+
 libanjutaincludedir=$(includedir)/libanjuta-3.0/libanjuta
 
 libanjuta_include = \
@@ -199,7 +237,7 @@ libanjutainclude_HEADERS = \
 	anjuta-enum-types.h \
 	anjuta-marshal.h
 
-BUILT_SOURCES=anjuta-marshal.c anjuta-marshal.h  anjuta-enum-types.h anjuta-enum-types.c
+BUILT_SOURCES += anjuta-marshal.c anjuta-marshal.h  anjuta-enum-types.h anjuta-enum-types.c
 
 anjuta-marshal.h: anjuta-marshal.list
 	$(AM_V_GEN)@GLIB_GENMARSHAL@ \
@@ -261,7 +299,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
 if HAVE_INTROSPECTION
 anjuta_introspection_sources = $(libanjuta_3_la_SOURCES)
-ianjuta_introspection_sources = $(srcdir)/interfaces/ianjuta-*.c $(srcdir)/interfaces/ianjuta-*.h
+ianjuta_introspection_sources = $(libanjuta_interfaces_la_SOURCES) $(libanjuta_interfaces_include)
 
 Anjuta-3.0.gir: libanjuta-3.la
 Anjuta_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
@@ -285,7 +323,7 @@ gir_DATA = $(INTROSPECTION_GIRS)
 typelibdir = $(libdir)/girepository-1.0
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+CLEANFILES = $(dist_gir_DATA) $(typelib_DATA) interfaces/libanjuta-interfaces.h
 endif
 
 
diff --git a/libanjuta/interfaces/Makefile.am.iface b/libanjuta/interfaces/Makefile.am.iface
index 79e1f3d..01dcff9 100644
--- a/libanjuta/interfaces/Makefile.am.iface
+++ b/libanjuta/interfaces/Makefile.am.iface
@@ -1,57 +1,130 @@
-INCLUDES = \
-	$(WARN_CFLAGS) \
-	$(XML_CFLAGS) \
-	$(DEPRECATED_FLAGS) \
-	$(ANJUTA_CFLAGS) \
-	-I$(top_srcdir) \
-	-DG_LOG_DOMAIN=\"libanjuta-interfaces\" \
-	"-DG_LOG_FATAL_MASK=\"(G_LOG_FLAG_RECURSION|G_LOG_LEVEL_ERROR|G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING)\""
+libanjuta_interfaces_la_SOURCES = \
+	ianjuta-buildable.c\
+	ianjuta-builder.c\
+	ianjuta-debug-manager.c\
+	ianjuta-debugger.c\
+	ianjuta-debugger-breakpoint.c\
+	ianjuta-debugger-instruction.c\
+	ianjuta-debugger-memory.c\
+	ianjuta-debugger-register.c\
+	ianjuta-debugger-variable.c\
+	ianjuta-document.c\
+	ianjuta-document-manager.c\
+	ianjuta-editor.c\
+	ianjuta-editor-assist.c\
+	ianjuta-editor-cell.c\
+	ianjuta-editor-cell-style.c\
+	ianjuta-editor-comment.c\
+	ianjuta-editor-convert.c\
+	ianjuta-editor-factory.c\
+	ianjuta-editor-folds.c\
+	ianjuta-editor-glade-signal.c\
+	ianjuta-editor-goto.c\
+	ianjuta-editor-hover.c\
+	ianjuta-editor-language.c\
+	ianjuta-editor-line-mode.c\
+	ianjuta-editor-search.c\
+	ianjuta-editor-selection.c\
+	ianjuta-editor-tip.c\
+	ianjuta-editor-view.c\
+	ianjuta-editor-zoom.c\
+	ianjuta-environment.c\
+	ianjuta-file.c\
+	ianjuta-file-loader.c\
+	ianjuta-file-manager.c\
+	ianjuta-file-savable.c\
+	ianjuta-help.c\
+	ianjuta-indenter.c\
+	ianjuta-indicable.c\
+	ianjuta-iterable.c\
+	ianjuta-iterable-tree.c\
+	ianjuta-language.c\
+	ianjuta-loader.c\
+	ianjuta-markable.c\
+	ianjuta-message-manager.c\
+	ianjuta-message-view.c\
+	ianjuta-plugin-factory.c\
+	ianjuta-preferences.c\
+	ianjuta-print.c\
+	ianjuta-project.c\
+	ianjuta-project-backend.c\
+	ianjuta-project-manager.c\
+	ianjuta-provider.c\
+	ianjuta-snippets-manager.c\
+	ianjuta-stream.c\
+	ianjuta-stream-loader.c\
+	ianjuta-stream-savable.c\
+	ianjuta-symbol.c\
+	ianjuta-symbol-manager.c\
+	ianjuta-symbol-query.c\
+	ianjuta-terminal.c\
+	ianjuta-todo.c\
+	ianjuta-vcs.c\
+	ianjuta-wizard.c\
+	libanjuta-iface-marshallers.c
+libanjuta_interfaces_include = \
+	ianjuta-buildable.h\
+	ianjuta-builder.h\
+	ianjuta-debug-manager.h\
+	ianjuta-debugger.h\
+	ianjuta-debugger-breakpoint.h\
+	ianjuta-debugger-instruction.h\
+	ianjuta-debugger-memory.h\
+	ianjuta-debugger-register.h\
+	ianjuta-debugger-variable.h\
+	ianjuta-document.h\
+	ianjuta-document-manager.h\
+	ianjuta-editor.h\
+	ianjuta-editor-assist.h\
+	ianjuta-editor-cell.h\
+	ianjuta-editor-cell-style.h\
+	ianjuta-editor-comment.h\
+	ianjuta-editor-convert.h\
+	ianjuta-editor-factory.h\
+	ianjuta-editor-folds.h\
+	ianjuta-editor-glade-signal.h\
+	ianjuta-editor-goto.h\
+	ianjuta-editor-hover.h\
+	ianjuta-editor-language.h\
+	ianjuta-editor-line-mode.h\
+	ianjuta-editor-search.h\
+	ianjuta-editor-selection.h\
+	ianjuta-editor-tip.h\
+	ianjuta-editor-view.h\
+	ianjuta-editor-zoom.h\
+	ianjuta-environment.h\
+	ianjuta-file.h\
+	ianjuta-file-loader.h\
+	ianjuta-file-manager.h\
+	ianjuta-file-savable.h\
+	ianjuta-help.h\
+	ianjuta-indenter.h\
+	ianjuta-indicable.h\
+	ianjuta-iterable.h\
+	ianjuta-iterable-tree.h\
+	ianjuta-language.h\
+	ianjuta-loader.h\
+	ianjuta-markable.h\
+	ianjuta-message-manager.h\
+	ianjuta-message-view.h\
+	ianjuta-plugin-factory.h\
+	ianjuta-preferences.h\
+	ianjuta-print.h\
+	ianjuta-project.h\
+	ianjuta-project-backend.h\
+	ianjuta-project-manager.h\
+	ianjuta-provider.h\
+	ianjuta-snippets-manager.h\
+	ianjuta-stream.h\
+	ianjuta-stream-loader.h\
+	ianjuta-stream-savable.h\
+	ianjuta-symbol.h\
+	ianjuta-symbol-manager.h\
+	ianjuta-symbol-query.h\
+	ianjuta-terminal.h\
+	ianjuta-todo.h\
+	ianjuta-vcs.h\
+	ianjuta-wizard.h\
+	libanjuta-iface-marshallers.h\
+	libanjuta-interfaces.h
 
-MODULE_NAME = libanjuta-3
-MODULE_VERSION = 2.91
-MODULE_INCLUDEDIR = $(includedir)/libanjuta-3.0/libanjuta/interfaces
-MODULE_LIBS = 	$(ANJUTA_LIBS) \
-	$(XML_LIBS)
-
-@@IFACE_RULES@@
-
-BUILT_SOURCES = iface-built.stamp
-
-libanjuta_interfaces_include_HEADERS =  $(libanjuta_interfaces_include)
-
-iface-built.stamp: libanjuta.idl Makefile.am.iface anjuta-idl-compiler.pl
-	savedir=`pwd` && \
-	cd $(srcdir) && perl anjuta-idl-compiler.pl libanjuta && \
-	echo 'GInterface' > hierarchy.txt && grep -e '^[[:space:]|\t]*interface' \
-	libanjuta.idl  | sed -e 's/\binterface\b\s*/\t/' | sed -e 's/\t/    /g' \
-	>> hierarchy.txt && \
-	touch iface-built.stamp && \
-	echo "changing to $$savedir" && \
-	cd $$savedir && \
-	make
-
-files_idl = libanjuta.idl
-idldir = $(MODULE_INCLUDEDIR)
-idl_HEADERS = $(files_idl)
-
-anjuta-marshal.h: anjuta-marshal.list
-	$(AM_V_GEN)@GLIB_GENMARSHAL@ \
-	        --prefix=anjuta_cclosure_marshal $(srcdir)/anjuta-marshal.list --header > xgen-gmc \
-	&& cp xgen-gmc $(@F) \
-	&& rm -f xgen-gmc
-
-anjuta-marshal.c: anjuta-marshal.h anjuta-marshal.list
-	$(AM_V_GEN)echo "#include \"anjuta-marshal.h\"" > xgenc-gmc \
-	&& @GLIB_GENMARSHAL@ \
-	        --prefix=anjuta_cclosure_marshal $(srcdir)/anjuta-marshal.list --body >> xgenc-gmc \
-	&& cp xgenc-gmc $(@F) \
-	&& rm -f xgenc-gmc
-
-CLEANFILES = ianjuta*.[ch] libanjuta-interfaces.h
-
-EXTRA_DIST = \
-	iface-built.stamp \
-	$(libanjuta_interfaces_include) \
-	$(files_idl) \
-	Makefile.am.iface \
-	anjuta-idl-compiler.pl
diff --git a/libanjuta/interfaces/anjuta-idl-compiler.pl b/libanjuta/interfaces/anjuta-idl-compiler.pl
index 24cd3e3..12c2514 100755
--- a/libanjuta/interfaces/anjuta-idl-compiler.pl
+++ b/libanjuta/interfaces/anjuta-idl-compiler.pl
@@ -19,9 +19,9 @@
 use strict;
 use Data::Dumper;
 
-if (@ARGV != 1)
+if (@ARGV != 2)
 {
-	die "Usage: perl anjuta-idl-compiler.pl module_name";
+	die "Usage: perl anjuta-idl-compiler.pl module_name idl_file";
 }
 
 ## Types starting with prefix mentioned in
@@ -146,7 +146,7 @@ my $type_map = {
 };
 
 my $module_name = $ARGV[0];
-my $idl_file = "$module_name.idl";
+my $idl_file = $ARGV[1];
 open (INFILE, "<$idl_file")
 	or die "Can not open IDL file for reading";
 
@@ -1549,17 +1549,11 @@ sub write_makefile
 	$iface_sources .= "\\\n\t$s";
     }
     
-    my $iface_rules = "noinst_LTLIBRARIES = $module_name-interfaces.la\n";
-    $iface_rules .= "${module_name}_interfaces_la_LIBADD = \$(MODULE_LIBS)\n";
-##    $iface_rules .= "${module_name}_interfaces_la_LIBADD = \n";
-    $iface_rules .= "${module_name}_interfaces_la_SOURCES = $iface_sources\n";
-    $iface_rules .= "${module_name}_interfaces_includedir = \$(MODULE_INCLUDEDIR)\n";
-    $iface_rules .= "${module_name}_interfaces_include = $iface_headers\n";
+    my $iface_rules .= "${module_name}_interfaces_la_SOURCES = $iface_sources\n";
+    $iface_rules .= "${module_name}_interfaces_include = $iface_headers\n\n";
     
-    my $contents = `cat Makefile.am.iface`;
-    $contents =~ s/\ \@IFACE_RULES\ \@/$iface_rules/;
-    my $filename = "Makefile.am";
-	write_file ($filename, $contents);
+    my $filename = "Makefile.am.iface";
+	write_file ($filename, $iface_rules);
 }
 
 sub write_file



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