[cairo-commit] goocanvas/src .cvsignore, 1.2, 1.3 Makefile.am, 1.13, 1.14

Damon Chaplin commit at pdx.freedesktop.org
Mon Feb 19 03:16:21 PST 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv15728/src

Modified Files:
	.cvsignore Makefile.am 
Log Message:
2007-02-19  Damon Chaplin  <damon at gnome.org>

	* configure.in: 
	* src/Makefile.am: rewrote the stuff that handles the autogeneration
	of goocanvasmarshal.[hc] and goocanvasenumtypes.[hc], copying what
	GTK+ does. It now has a --disable-rebuilds option to disable the
	autogeneration and it doesn't try autogeneration if Perl isn't
	available.



Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/goocanvas/src/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- .cvsignore	12 Oct 2006 12:54:48 -0000	1.2
+++ .cvsignore	19 Feb 2007 11:16:14 -0000	1.3
@@ -9,4 +9,6 @@
 goocanvasmarshal.c
 goocanvasenumtypes.h
 goocanvasenumtypes.c
-demo
+stamp-goocanvasenumtypes.h
+stamp-goocanvasmarshal.h
+

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/goocanvas/src/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Makefile.am	9 Feb 2007 13:41:03 -0000	1.13
+++ Makefile.am	19 Feb 2007 11:16:15 -0000	1.14
@@ -13,7 +13,16 @@
 
 libgoocanvas_la_LIBADD = @PACKAGE_LIBS@ $(INTLLIBS)
 
-libgoocanvas_la_LDFLAGS = -version-info @VERSION_INFO@
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+endif
+
+libtool_opts =				\
+  -version-info $(LT_VERSION_INFO)	\
+  -export-dynamic $(no_undefined)	\
+  -rpath $(libdir)
+
+libgoocanvas_la_LDFLAGS = $(libtool_opts) 
 
 libgoocanvasincludedir = $(includedir)/goocanvas-1.0
 
@@ -35,7 +44,6 @@
 	goocanvas.h
 
 libgoocanvas_la_SOURCES =		\
-	goocanvasmarshal.list		\
 	goocanvasatk.h			\
 	goocanvasatk.c			\
 	goocanvasellipse.c		\
@@ -45,6 +53,7 @@
 	goocanvasitem.c			\
 	goocanvasitemmodel.c		\
 	goocanvasitemsimple.c		\
+	goocanvasmarshal.c		\
 	goocanvaspolyline.c		\
 	goocanvaspath.c			\
 	goocanvasprivate.h		\
@@ -56,27 +65,65 @@
 	goocanvaswidget.c		\
 	goocanvas.c 
 
+libgoocanvas_extra_sources =		\
+	goocanvasmarshal.list
+
 libgoocanvas_built_headers =		\
 	goocanvasenumtypes.h		\
 	goocanvasmarshal.h
 
 libgoocanvas_built_sources =		\
-	goocanvasenumtypes.c
+	goocanvasenumtypes.c		\
+	goocanvasmarshal.c
+
+stamp_files =				\
+	stamp-goocanvasmarshal.h	\
+	stamp-goocanvasenumtypes.h
+
 
 libgoocanvasinclude_HEADERS =		\
 	$(libgoocanvas_public_headers)	\
 	$(libgoocanvas_built_headers)
 
 
-goocanvasenumtypes.h: $(goo_canvas_public_headers) Makefile
+#
+# Most of the stuff below has been pinched from the GTK+ Makefile.am, as
+# it is tricky to get right and we know it works for GTK+.
+#
+
+# all autogenerated files need to be generated in the srcdir,
+# so old versions get remade and are not confused with newer
+# versions in the build dir. thus a development setup requires
+# srcdir to be writable, passing --disable-rebuilds to
+# ../configure will supress all autogeneration rules.
+goocanvasmarshal.h: stamp-goocanvasmarshal.h
+	@true
+stamp-goocanvasmarshal.h: @REBUILD@ goocanvasmarshal.list
+	$(GLIB_GENMARSHAL) --prefix=goo_canvas_marshal $(srcdir)/goocanvasmarshal.list --header >> xgen-gmlh \
+	&& (cmp -s xgen-gmlh goocanvasmarshal.h || cp xgen-gmlh goocanvasmarshal.h) \
+	&& rm -f xgen-gmlh \
+	&& echo timestamp > $(@F)	
+goocanvasmarshal.c: @REBUILD@ goocanvasmarshal.list
+	(echo "#include \"goocanvasmarshal.h\""; \
+	 $(GLIB_GENMARSHAL) --prefix=goo_canvas_marshal $(srcdir)/goocanvasmarshal.list --body) >> xgen-gmlc \
+	&& cp xgen-gmlc goocanvasmarshal.c \
+	&& rm -f xgen-gmlc
+
+
+goocanvasenumtypes.h: stamp-goocanvasenumtypes.h	
+	@true
+stamp-goocanvasenumtypes.h: @REBUILD@ $(goo_canvas_public_headers) Makefile
 	(cd $(srcdir) && $(GLIB_MKENUMS) \
 		--fhead "#ifndef __GOO_CANVAS_ENUM_TYPES_H__\n#define __GOO_CANVAS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
 		--fprod "/* Enumerations from \"@filename@\" */\n" \
 		--vhead "GType @enum_name at _get_type (void);\n#define GOO_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n\n\n" \
 		--ftail "G_END_DECLS\n\n#endif /* __GOO_CANVAS_ENUM_TYPES_H__ */" \
-		$(libgoocanvas_public_headers)) > $@
+		$(libgoocanvas_public_headers)) >> xgen-gtbh \
+	&& (cmp -s xgen-gtbh goocanvasenumtypes.h || cp xgen-gtbh goocanvasenumtypes.h ) \
+	&& rm -f xgen-gtbh \
+	&& echo timestamp > $(@F)
 
-goocanvasenumtypes.c: $(goo_canvas_public_headers) Makefile
+goocanvasenumtypes.c: @REBUILD@ $(goo_canvas_public_headers) Makefile
 	(cd $(srcdir) && $(GLIB_MKENUMS) \
 		--fhead "#include <goocanvas.h>\n" \
 		--fhead "#include <glib-object.h>\n" \
@@ -84,27 +131,14 @@
 		--vhead "GType\n at enum_name@_get_type (void)\n{\n  static GType etype = 0;\n if( etype == 0 ) \n  {\n    static const G at Type@Value values[] = {" \
 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
 		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_ at type@_register_static (\"@EnumName@\", values );\n  }\n  return etype;\n}\n" \
-		$(libgoocanvas_public_headers)) > $@
-
-
-GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=goo_canvas_marshal
-SUFFIXES = .list
+		$(libgoocanvas_public_headers)) > xgen-gtbc \
+	&& cp xgen-gtbc goocanvasenumtypes.c  \
+	&& rm -f xgen-gtbc
 
-.list.h:
-	$(GENMARSHAL_COMMAND) --header $< >$@
 
-.list.c:
-	(echo '/* This file has been automatically generated.  Do not edit. */' && \
-	echo '#include "$*.h"' && \
-	$(GENMARSHAL_COMMAND) --body $< ) >$@
 
-# A hint is needed to build the header first:
+gen_sources = xgen-gdef xgen-gtbh xgen-gtic xgen-gmh xgen-gmc xgen-gmlh xgen-gmlc
+CLEANFILES = $(gen_sources)
 BUILT_SOURCES = $(libgoocanvas_built_headers) $(libgoocanvas_built_sources)
-
-# Another hint, see bugs #172211 and #172212:
-non-intermediate: goocanvasmarshal.c
-
-CLEANFILES = $(libgoocanvas_built_headers) $(libgoocanvas_built_sources)
-
-# Add this to the dist for use on Windows where glib-genmarshal may not work.
-EXTRA_DIST = goocanvasmarshal.c
+MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
+EXTRA_DIST = $(BUILT_SOURCES) $(libgoocanvas_extra_sources)



More information about the cairo-commit mailing list