[almanah] Makefile and configure.ac cleanup



commit 165d0d751bf356b84ccc32062f426ca70cf7bf79
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 31 10:56:52 2009 +0000

    Makefile and configure.ac cleanup

 configure.ac    |    2 +-
 src/Makefile.am |  116 ++++++++++++++++++++++++++----------------------------
 2 files changed, 57 insertions(+), 61 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0c1428f..1b4cb66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_CONFIG_SRCDIR([src/main.h])
 AC_CONFIG_HEADERS([config.h])
 AC_GNU_SOURCE
 
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news])
+AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news subdir-objects])
 
 # Enable silent build when available (Automake 1.11)
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a6ac8c..a15feb5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,37 +2,37 @@ bin_PROGRAMS = almanah
 
 almanah_SOURCES = \
 	$(ALMANAH_MARSHAL_FILES)	\
-	$(ALMANAH_ENUM_FILES)	\
-	main.c			\
-	main.h			\
-	interface.c		\
-	interface.h		\
-	main-window.c		\
-	main-window.h		\
+	$(ALMANAH_ENUM_FILES)		\
+	main.c				\
+	main.h				\
+	interface.c			\
+	interface.h			\
+	main-window.c			\
+	main-window.h			\
 	definition-manager-window.c	\
 	definition-manager-window.h	\
-	storage-manager.c	\
-	storage-manager.h	\
-	add-definition-dialog.c	\
-	add-definition-dialog.h	\
-	search-dialog.c		\
-	search-dialog.h		\
-	printing.c		\
-	printing.h		\
-	entry.c			\
-	entry.h			\
-	event.c			\
-	event.h			\
-	event-factory.c		\
-	event-factory.h		\
-	event-manager.c		\
-	event-manager.h		\
-	definition.c		\
-	definition.h		\
-	date-entry-dialog.c	\
-	date-entry-dialog.h	\
-	import-dialog.c		\
-	import-dialog.h		\
+	storage-manager.c		\
+	storage-manager.h		\
+	add-definition-dialog.c		\
+	add-definition-dialog.h		\
+	search-dialog.c			\
+	search-dialog.h			\
+	printing.c			\
+	printing.h			\
+	entry.c				\
+	entry.h				\
+	event.c				\
+	event.h				\
+	event-factory.c			\
+	event-factory.h			\
+	event-manager.c			\
+	event-manager.h			\
+	definition.c			\
+	definition.h			\
+	date-entry-dialog.c		\
+	date-entry-dialog.h		\
+	import-dialog.c			\
+	import-dialog.h			\
 	definitions/file.c		\
 	definitions/file.h		\
 	definitions/note.c		\
@@ -46,18 +46,18 @@ almanah_SOURCES = \
 
 if HAVE_EVO
 almanah_SOURCES += \
-	event-factories/calendar.c	\
-	event-factories/calendar.h	\
+	event-factories/calendar.c		\
+	event-factories/calendar.h		\
 	event-factories/calendar-client.c	\
 	event-factories/calendar-client.h	\
 	event-factories/calendar-debug.h	\
 	event-factories/calendar-sources.c	\
 	event-factories/calendar-sources.h	\
-	events/calendar-appointment.c	\
-	events/calendar-appointment.h	\
-	events/calendar-task.c		\
-	events/calendar-task.h		\
-	definitions/contact.c		\
+	events/calendar-appointment.c		\
+	events/calendar-appointment.h		\
+	events/calendar-task.c			\
+	events/calendar-task.h			\
+	definitions/contact.c			\
 	definitions/contact.h
 endif
 
@@ -68,13 +68,12 @@ almanah_SOURCES += \
 endif
 
 almanah_CPPFLAGS = \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"	\
-	-DPACKAGE_SRC_DIR=\""$(srcdir)"\"				\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\"				\
-	-I$(srcdir)/definitions						\
-	-I$(srcdir)/events						\
-	-I$(srcdir)/event-factories					\
-	$(DISABLE_DEPRECATED)						\
+	-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\"	\
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\"		\
+	-I$(srcdir)/definitions				\
+	-I$(srcdir)/events				\
+	-I$(srcdir)/event-factories			\
+	$(DISABLE_DEPRECATED)				\
 	$(AM_CPPFLAGS)
 
 almanah_CFLAGS = \
@@ -85,17 +84,12 @@ almanah_CFLAGS = \
 	$(WARN_CFLAGS)			\
 	$(AM_CFLAGS)
 
-if DEBUG
-almanah_CFLAGS += \
-	-fprofile-arcs	\
-	-ftest-coverage
-endif
-
 almanah_LDADD = \
 	$(STANDARD_LIBS)	\
 	$(EVO_LIBS)		\
 	$(ENCRYPTION_LIBS)	\
-	$(SPELL_CHECKING_LIBS)
+	$(SPELL_CHECKING_LIBS)	\
+	$(AM_LDADD)
 
 # Marshalling
 ALMANAH_MARSHAL_FILES = \
@@ -103,9 +97,9 @@ ALMANAH_MARSHAL_FILES = \
 	almanah-marshal.h
 
 almanah-marshal.h: almanah-marshal.list Makefile
-	$(AM_V_GEN)( $(GLIB_GENMARSHAL) --prefix=almanah_marshal $(srcdir)/almanah-marshal.list --header > $(@F) )
+	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=almanah_marshal $(srcdir)/almanah-marshal.list --header > $(@F))
 almanah-marshal.c: almanah-marshal.h Makefile
-	$(AM_V_GEN)( $(GLIB_GENMARSHAL) --prefix=almanah_marshal $(srcdir)/almanah-marshal.list --header --body > $(@F) )
+	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=almanah_marshal $(srcdir)/almanah-marshal.list --header --body > $(@F))
 
 # Enums
 ALMANAH_ENUM_FILES = \
@@ -115,36 +109,38 @@ ALMANAH_ENUM_FILES = \
 	event-factory-builtins.c
 
 definition-builtins.h: definition.h Makefile
-	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) \
+	$(AM_V_GEN)($(GLIB_MKENUMS) \
 			--fhead "#ifndef __ALMANAH_DEFINITION_BUILTINS_H__\n#define __ALMANAH_DEFINITION_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
 			--fprod "/* enumerations from \"@filename \" */\n" \
 			--vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n#define ALMANAH_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
-			--ftail "G_END_DECLS\n\n#endif /* __ALMANAH_DEFINITION_BUILTINS_H__ */" definition.h) > $(@F)
+			--ftail "G_END_DECLS\n\n#endif /* __ALMANAH_DEFINITION_BUILTINS_H__ */" \
+		definition.h > $(@F))
 
 definition-builtins.c: definition.h Makefile definition-builtins.h
-	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) \
+	$(AM_V_GEN)($(GLIB_MKENUMS) \
 			--fhead "#include \"definition.h\"\n#include \"definition-builtins.h\"" \
 			--fprod "\n/* enumerations from \"@filename \" */" \
 			--vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G Type@Value values[] = {" \
 			--vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
 			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_ type@_register_static (\"@EnumName \", values);\n  }\n  return etype;\n}\n" \
-		definition.h ) > $(@F)
+		definition.h > $(@F))
 
 event-factory-builtins.h: event-factory.h Makefile
-	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) \
+	$(AM_V_GEN)($(GLIB_MKENUMS) \
 			--fhead "#ifndef __ALMANAH_EVENT_FACTORY_BUILTINS_H__\n#define __ALMANAH_EVENT_FACTORY_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
 			--fprod "/* enumerations from \"@filename \" */\n" \
 			--vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n#define ALMANAH_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
-			--ftail "G_END_DECLS\n\n#endif /* __ALMANAH_EVENT_FACTORY_BUILTINS_H__ */" event-factory.h) > $(@F)
+			--ftail "G_END_DECLS\n\n#endif /* __ALMANAH_EVENT_FACTORY_BUILTINS_H__ */" \
+		event-factory.h > $(@F))
 
 event-factory-builtins.c: event-factory.h Makefile event-factory-builtins.h
-	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) \
+	$(AM_V_GEN)($(GLIB_MKENUMS) \
 			--fhead "#include \"event-factory.h\"\n#include \"event-factory-builtins.h\"" \
 			--fprod "\n/* enumerations from \"@filename \" */" \
 			--vhead "GType\n enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G Type@Value values[] = {" \
 			--vprod "      { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
 			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_ type@_register_static (\"@EnumName \", values);\n  }\n  return etype;\n}\n" \
-		event-factory.h ) > $(@F)
+		event-factory.h > $(@F))
 
 CLEANFILES = \
 	$(ALMANAH_MARSHAL_FILES)	\



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