[libchamplain] Cleanup Makefile.am files
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Cleanup Makefile.am files
- Date: Sun, 5 Sep 2010 23:36:16 +0000 (UTC)
commit c19c0a7fb77557988f3ff6f292a477bafe767ed9
Author: JiÅ?Ã Techet <techet gmail com>
Date: Fri Sep 3 09:25:10 2010 +0200
Cleanup Makefile.am files
Heavily inspired by (copied from) clutter, this patch should also fix #628096.
Makefile.am | 2 +-
build/Makefile.am | 4 +
build/Makefile.am.enums | 43 +++++
build/Makefile.am.marshal | 45 +++++
champlain-gtk/Makefile.am | 82 ++++++---
champlain-gtk/champlain-gtk-enum-types.c.in | 33 ++++
champlain-gtk/champlain-gtk-enum-types.h.in | 24 +++
champlain/Makefile.am | 259 ++++++++++++---------------
configure.ac | 1 +
docs/reference/Makefile.am | 2 +-
tidy/Makefile.am | 148 ++++++----------
11 files changed, 372 insertions(+), 271 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 26a5676..073d64e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = tidy champlain
+SUBDIRS = build tidy champlain
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..8a230d9
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1,4 @@
+
+EXTRA_DIST = \
+ Makefile.am.marshal \
+ Makefile.am.enums
diff --git a/build/Makefile.am.enums b/build/Makefile.am.enums
new file mode 100644
index 0000000..6948509
--- /dev/null
+++ b/build/Makefile.am.enums
@@ -0,0 +1,43 @@
+# Rules for generating enumeration types using glib-mkenums
+#
+# Define:
+# glib_enum_h = header template file
+# glib_enum_c = source template file
+# glib_enum_headers = list of headers to parse
+#
+# before including Makefile.am.enums. You will also need to have
+# the following targets already defined:
+#
+# CLEANFILES
+# DISTCLEANFILES
+# BUILT_SOURCES
+# EXTRA_DIST
+#
+# Author: Emmanuele Bassi <ebassi linux intel com>
+
+enum_tmpl_h=$(glib_enum_h:.h=.h.in)
+enum_tmpl_c=$(glib_enum_c:.c=.c.in)
+
+CLEANFILES += stamp-enum-types
+DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
+BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
+EXTRA_DIST += $(srcdir)/$(enum_tmpl_h) $(srcdir)/$(enum_tmpl_c)
+
+stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h)
+ $(AM_V_GEN) $(GLIB_MKENUMS) \
+ --template $(srcdir)/$(enum_tmpl_h) \
+ $(glib_enum_headers) > xgen-eh \
+ && (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
+ && rm -f xgen-eh \
+ && echo timestamp > $(@F)
+
+$(glib_enum_h): stamp-enum-types
+ @true
+
+$(glib_enum_c): $(glib_enum_h) $(srcdir)/$(enum_tmpl_c)
+ $(AM_V_GEN) $(GLIB_MKENUMS) \
+ --template $(srcdir)/$(enum_tmpl_c) \
+ $(glib_enum_headers) > xgen-ec \
+ && cp -f xgen-ec $(glib_enum_c) \
+ && rm -f xgen-ec
+
diff --git a/build/Makefile.am.marshal b/build/Makefile.am.marshal
new file mode 100644
index 0000000..f2b4996
--- /dev/null
+++ b/build/Makefile.am.marshal
@@ -0,0 +1,45 @@
+# Rules for generating marshal files using glib-genmarshal
+#
+# Define:
+# glib_marshal_list = marshal list file
+# glib_marshal_prefix = prefix for marshal functions
+#
+# before including Makefile.am.marshal. You will also need to have
+# the following targets already defined:
+#
+# CLEANFILES
+# DISTCLEANFILES
+# BUILT_SOURCES
+# EXTRA_DIST
+#
+# Author: Emmanuele Bassi <ebassi linux intel com>
+
+marshal_h = $(glib_marshal_list:.list=.h)
+marshal_c = $(glib_marshal_list:.list=.c)
+
+CLEANFILES += stamp-marshal
+DISTCLEANFILES += $(marshal_h) $(marshal_c)
+BUILT_SOURCES += $(marshal_h) $(marshal_c)
+EXTRA_DIST += $(srcdir)/$(glib_marshal_list)
+
+stamp-marshal: $(glib_marshal_list)
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) \
+ --prefix=$(glib_marshal_prefix) \
+ --header \
+ $(srcdir)/$(glib_marshal_list) > xgen-mh \
+ && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
+ && rm -f xgen-mh \
+ && echo timestamp > $(@F)
+
+$(marshal_h): stamp-marshal
+ @true
+
+$(marshal_c): $(marshal_h)
+ $(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \
+ $(GLIB_GENMARSHAL) \
+ --prefix=$(glib_marshal_prefix) \
+ --body \
+ $(srcdir)/$(glib_marshal_list)) > xgen-mc \
+ && cp xgen-mc $(marshal_c) \
+ && rm -f xgen-mc
+
diff --git a/champlain-gtk/Makefile.am b/champlain-gtk/Makefile.am
index 42e221c..a3e4c56 100644
--- a/champlain-gtk/Makefile.am
+++ b/champlain-gtk/Makefile.am
@@ -1,64 +1,86 @@
+BUILT_SOURCES =
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
-BUILT_SOURCES = \
- champlain-gtk-marshal.h \
- champlain-gtk-marshal.c
-CLEANFILES = $(BUILT_SOURCES)
+libchamplain_gtk_headers_public = \
+ $(srcdir)/gtk-champlain-embed.h \
+ $(srcdir)/champlain-gtk.h
+
+libchamplain_gtk_sources = \
+ $(srcdir)/gtk-champlain-embed.c
+
+
+# glib-genmarshal rules
+glib_marshal_list = champlain-gtk-marshal.list
+glib_marshal_prefix = _champlain_gtk_marshal
+include $(top_srcdir)/build/Makefile.am.marshal
+
+# glib-mkenums rules
+glib_enum_h = champlain-gtk-enum-types.h
+glib_enum_c = champlain-gtk-enum-types.c
+glib_enum_headers = $(libchamplain_gtk_headers_public)
+include $(top_srcdir)/build/Makefile.am.enums
+
+libchamplain_gtk_headers_built = \
+ champlain-gtk-enum-types.h \
+ champlain-gtk-marshal.h
+
+libchamplain_gtk_sources_built = \
+ champlain-gtk-enum-types.c \
+ champlain-gtk-marshal.c
-lib_LTLIBRARIES = libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
- champlain-gtk-marshal.list \
- $(BUILT_SOURCES) \
- gtk-champlain-embed.c
+ $(libchamplain_gtk_headers_public) \
+ $(libchamplain_gtk_sources)
-noinst_HEADERS = gtk-champlain-embed.h
+nodist_libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
+ $(libchamplain_gtk_headers_built) \
+ $(libchamplain_gtk_sources_built)
-libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LIBADD = $(GTK_LIBS) \
+libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LIBADD = \
+ $(GTK_LIBS) \
$(top_builddir)/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
-champlain-gtk-marshal.h: champlain-gtk-marshal.list
- $(AM_V_GEN) ( $(GLIB_GENMARSHAL) --header --prefix=champlain_gtk_marshal champlain-gtk-marshal.list > champlain-gtk-marshal.tmp \
- && mv champlain-gtk-marshal.tmp champlain-gtk-marshal.h ) \
- || ( rm -f champlain-gtk-marshal.tmp && exit 1 )
+libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LDFLAGS= \
+ -version-info $(LIBRARY_VERSION) \
+ -no-undefined \
+ -export-symbols-regex ^gtk_champlain_.*
-champlain-gtk-marshal.c: champlain-gtk-marshal.h
- $(AM_V_GEN) ( (echo '#include "champlain-gtk-marshal.h"'; $(GLIB_GENMARSHAL) --prefix=champlain_gtk_marshal $(srcdir)/champlain-gtk-marshal.list --body) > champlain-gtk-marshal.tmp \
- && mv champlain-gtk-marshal.tmp champlain-gtk-marshal.c ) \
- || ( rm -f champlain-gtk-marshal.tmp && exit 1 )
+AM_CPPFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
-libchamplain_includedir=$(includedir)/libchamplain-gtk- CHAMPLAIN_API_VERSION@/champlain-gtk
-libchamplain_include_HEADERS = champlain-gtk.h gtk-champlain-embed.h
-libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_LDFLAGS= -version-info $(LIBRARY_VERSION)
+lib_LTLIBRARIES = libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
-AM_CPPFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) -DCHAMPLAIN_GTK_COMPILATION
-AM_LDFLAGS = $(GTK_LIBS) -export-symbols-regex ^gtk_champlain_.*
+libchamplain_gtkdir=$(includedir)/libchamplain-gtk- CHAMPLAIN_API_VERSION@/champlain-gtk
+
+libchamplain_gtk_HEADERS = $(libchamplain_gtk_headers_public)
+
+nodist_libchamplain_gtk_HEADERS = $(libchamplain_gtk_headers_built)
-EXTRA_DIST = champlain-gtk-marshal.list
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/champlain
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=$(top_builddir)/champlain
+INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/champlain
-introspection_sources = \
- $(libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES) \
- $(libchamplain_include_HEADERS)
+introspection_sources = $(libchamplain_gtk_ CHAMPLAIN_API_VERSION@_la_SOURCES)
GtkChamplain- CHAMPLAIN_API_VERSION@.gir: libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_NAMESPACE = GtkChamplain
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_VERSION = @CHAMPLAIN_API_VERSION@
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_LIBS = libchamplain-gtk- CHAMPLAIN_API_VERSION@.la
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_PACKAGES = gobject-2.0 gtk+-2.0
-GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_FILES = $(introspection_sources)
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_SCANNERFLAGS = --strip-prefix=GtkChamplain
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_INCLUDES = Clutter-1.0 Gtk-2.0 Champlain- CHAMPLAIN_API_VERSION@
GtkChamplain_ CHAMPLAIN_API_VERSION_NORM@_gir_CFLAGS = \
$(DEPS_CFLAGS) $(SOUP_CFLAGS) $(GTK_CFLAGS) \
- -I$(top_srcdir) \
+ -I$(top_srcdir) -I$(top_builddir)\
-DCHAMPLAIN_COMPILATION -DCHAMPLAIN_GTK_COMPILATION
INTROSPECTION_GIRS += GtkChamplain- CHAMPLAIN_API_VERSION@.gir
diff --git a/champlain-gtk/champlain-gtk-enum-types.c.in b/champlain-gtk/champlain-gtk-enum-types.c.in
new file mode 100644
index 0000000..8e4989a
--- /dev/null
+++ b/champlain-gtk/champlain-gtk-enum-types.c.in
@@ -0,0 +1,33 @@
+/*** BEGIN file-header ***/
+#include "champlain-gtk.h"
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+ enum_name@_get_type (void)
+{
+ static GType etype = 0;
+ if (G_UNLIKELY (etype == 0)) {
+ static const G Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ etype = g_ type@_register_static (g_intern_static_string ("@EnumName@"), values);
+ }
+ return etype;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+/*** END file-tail ***/
diff --git a/champlain-gtk/champlain-gtk-enum-types.h.in b/champlain-gtk/champlain-gtk-enum-types.h.in
new file mode 100644
index 0000000..3c3561a
--- /dev/null
+++ b/champlain-gtk/champlain-gtk-enum-types.h.in
@@ -0,0 +1,24 @@
+/*** BEGIN file-header ***/
+#ifndef __CHAMPLAIN_GTK_ENUM_TYPES_H__
+#define __CHAMPLAIN_GTK_ENUM_TYPES_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name _get_type (void) G_GNUC_CONST;
+#define CHAMPLAIN_GTK_TYPE_ ENUMSHORT@ @enum_name _get_type()
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* __CHAMPLAIN_GTK_ENUM_TYPES_H__ */
+/*** END file-tail ***/
diff --git a/champlain/Makefile.am b/champlain/Makefile.am
index 9665126..3eeb0e9 100644
--- a/champlain/Makefile.am
+++ b/champlain/Makefile.am
@@ -1,135 +1,124 @@
-
-BUILT_SOURCES = \
- champlain-marshal.h \
- champlain-marshal.c \
- champlain-enum-types.h \
- champlain-enum-types.c \
- champlain-version.h \
- champlain-features.h
-
-champlain-features.h: $(top_builddir)/config.status
- $(AM_V_GEN) ( cd $(top_builddir) && ./config.status champlain/$@ )
-
+BUILT_SOURCES = champlain-version.h
CLEANFILES = $(BUILT_SOURCES)
+DISTCLEANFILES =
+EXTRA_DIST = champlain-version.h.in
-lib_LTLIBRARIES = libchamplain- CHAMPLAIN_API_VERSION@.la
if ENABLE_MEMPHIS
memphis_headers = \
- champlain-memphis-renderer.h
+ $(srcdir)/champlain-memphis-renderer.h
endif
-libchamplain_headers = \
- $(memphis_headers) \
- champlain.h \
- champlain-defines.h \
- champlain-point.h \
- champlain-view.h \
- champlain-layer.h \
- champlain-selection-layer.h \
- champlain-base-marker.h \
- champlain-marker.h \
- champlain-tile.h \
- champlain-map-source.h \
- champlain-map-source-chain.h \
- champlain-tile-source.h \
- champlain-tile-cache.h \
- champlain-memory-cache.h \
- champlain-network-tile-source.h \
- champlain-file-cache.h \
- champlain-map-source-factory.h \
- champlain-map-source-desc.h \
- champlain-polygon.h \
- champlain-version.h \
- champlain-features.h \
- champlain-renderer.h \
- champlain-image-renderer.h \
- champlain-error-tile-renderer.h \
- champlain-file-tile-source.h \
- champlain-null-tile-source.h \
- champlain-network-bbox-tile-source.h \
- champlain-bounding-box.h
+libchamplain_headers_public = \
+ $(memphis_headers) \
+ $(srcdir)/champlain-version.h \
+ $(srcdir)/champlain.h \
+ $(srcdir)/champlain-defines.h \
+ $(srcdir)/champlain-point.h \
+ $(srcdir)/champlain-view.h \
+ $(srcdir)/champlain-layer.h \
+ $(srcdir)/champlain-selection-layer.h \
+ $(srcdir)/champlain-base-marker.h \
+ $(srcdir)/champlain-marker.h \
+ $(srcdir)/champlain-tile.h \
+ $(srcdir)/champlain-map-source.h \
+ $(srcdir)/champlain-map-source-chain.h \
+ $(srcdir)/champlain-tile-source.h \
+ $(srcdir)/champlain-tile-cache.h \
+ $(srcdir)/champlain-memory-cache.h \
+ $(srcdir)/champlain-network-tile-source.h \
+ $(srcdir)/champlain-file-cache.h \
+ $(srcdir)/champlain-map-source-factory.h \
+ $(srcdir)/champlain-map-source-desc.h \
+ $(srcdir)/champlain-polygon.h \
+ $(srcdir)/champlain-renderer.h \
+ $(srcdir)/champlain-image-renderer.h \
+ $(srcdir)/champlain-error-tile-renderer.h \
+ $(srcdir)/champlain-file-tile-source.h \
+ $(srcdir)/champlain-null-tile-source.h \
+ $(srcdir)/champlain-network-bbox-tile-source.h \
+ $(srcdir)/champlain-bounding-box.h
+
+libchamplain_headers_private = \
+ $(srcdir)/champlain-debug.h \
+ $(srcdir)/champlain-private.h
+
if ENABLE_MEMPHIS
-memphis_sources = \
- champlain-memphis-renderer.c
+memphis_sources = \
+ $(srcdir)/champlain-memphis-renderer.c
endif
-libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
- champlain-marshal.list \
- $(BUILT_SOURCES) \
- $(libchamplain_headers) \
- $(memphis_sources) \
- champlain-debug.c \
- champlain-view.c \
- champlain-layer.c \
- champlain-selection-layer.c \
- champlain-base-marker.c \
- champlain-marker.c \
- champlain-tile.c \
- champlain-map-source.c \
- champlain-map-source-chain.c \
- champlain-tile-source.c \
- champlain-tile-cache.c \
- champlain-memory-cache.c \
- champlain-network-tile-source.c \
- champlain-file-cache.c \
- champlain-map-source-factory.c \
- champlain-map-source-desc.c \
- champlain-point.c \
- champlain-polygon.c \
- champlain-renderer.c \
- champlain-image-renderer.c \
- champlain-error-tile-renderer.c \
- champlain-file-tile-source.c \
- champlain-null-tile-source.c \
- champlain-network-bbox-tile-source.c \
- champlain-bounding-box.c
-
-noinst_HEADERS = \
- champlain-debug.h \
- champlain-private.h
-
-libchamplain_include_HEADERS = \
- $(memphis_headers) \
- champlain.h \
- champlain-view.h \
- champlain-defines.h \
- champlain-point.h \
- champlain-enum-types.h \
- champlain-layer.h \
- champlain-selection-layer.h \
- champlain-map-source.h \
- champlain-map-source-chain.h \
- champlain-tile-source.h \
- champlain-tile-cache.h \
- champlain-memory-cache.h \
- champlain-network-tile-source.h \
- champlain-file-cache.h \
- champlain-map-source-factory.h \
- champlain-map-source-desc.h \
- champlain-tile.h \
- champlain-base-marker.h \
- champlain-marker.h \
- champlain-polygon.h \
- champlain-version.h \
+libchamplain_sources = \
+ $(memphis_sources) \
+ $(srcdir)/champlain-debug.c \
+ $(srcdir)/champlain-view.c \
+ $(srcdir)/champlain-layer.c \
+ $(srcdir)/champlain-selection-layer.c \
+ $(srcdir)/champlain-base-marker.c \
+ $(srcdir)/champlain-marker.c \
+ $(srcdir)/champlain-tile.c \
+ $(srcdir)/champlain-map-source.c \
+ $(srcdir)/champlain-map-source-chain.c \
+ $(srcdir)/champlain-tile-source.c \
+ $(srcdir)/champlain-tile-cache.c \
+ $(srcdir)/champlain-memory-cache.c \
+ $(srcdir)/champlain-network-tile-source.c \
+ $(srcdir)/champlain-file-cache.c \
+ $(srcdir)/champlain-map-source-factory.c \
+ $(srcdir)/champlain-map-source-desc.c \
+ $(srcdir)/champlain-point.c \
+ $(srcdir)/champlain-polygon.c \
+ $(srcdir)/champlain-renderer.c \
+ $(srcdir)/champlain-image-renderer.c \
+ $(srcdir)/champlain-error-tile-renderer.c \
+ $(srcdir)/champlain-file-tile-source.c \
+ $(srcdir)/champlain-null-tile-source.c \
+ $(srcdir)/champlain-network-bbox-tile-source.c \
+ $(srcdir)/champlain-bounding-box.c
+
+champlain-features.h: $(top_builddir)/config.status
+ $(AM_V_GEN) ( cd $(top_builddir) && ./config.status champlain/$@ )
+
+BUILT_SOURCES += champlain-features.h
+CLEANFILES += champlain-features.h
+
+# glib-genmarshal rules
+glib_marshal_list = champlain-marshal.list
+glib_marshal_prefix = _champlain_marshal
+include $(top_srcdir)/build/Makefile.am.marshal
+
+# glib-mkenums rules
+glib_enum_h = champlain-enum-types.h
+glib_enum_c = champlain-enum-types.c
+glib_enum_headers = $(libchamplain_headers_public)
+include $(top_srcdir)/build/Makefile.am.enums
+
+libchamplain_headers_built = \
champlain-features.h \
- champlain-renderer.h \
- champlain-image-renderer.h \
- champlain-error-tile-renderer.h \
- champlain-file-tile-source.h \
- champlain-null-tile-source.h \
- champlain-network-bbox-tile-source.h \
- champlain-bounding-box.h
+ champlain-enum-types.h \
+ champlain-marshal.h
+
+libchamplain_sources_built = \
+ champlain-enum-types.c \
+ champlain-marshal.c
+
-libchamplain_ CHAMPLAIN_API_VERSION@_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) $(MEMPHIS_LIBS) ../tidy/libtidy-1.0.la
+libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
+ $(libchamplain_headers_public) \
+ $(libchamplain_headers_private) \
+ $(libchamplain_sources)
+
+nodist_libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES = \
+ $(libchamplain_headers_built) \
+ $(libchamplain_sources_built)
-libchamplain_includedir = $(includedir)/libchamplain- CHAMPLAIN_API_VERSION@/champlain
+libchamplain_ CHAMPLAIN_API_VERSION@_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) $(MEMPHIS_LIBS) $(top_builddir)/tidy/libtidy-1.0.la
-libchamplain_ CHAMPLAIN_API_VERSION@_la_LDFLAGS = -version-info $(LIBRARY_VERSION) \
+libchamplain_ CHAMPLAIN_API_VERSION@_la_LDFLAGS = \
+ -version-info $(LIBRARY_VERSION)\
-no-undefined \
- -export-symbols-regex \
- ^champlain_.*
+ -export-symbols-regex ^champlain_.*
AM_CPPFLAGS = \
$(DEPS_CFLAGS) \
@@ -141,32 +130,14 @@ AM_CPPFLAGS = \
-DCHAMPLAIN_COMPILATION \
$(WARN_CFLAGS)
-EXTRA_DIST = champlain-marshal.list \
- champlain-enum-types.h.in \
- champlain-enum-types.c.in
-
-champlain-marshal.h: champlain-marshal.list
- $(AM_V_GEN) ( $(GLIB_GENMARSHAL) --header --prefix=cpl_marshal champlain-marshal.list > champlain-marshal.tmp \
- && mv champlain-marshal.tmp champlain-marshal.h ) \
- || ( rm -f champlain-marshal.tmp && exit 1 )
-champlain-marshal.c: champlain-marshal.h
- $(AM_V_GEN) ( (echo '#include "champlain-marshal.h"'; $(GLIB_GENMARSHAL) --prefix=cpl_marshal $(srcdir)/champlain-marshal.list --body) > champlain-marshal.tmp \
- && mv champlain-marshal.tmp champlain-marshal.c ) \
- || ( rm -f champlain-marshal.tmp && exit 1 )
+lib_LTLIBRARIES = libchamplain- CHAMPLAIN_API_VERSION@.la
-champlain-enum-types.h: $(libchamplain_headers)
- $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template champlain-enum-types.h.in \
- $(libchamplain_headers) ) > champlain-enum-types.h.tmp \
- && mv champlain-enum-types.h.tmp champlain-enum-types.h \
- || rm -f champlain-enum-type.h.tmp
+libchamplaindir = $(includedir)/libchamplain- CHAMPLAIN_API_VERSION@/champlain
-champlain-enum-types.c: $(libchamplain_headers) champlain-enum-types.h
- $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template champlain-enum-types.c.in \
- $(libchamplain_headers) ) > champlain-enum-types.c.tmp \
- && mv champlain-enum-types.c.tmp champlain-enum-types.c \
- || rm -f champlain-enum-type.c.tmp
+libchamplain_HEADERS = $(libchamplain_headers_public)
+nodist_libchamplain_HEADERS = $(libchamplain_headers_built)
if HAVE_INTROSPECTION
@@ -174,10 +145,8 @@ if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS =
-INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-introspection_sources = \
- $(libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES) \
- $(libchamplain_include_HEADERS)
+INTROSPECTION_COMPILER_ARGS =
+introspection_sources = $(libchamplain_ CHAMPLAIN_API_VERSION@_la_SOURCES)
if ENABLE_MEMPHIS
memphis_gir_include = Memphis-0.2
@@ -189,11 +158,11 @@ Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_SCANNERFLAGS = --strip-prefix=Champla
Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_VERSION = @CHAMPLAIN_API_VERSION@
Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_LIBS = libchamplain- CHAMPLAIN_API_VERSION@.la
Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_PACKAGES = gobject-2.0 gtk+-2.0
-Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_FILES = $(introspection_sources)
Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_INCLUDES = Clutter-1.0 Gtk-2.0 $(memphis_gir_include)
Champlain_ CHAMPLAIN_API_VERSION_NORM@_gir_CFLAGS = \
$(DEPS_CFLAGS) $(SOUP_CFLAGS) $(MEMPHIS_CFLAGS) \
- -I$(top_srcdir)/tidy -I$(top_srcdir) \
+ -I$(top_srcdir)/tidy -I$(top_srcdir) -I$(top_builddir) \
-DCHAMPLAIN_COMPILATION
INTROSPECTION_GIRS += Champlain- CHAMPLAIN_API_VERSION@.gir
@@ -207,5 +176,3 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
-
-
diff --git a/configure.ac b/configure.ac
index 08e16e7..c9dbaf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,6 +246,7 @@ CHAMPLAIN_CONFIG_COMMANDS([champlain/champlain-features.h],
# ----------------------------------------------------------
AC_CONFIG_FILES([Makefile
+ build/Makefile
champlain/Makefile
champlain/champlain-version.h
demos/Makefile
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index a2feaa6..dd4f761 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -80,7 +80,7 @@ expand_content_files=
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=$(DEPS_CFLAGS) -I$(top_srcdir) -I$(top_builddir)
+GTKDOC_CFLAGS=$(DEPS_CFLAGS) -I$(top_srcdir) -I$(top_builddir) -I$(top_builddir)/champlain
GTKDOC_LIBS=$(DEPS_LIBS) $(top_builddir)/champlain/libchamplain- CHAMPLAIN_API_VERSION@.la
# This includes the standard gtk-doc make rules, copied by gtkdocize.
diff --git a/tidy/Makefile.am b/tidy/Makefile.am
index e5c5a88..b2f0592 100644
--- a/tidy/Makefile.am
+++ b/tidy/Makefile.am
@@ -1,101 +1,63 @@
-NULL =
-
-INCLUDES = \
- -I$(top_srcdir) \
- -DPREFIX=\""$(prefix)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DG_DISABLE_DEPRECATED \
- -DG_LOG_DOMAIN=\"Tidy\" \
- $(DEPS_CFLAGS) \
- $(TIDY_DEBUG_CFLAGS) \
- $(NULL)
-
-LDADD = $(TIDY_LT_LDFLAGS) -export-dynamic -rpath $(libdir)
-
-BUILT_SOURCES = \
- tidy-enum-types.h \
- tidy-enum-types.c \
- tidy-marshal.h \
+BUILT_SOURCES =
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+
+
+tidy_headers_public = \
+ $(srcdir)/tidy-adjustment.h \
+ $(srcdir)/tidy-finger-scroll.h \
+ $(srcdir)/tidy-scrollable.h \
+ $(srcdir)/tidy-scroll-view.h \
+ $(srcdir)/tidy-viewport.h \
+ $(srcdir)/tidy-private.h \
+ $(srcdir)/tidy-debug.h
+
+tidy_sources = \
+ $(srcdir)/tidy-adjustment.c \
+ $(srcdir)/tidy-finger-scroll.c \
+ $(srcdir)/tidy-scroll-view.c \
+ $(srcdir)/tidy-scrollable.c \
+ $(srcdir)/tidy-viewport.c
+
+
+# glib-genmarshal rules
+glib_marshal_list = tidy-marshal.list
+glib_marshal_prefix = _tidy_marshal
+include $(top_srcdir)/build/Makefile.am.marshal
+
+# glib-mkenums rules
+glib_enum_h = tidy-enum-types.h
+glib_enum_c = tidy-enum-types.c
+glib_enum_headers = $(tidy_headers_public)
+include $(top_srcdir)/build/Makefile.am.enums
+
+tidy_headers_built = \
+ tidy-enum-types.h \
+ tidy-marshal.h
+
+tidy_sources_built = \
+ tidy-enum-types.c \
tidy-marshal.c
-STAMP_FILES = stamp-tidy-marshal.h stamp-tidy-enum-types.h
-
-# please, keep this sorted alphabetically
-source_h = \
- $(top_srcdir)/tidy/tidy-adjustment.h \
- $(top_srcdir)/tidy/tidy-finger-scroll.h \
- $(top_srcdir)/tidy/tidy-scrollable.h \
- $(top_srcdir)/tidy/tidy-scroll-view.h \
- $(top_srcdir)/tidy/tidy-viewport.h \
- $(top_srcdir)/tidy/tidy-private.h \
- $(NULL)
-
-source_h_private = \
- tidy-debug.h \
- $(NULL)
-
-# please, keep this sorted alphabetically
-source_c = \
- tidy-adjustment.c \
- tidy-finger-scroll.c \
- tidy-scroll-view.c \
- tidy-scrollable.c \
- tidy-viewport.c \
- $(NULL)
-
-tidy-marshal.h: stamp-tidy-marshal.h
- @true
-stamp-tidy-marshal.h: Makefile tidy-marshal.list
- $(AM_V_GEN) $(GLIB_GENMARSHAL) \
- --prefix=_tidy_marshal \
- --header \
- $(srcdir)/tidy-marshal.list > xgen-tmh && \
- (cmp -s xgen-tmh tidy-marshal.h || cp -f xgen-tmh tidy-marshal.h) && \
- rm -f xgen-tmh && \
- echo timestamp > $(@F)
-tidy-marshal.c: Makefile tidy-marshal.list
- $(AM_V_GEN) ( echo "#include \"tidy-marshal.h\"" ; \
- $(GLIB_GENMARSHAL) \
- --prefix=_tidy_marshal \
- --body \
- $(srcdir)/tidy-marshal.list ) > xgen-tmc && \
- cp -f xgen-tmc tidy-marshal.c && \
- rm -f xgen-tmc
-
-tidy-enum-types.h: stamp-tidy-enum-types.h Makefile
- @true
-stamp-tidy-enum-types.h: $(source_h) tidy-enum-types.h.in
- $(AM_V_GEN) ( $(GLIB_MKENUMS) \
- --template $(srcdir)/tidy-enum-types.h.in \
- $(source_h) ) >> xgen-teth && \
- (cmp xgen-teth tidy-enum-types.h || cp xgen-teth tidy-enum-types.h) && \
- rm -f xgen-teth && \
- echo timestamp > $(@F)
+libtidy_1_0_la_SOURCES = \
+ $(tidy_headers_public) \
+ $(tidy_sources)
-tidy-enum-types.c: stamp-tidy-enum-types.h tidy-enum-types.c.in
- $(AM_V_GEN) ( $(GLIB_MKENUMS) \
- --template $(srcdir)/tidy-enum-types.c.in \
- $(source_h) ) >> xgen-tetc && \
- cp xgen-tetc tidy-enum-types.c && \
- rm -f xgen-tetc
-
-noinst_libdir = $(top_srcdir)/tidy
-noinst_LTLIBRARIES = libtidy-1.0.la
+nodist_libtidy_1_0_la_SOURCES = \
+ $(tidy_headers_built) \
+ $(tidy_sources_built)
libtidy_1_0_la_LIBADD = $(DEPS_LIBS)
-libtidy_1_0_la_SOURCES = \
- $(source_c) \
- $(source_h) \
- $(source_h_priv) \
- $(BUILT_SOURCES) \
- $(NULL)
-libtidy_1_0_la_LDFLAGS = $(TIDY_LT_LDFLAGS)
-
-CLEANFILES = $(STAMP_FILES) $(BUILT_SOURCES)
-EXTRA_DIST = \
- tidy-enum-types.h.in \
- tidy-enum-types.c.in \
- tidy-marshal.list
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -DPREFIX=\""$(prefix)"\" \
+ -DLIBDIR=\""$(libdir)"\" \
+ -DG_DISABLE_DEPRECATED \
+ -DG_LOG_DOMAIN=\"Tidy\" \
+ $(DEPS_CFLAGS) \
+ $(TIDY_DEBUG_CFLAGS)
+noinst_LTLIBRARIES = libtidy-1.0.la
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]