[evolution] Bug 596848 - Use per-target CPPFLAGS in automake files



commit f62728b55e201ea92e682e07b3253ce4fb42d5af
Author: H.Habighorst <h habighorst googlemail com>
Date:   Wed Sep 30 23:37:50 2009 -0400

    Bug 596848 - Use per-target CPPFLAGS in automake files

 a11y/Makefile.am                                |    3 +-
 addressbook/conduit/Makefile.am                 |   12 ++--
 addressbook/gui/contact-editor/Makefile.am      |    8 +-
 addressbook/gui/contact-list-editor/Makefile.am |    8 +-
 addressbook/gui/merging/Makefile.am             |    8 +-
 addressbook/gui/widgets/Makefile.am             |    8 +-
 addressbook/importers/Makefile.am               |    7 +-
 addressbook/printing/Makefile.am                |   21 ++++--
 addressbook/tools/Makefile.am                   |    6 +-
 addressbook/util/Makefile.am                    |    7 +-
 calendar/common/Makefile.am                     |    3 +-
 calendar/conduits/calendar/Makefile.am          |   12 ++--
 calendar/conduits/common/Makefile.am            |   20 +++---
 calendar/conduits/memo/Makefile.am              |   12 ++--
 calendar/conduits/todo/Makefile.am              |   15 ++--
 calendar/gui/Makefile.am                        |    3 +-
 calendar/gui/alarm-notify/Makefile.am           |    3 +-
 calendar/gui/dialogs/Makefile.am                |    7 +-
 calendar/importers/Makefile.am                  |    3 +-
 composer/Makefile.am                            |    7 ++-
 configure.ac                                    |    3 +-
 e-util/Makefile.am                              |   86 +++++++++++++++-------
 em-format/Makefile.am                           |   11 ++--
 filter/Makefile.am                              |    9 +--
 mail/Makefile.am                                |    7 +-
 mail/importers/Makefile.am                      |    4 +-
 modules/addressbook/Makefile.am                 |    7 +-
 modules/calendar/Makefile.am                    |    9 ++-
 modules/mail/Makefile.am                        |    7 +-
 modules/plugin-lib/Makefile.am                  |    7 +-
 modules/plugin-mono/Makefile.am                 |    7 +-
 modules/plugin-python/Makefile.am               |    7 +-
 modules/plugin-python/example/Makefile.am       |    9 ++-
 plugins/addressbook-file/Makefile.am            |   15 ++--
 plugins/attachment-reminder/Makefile.am         |   23 +++---
 plugins/audio-inline/Makefile.am                |   14 +++--
 plugins/backup-restore/Makefile.am              |   37 +++++++---
 plugins/bbdb/Makefile.am                        |   16 +++--
 plugins/bogo-junk-plugin/Makefile.am            |   14 +++--
 plugins/caldav/Makefile.am                      |   16 ++--
 plugins/calendar-file/Makefile.am               |   13 ++--
 plugins/calendar-http/Makefile.am               |   16 +++--
 plugins/calendar-weather/Makefile.am            |   13 ++--
 plugins/default-mailer/Makefile.am              |   14 ++--
 plugins/default-source/Makefile.am              |   16 +++--
 plugins/email-custom-header/Makefile.am         |   21 +++---
 plugins/exchange-operations/Makefile.am         |   21 +++---
 plugins/external-editor/Makefile.am             |   24 ++++---
 plugins/face/Makefile.am                        |   29 ++++----
 plugins/google-account-setup/Makefile.am        |   14 ++--
 plugins/groupwise-features/Makefile.am          |   14 ++--
 plugins/hula-account-setup/Makefile.am          |   14 ++--
 plugins/imap-features/Makefile.am               |   25 +++----
 plugins/itip-formatter/Makefile.am              |   15 +++--
 plugins/mail-notification/Makefile.am           |   17 +++--
 plugins/mail-to-task/Makefile.am                |   17 +++--
 plugins/mailing-list-actions/Makefile.am        |   15 +++--
 plugins/mark-all-read/Makefile.am               |   14 +++--
 plugins/plugin-manager/Makefile.am              |   14 +++--
 plugins/prefer-plain/Makefile.am                |   12 ++-
 plugins/profiler/Makefile.am                    |   11 ++-
 plugins/pst-import/Makefile.am                  |   17 +++--
 plugins/publish-calendar/Makefile.am            |   19 +++---
 plugins/sa-junk-plugin/Makefile.am              |   20 +++---
 plugins/save-calendar/Makefile.am               |   12 ++--
 plugins/startup-wizard/Makefile.am              |   15 +++--
 plugins/subject-thread/Makefile.am              |   10 ++-
 plugins/templates/Makefile.am                   |   21 +++---
 plugins/tnef-attachments/Makefile.am            |   16 +++--
 plugins/vcard-inline/Makefile.am                |   16 +++--
 plugins/webdav-account-setup/Makefile.am        |   12 ++--
 shell/Makefile.am                               |   88 ++++++++++++++--------
 shell/test/Makefile.am                          |    3 +-
 smclient/Makefile.am                            |   17 +++--
 smime/gui/Makefile.am                           |    7 +-
 smime/lib/Makefile.am                           |    7 +-
 smime/tests/Makefile.am                         |    4 +-
 widgets/e-timezone-dialog/Makefile.am           |    8 +-
 widgets/menus/Makefile.am                       |    3 +-
 widgets/misc/Makefile.am                        |   41 ++++++++---
 widgets/table/Makefile.am                       |    7 +-
 widgets/text/Makefile.am                        |    8 +-
 82 files changed, 694 insertions(+), 487 deletions(-)
---
diff --git a/a11y/Makefile.am b/a11y/Makefile.am
index eeb7b50..7896c88 100644
--- a/a11y/Makefile.am
+++ b/a11y/Makefile.am
@@ -3,7 +3,8 @@
 
 privsolib_LTLIBRARIES = libevolution-a11y.la
 
-AM_CPPFLAGS =				\
+libevolution_a11y_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)			\
 	$(A11Y_CFLAGS)
 
 libevolution_a11y_la_SOURCES =		\
diff --git a/addressbook/conduit/Makefile.am b/addressbook/conduit/Makefile.am
index 2b02156..3ac06da 100644
--- a/addressbook/conduit/Makefile.am
+++ b/addressbook/conduit/Makefile.am
@@ -1,15 +1,15 @@
-AM_CPPFLAGS = 					\
+# Address Conduit
+privconduit_LTLIBRARIES = libeaddress_conduit.la
+
+libeaddress_conduit_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)/e-util			\
 	-I$(top_builddir)/e-util		\
 	-I$(top_srcdir)/widgets/misc		\
 	-I$(top_builddir)/widgets/misc		\
 	$(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS)
 
-# Address Conduit
-privconduit_LTLIBRARIES = libeaddress_conduit.la
-
-libeaddress_conduit_la_SOURCES = 		\
-	address-conduit.c
+libeaddress_conduit_la_SOURCES = address-conduit.c
 
 libeaddress_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am
index 29ddb6e..588dcc5 100644
--- a/addressbook/gui/contact-editor/Makefile.am
+++ b/addressbook/gui/contact-editor/Makefile.am
@@ -2,7 +2,10 @@ if OS_WIN32
 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libevolution-addressbook.la
 endif
 
-AM_CPPFLAGS =						\
+privsolib_LTLIBRARIES =	libecontacteditor.la
+
+libecontacteditor_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/addressbook/			\
@@ -14,9 +17,6 @@ AM_CPPFLAGS =						\
 	-DG_LOG_DOMAIN=\"contact-editor\"		\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-privsolib_LTLIBRARIES =				\
-	libecontacteditor.la
-
 libecontacteditor_la_SOURCES = 			\
 	eab-editor.c				\
 	eab-editor.h				\
diff --git a/addressbook/gui/contact-list-editor/Makefile.am b/addressbook/gui/contact-list-editor/Makefile.am
index 6377486..71ef370 100644
--- a/addressbook/gui/contact-list-editor/Makefile.am
+++ b/addressbook/gui/contact-list-editor/Makefile.am
@@ -2,7 +2,10 @@ if OS_WIN32
 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libevolution-addressbook.la
 endif
 
-AM_CPPFLAGS =						\
+privsolib_LTLIBRARIES =	libecontactlisteditor.la
+
+libecontactlisteditor_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/addressbook/			\
@@ -13,9 +16,6 @@ AM_CPPFLAGS =						\
 	-DG_LOG_DOMAIN=\"contact-list-editor\"		\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-privsolib_LTLIBRARIES =				\
-	libecontactlisteditor.la
-
 libecontactlisteditor_la_SOURCES = 		\
 	e-contact-list-editor.c			\
 	e-contact-list-editor.h			\
diff --git a/addressbook/gui/merging/Makefile.am b/addressbook/gui/merging/Makefile.am
index e399c19..92f9dc6 100644
--- a/addressbook/gui/merging/Makefile.am
+++ b/addressbook/gui/merging/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS =						\
+noinst_LTLIBRARIES = libeabbookmerging.la
+
+libeabbookmerging_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"eab-contact-merging\"		\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
 	-I$(top_srcdir)					\
@@ -6,9 +9,6 @@ AM_CPPFLAGS =						\
 	-I$(top_srcdir)/addressbook			\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-noinst_LTLIBRARIES =				\
-	libeabbookmerging.la
-
 libeabbookmerging_la_SOURCES =			\
 	eab-contact-compare.c			\
 	eab-contact-compare.h			\
diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am
index e907580..ffe064a 100644
--- a/addressbook/gui/widgets/Makefile.am
+++ b/addressbook/gui/widgets/Makefile.am
@@ -1,7 +1,10 @@
 ruledir = $(privdatadir)
 rule_DATA = addresstypes.xml
 
-AM_CPPFLAGS =						\
+noinst_LTLIBRARIES = libeabwidgets.la
+
+libeabwidgets_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"eab-widgets\"			\
 	-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\"	\
 	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"	\
@@ -17,9 +20,6 @@ AM_CPPFLAGS =						\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-noinst_LTLIBRARIES =				\
-	libeabwidgets.la
-
 eabincludedir = $(privincludedir)/addressbook/gui/widgets
 
 eabinclude_HEADERS = 			\
diff --git a/addressbook/importers/Makefile.am b/addressbook/importers/Makefile.am
index 27c463b..7ccc4c7 100644
--- a/addressbook/importers/Makefile.am
+++ b/addressbook/importers/Makefile.am
@@ -1,8 +1,7 @@
+privsolib_LTLIBRARIES = libevolution-addressbook-importers.la
 
-privsolib_LTLIBRARIES = 				\
-	libevolution-addressbook-importers.la
-
-AM_CPPFLAGS = 						\
+libevolution_addressbook_importers_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)					\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"	\
 	-DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\"		\
 	-DG_LOG_DOMAIN=\"Evolution-Importer\"		\
diff --git a/addressbook/printing/Makefile.am b/addressbook/printing/Makefile.am
index 5304e21..2c0d824 100644
--- a/addressbook/printing/Makefile.am
+++ b/addressbook/printing/Makefile.am
@@ -4,7 +4,8 @@ ecps_DATA  =				\
 	medbook.ecps			\
 	phonelist.ecps
 
-AM_CPPFLAGS =					\
+libecontactprint_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)				\
 	-DG_LOG_DOMAIN=\"addressbook-printing\"	\
 	-I$(top_srcdir)/addressbook		\
 	-I$(top_srcdir)				\
@@ -12,8 +13,7 @@ AM_CPPFLAGS =					\
 	-DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\"	\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-noinst_LTLIBRARIES =				\
-	libecontactprint.la
+noinst_LTLIBRARIES = libecontactprint.la
 
 libecontactprint_la_SOURCES = 			\
 	e-contact-print-types.h			\
@@ -24,11 +24,18 @@ libecontactprint_la_LIBADD =					\
 	$(top_builddir)/e-util/libeutil.la			\
 	$(top_builddir)/widgets/misc/libemiscwidgets.la
 
-noinst_PROGRAMS =			\
-	contact-print-test
+noinst_PROGRAMS = contact-print-test
 
-contact_print_test_SOURCES = 	\
-	test-print.c
+contact_print_test_CPPFLAGS = \
+	$(AM_CPPFLAGS)				\
+	-DG_LOG_DOMAIN=\"addressbook-printing\"	\
+	-I$(top_srcdir)/addressbook		\
+	-I$(top_srcdir)				\
+        -DEVOLUTION_GLADEDIR=\""$(gladedir)"\"	\
+	-DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\"	\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
+
+contact_print_test_SOURCES = test-print.c
 
 contact_print_test_LDADD =	\
 	libecontactprint.la					\
diff --git a/addressbook/tools/Makefile.am b/addressbook/tools/Makefile.am
index 4444d01..35d742e 100644
--- a/addressbook/tools/Makefile.am
+++ b/addressbook/tools/Makefile.am
@@ -2,10 +2,10 @@ privlibexec_SCRIPTS =					\
 	csv2vcard					\
 	evolution-addressbook-clean
 
-privlibexec_PROGRAMS =			\
-	evolution-addressbook-export	
+privlibexec_PROGRAMS = evolution-addressbook-export
 
-AM_CPPFLAGS =						\
+evolution_addressbook_export_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"evolution-addressbook-tools\"	\
 	-I$(top_srcdir)					\
 	-I$(top_builddir)				\
diff --git a/addressbook/util/Makefile.am b/addressbook/util/Makefile.am
index 50d5d43..c5afbaf 100644
--- a/addressbook/util/Makefile.am
+++ b/addressbook/util/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS =						\
+privsolib_LTLIBRARIES = libeabutil.la
+
+libeabutil_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-DPREFIX=\"$(prefix)\"				\
 	-DSYSCONFDIR=\"$(sysconfdir)\"			\
 	-DDATADIR=\"$(datadir)\"			\
@@ -9,8 +12,6 @@ AM_CPPFLAGS =						\
 	-I$(top_srcdir)/shell				\
         $(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-privsolib_LTLIBRARIES = libeabutil.la
-
 libeabutil_la_SOURCES =					\
 	addressbook.c					\
 	addressbook.h					\
diff --git a/calendar/common/Makefile.am b/calendar/common/Makefile.am
index 9947a6c..342a9b6 100644
--- a/calendar/common/Makefile.am
+++ b/calendar/common/Makefile.am
@@ -1,6 +1,7 @@
 noinst_LTLIBRARIES = libevolution-calendarprivate.la
 
-AM_CPPFLAGS =						\
+libevolution_calendarprivate_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"calendar-gui\"			\
 	-I$(top_builddir)/shell				\
 	-I$(top_srcdir)/shell				\
diff --git a/calendar/conduits/calendar/Makefile.am b/calendar/conduits/calendar/Makefile.am
index c3eca00..6a5dc51 100644
--- a/calendar/conduits/calendar/Makefile.am
+++ b/calendar/conduits/calendar/Makefile.am
@@ -1,4 +1,8 @@
-AM_CPPFLAGS = 					\
+# Calendar Conduit
+privconduit_LTLIBRARIES = libecalendar_conduit.la
+
+libecalendar_conduit_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)/e-util			\
 	-I$(top_builddir)/e-util		\
 	-I$(top_srcdir)/widgets/misc		\
@@ -7,11 +11,7 @@ AM_CPPFLAGS = 					\
 	-I$(top_builddir)/calendar/conduits/common		\
 	$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
 
-# Calendar Conduit
-privconduit_LTLIBRARIES = libecalendar_conduit.la
-
-libecalendar_conduit_la_SOURCES = 		\
-	calendar-conduit.c
+libecalendar_conduit_la_SOURCES = calendar-conduit.c
 
 libecalendar_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
diff --git a/calendar/conduits/common/Makefile.am b/calendar/conduits/common/Makefile.am
index 457d4eb..89b1288 100644
--- a/calendar/conduits/common/Makefile.am
+++ b/calendar/conduits/common/Makefile.am
@@ -1,26 +1,24 @@
-AM_CPPFLAGS = 					\
-	-I$(top_srcdir)			\
+# Calendar Conduit library
+privconduit_LTLIBRARIES = libecalendar_common_conduit.la
+
+libecalendar_common_conduit_la_CPPFLAGS = 	\
+	$(AM_CPPFLAGS)				\
+	-I$(top_srcdir)				\
 	-I$(top_srcdir)/e-util			\
 	-I$(top_builddir)/e-util		\
 	$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
 
-# Calendar Conduit library
-privconduit_LTLIBRARIES = libecalendar_common_conduit.la
-
 ecalendar_common_conduitincludedir = $(privincludedir)/calendar/conduits/common
 
-ecalendar_common_conduitinclude_HEADERS =		\
-	libecalendar-common-conduit.h
+ecalendar_common_conduitinclude_HEADERS = libecalendar-common-conduit.h
 
-libecalendar_common_conduit_la_SOURCES = 	\
-	libecalendar-common-conduit.c
+libecalendar_common_conduit_la_SOURCES = libecalendar-common-conduit.c
 
 libecalendar_common_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 libecalendar_common_conduit_la_LIBADD = 				\
 	$(top_builddir)/e-util/libeutil.la				\
 	$(top_builddir)/e-util/libeconduit.la		 		\
 	$(EVOLUTION_CALENDAR_CONDUIT_LIBS)
 
-
-
 -include $(top_srcdir)/git.mk
diff --git a/calendar/conduits/memo/Makefile.am b/calendar/conduits/memo/Makefile.am
index b8502cb..84ccf1b 100644
--- a/calendar/conduits/memo/Makefile.am
+++ b/calendar/conduits/memo/Makefile.am
@@ -1,4 +1,8 @@
-AM_CPPFLAGS = 					\
+# Memo Conduit
+privconduit_LTLIBRARIES = libememo_conduit.la
+
+libememo_conduit_la_CPPFLAGS = 			\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)/e-util			\
 	-I$(top_builddir)/e-util		\
 	-I$(top_srcdir)/widgets/misc		\
@@ -7,11 +11,7 @@ AM_CPPFLAGS = 					\
 	-I$(top_builddir)/calendar/conduits/common		\
 	$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
 
-# Memo Conduit
-privconduit_LTLIBRARIES = libememo_conduit.la
-
-libememo_conduit_la_SOURCES = 			\
-	memo-conduit.c
+libememo_conduit_la_SOURCES = memo-conduit.c
 
 libememo_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
diff --git a/calendar/conduits/todo/Makefile.am b/calendar/conduits/todo/Makefile.am
index f17535f..782067a 100644
--- a/calendar/conduits/todo/Makefile.am
+++ b/calendar/conduits/todo/Makefile.am
@@ -1,4 +1,8 @@
-AM_CPPFLAGS = 					\
+# ToDo Conduit
+privconduit_LTLIBRARIES = libetodo_conduit.la
+
+libetodo_conduit_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)/e-util			\
 	-I$(top_builddir)/e-util		\
 	-I$(top_srcdir)/widgets/misc		\
@@ -7,11 +11,7 @@ AM_CPPFLAGS = 					\
 	-I$(top_builddir)/calendar/conduits/common		\
 	$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
 
-# ToDo Conduit
-privconduit_LTLIBRARIES = libetodo_conduit.la
-
-libetodo_conduit_la_SOURCES = 			\
-	todo-conduit.c
+libetodo_conduit_la_SOURCES = todo-conduit.c
 
 libetodo_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
@@ -34,8 +34,7 @@ conduit_DATA = e-todo.conduit
 BUILT_SOURCES = $(conduit_DATA)
 CLEANFILES = $(BUILT_SOURCES)
 
-EXTRA_DIST = \
-	e-todo.conduit.in
+EXTRA_DIST = e-todo.conduit.in
 
 dist-hook:
 	cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index 6c20d5f..dd1357c 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -52,7 +52,8 @@ search_files = tasktypes.xml memotypes.xml caltypes.xml
 ruledir = $(privdatadir)
 rule_DATA = $(search_files)
 
-AM_CPPFLAGS =						\
+libevolution_calendar_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"calendar-gui\"			\
 	-I$(top_builddir)/shell				\
 	-I$(top_srcdir)/shell				\
diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am
index 7fce7db..cd50331 100644
--- a/calendar/gui/alarm-notify/Makefile.am
+++ b/calendar/gui/alarm-notify/Makefile.am
@@ -1,6 +1,7 @@
 bin_PROGRAMS = evolution-alarm-notify
 
-AM_CPPFLAGS = 						\
+evolution_alarm_notify_CPPFLAGS = 			\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"evolution-alarm-notify\"	\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index 3bcbadc..fb745fd 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS = 								\
+noinst_LTLIBRARIES = libcal-dialogs.la
+
+libcal_dialogs_la_CPPFLAGS = 						\
+	$(AM_CPPFLAGS)							\
 	-DG_LOG_DOMAIN=\"calendar-gui\"					\
 	-I$(top_srcdir)							\
 	-I$(top_srcdir)/widgets						\
@@ -46,8 +49,6 @@ ecalendarinclude_HEADERS =	\
 	task-details-page.h	\
 	task-page.h		
 
-noinst_LTLIBRARIES = libcal-dialogs.la
-
 libcal_dialogs_la_LIBADD =					\
 	$(top_builddir)/addressbook/util/libeabutil.la		\
 	$(GNOME_PLATFORM_LIBS)
diff --git a/calendar/importers/Makefile.am b/calendar/importers/Makefile.am
index 8fa711b..e178810 100644
--- a/calendar/importers/Makefile.am
+++ b/calendar/importers/Makefile.am
@@ -1,6 +1,7 @@
 privsolib_LTLIBRARIES = libevolution-calendar-importers.la
 
-AM_CPPFLAGS = 						\
+libevolution_calendar_importers_la_CPPFLAGS = 		\
+	$(AM_CPPFLAGS)					\
 	-DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\"		\
 	-DG_LOG_DOMAIN=\"Evolution-Importer\"		\
 	-I$(top_srcdir)					\
diff --git a/composer/Makefile.am b/composer/Makefile.am
index 68c0d66..6264266 100644
--- a/composer/Makefile.am
+++ b/composer/Makefile.am
@@ -4,8 +4,10 @@ errordir = $(privdatadir)/errors
 # provides error rule
 @EVO_PLUGIN_RULE@
 
-noinst_LTLIBRARIES = libcomposer.la
+privsolib_LTLIBRARIES = libcomposer.la
+
 libcomposerincludedir = $(privincludedir)/composer
+
 libcomposerinclude_HEADERS = 			\
 	e-composer-header.h			\
 	e-composer-header-table.h		\
@@ -19,7 +21,8 @@ libcomposerinclude_HEADERS = 			\
 	e-composer-autosave.h			\
 	e-msg-composer.h
 
-AM_CPPFLAGS =								\
+libcomposer_la_CPPFLAGS =						\
+	$(AM_CPPFLAGS)							\
 	-I$(top_srcdir)							\
 	-I$(top_builddir)						\
 	-I$(top_builddir)/composer					\
diff --git a/configure.ac b/configure.ac
index 86d9642..600e7dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ m4_define([upgrade_revision], [0])
 dnl Autoconf / Automake Initialization
 AC_PREREQ(2.58)
 AC_INIT([evolution],[evo_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution])
-AM_INIT_AUTOMAKE([gnu 1.9])
+AM_INIT_AUTOMAKE([1.9 -Wall -Werror foreign])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_SRCDIR(README)
@@ -121,6 +121,7 @@ AC_DEFINE_UNQUOTED(UPGRADE_REVISION, ["$UPGRADE_REVISION"], [The number of times
 AC_PROG_CC
 AC_C_INLINE
 AC_PROG_CPP
+AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 2f6602f..a869cf1 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -7,34 +7,6 @@ if OS_WIN32
 PLATFORM_SOURCES = e-win32-reloc.c
 endif
 
-AM_CPPFLAGS =								\
-	-I$(top_srcdir)							\
-	-I$(top_builddir)						\
-	-I$(top_srcdir)/widgets						\
-	-DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\"	\
-	-DEVOLUTION_DATADIR=\""$(datadir)"\"				\
-	-DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\"				\
-	-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\"			\
-	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"			\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
-	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"			\
-	-DEVOLUTION_ICONSDIR=\""$(imagesdir)"\"				\
-	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"			\
-	-DEVOLUTION_LIBDIR=\""$(datadir)"\"				\
-	-DEVOLUTION_LIBEXECDIR=\""$(privlibexecdir)"\"			\
-	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"			\
-	-DEVOLUTION_PLUGINDIR=\""$(plugindir)"\"			\
-	-DEVOLUTION_PREFIX=\""$(prefix)"\"				\
-	-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\"			\
-	-DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\"				\
-	-DEVOLUTION_SYSCONFDIR=\""$(sysconfdir)"\"			\
-	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"			\
-	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"			\
-	-DSEARCH_RULE_DIR=\"$(ruledir)\"				\
-	-DG_LOG_DOMAIN=\"e-utils\"					\
-	$(GNOME_PILOT_CFLAGS)						\
-	$(E_UTIL_CFLAGS)
-
 privsolib_LTLIBRARIES = libeutil.la libeconduit.la
 
 eutilinclude_HEADERS = 				\
@@ -77,6 +49,35 @@ eutilinclude_HEADERS = 				\
 	e-unicode.h				\
 	e-xml-utils.h
 
+libeutil_la_CPPFLAGS =							\
+	$(AM_CPPFLAGS)							\
+	-I$(top_srcdir)							\
+	-I$(top_builddir)						\
+	-I$(top_srcdir)/widgets						\
+	-DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\"	\
+	-DEVOLUTION_DATADIR=\""$(datadir)"\"				\
+	-DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\"				\
+	-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\"			\
+	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"			\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
+	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"			\
+	-DEVOLUTION_ICONSDIR=\""$(imagesdir)"\"				\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"			\
+	-DEVOLUTION_LIBDIR=\""$(datadir)"\"				\
+	-DEVOLUTION_LIBEXECDIR=\""$(privlibexecdir)"\"			\
+	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"			\
+	-DEVOLUTION_PLUGINDIR=\""$(plugindir)"\"			\
+	-DEVOLUTION_PREFIX=\""$(prefix)"\"				\
+	-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\"			\
+	-DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\"				\
+	-DEVOLUTION_SYSCONFDIR=\""$(sysconfdir)"\"			\
+	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"			\
+	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"			\
+	-DSEARCH_RULE_DIR=\"$(ruledir)\"				\
+	-DG_LOG_DOMAIN=\"e-utils\"					\
+	$(GNOME_PILOT_CFLAGS)						\
+	$(E_UTIL_CFLAGS)
+
 libeutil_la_SOURCES =				\
 	$(eutilinclude_HEADERS)			\
 	e-account-utils.c			\
@@ -147,6 +148,35 @@ else
 pilot_compile = e-html-utils.c
 endif
 
+libeconduit_la_CPPFLAGS =							\
+	$(AM_CPPFLAGS)							\
+	-I$(top_srcdir)							\
+	-I$(top_builddir)						\
+	-I$(top_srcdir)/widgets						\
+	-DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\"	\
+	-DEVOLUTION_DATADIR=\""$(datadir)"\"				\
+	-DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\"				\
+	-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\"			\
+	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"			\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
+	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"			\
+	-DEVOLUTION_ICONSDIR=\""$(imagesdir)"\"				\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"			\
+	-DEVOLUTION_LIBDIR=\""$(datadir)"\"				\
+	-DEVOLUTION_LIBEXECDIR=\""$(privlibexecdir)"\"			\
+	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"			\
+	-DEVOLUTION_PLUGINDIR=\""$(plugindir)"\"			\
+	-DEVOLUTION_PREFIX=\""$(prefix)"\"				\
+	-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\"			\
+	-DEVOLUTION_SOUNDDIR=\""$(soundsdir)"\"				\
+	-DEVOLUTION_SYSCONFDIR=\""$(sysconfdir)"\"			\
+	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"			\
+	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"			\
+	-DSEARCH_RULE_DIR=\"$(ruledir)\"				\
+	-DG_LOG_DOMAIN=\"e-utils\"					\
+	$(GNOME_PILOT_CFLAGS)						\
+	$(E_UTIL_CFLAGS)
+
 libeconduit_la_SOURCES = $(pilot_compile)
 
 libeconduit_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/em-format/Makefile.am b/em-format/Makefile.am
index 9533644..0f126d0 100644
--- a/em-format/Makefile.am
+++ b/em-format/Makefile.am
@@ -1,10 +1,5 @@
 emformatincludedir = $(privincludedir)/em-format
 
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 privsolib_LTLIBRARIES = libemformat.la
 
 emformatinclude_HEADERS =				\
@@ -12,6 +7,12 @@ emformatinclude_HEADERS =				\
 	em-format-quote.h				\
 	em-stripsig-filter.h
 
+libemformat_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 libemformat_la_SOURCES =				\
 	$(emformatinclude_HEADERS)			\
 	em-format.c					\
diff --git a/filter/Makefile.am b/filter/Makefile.am
index 0a94811..48cfa5c 100644
--- a/filter/Makefile.am
+++ b/filter/Makefile.am
@@ -1,16 +1,15 @@
-
 glade_DATA = filter.glade
 
-AM_CPPFLAGS = 					\
+privsolib_LTLIBRARIES =	libfilter.la
+
+libfilter_la_CPPFLAGS = 			\
+	$(AM_CPPFLAGS)				\
 	-I $(top_srcdir)			\
 	-I $(top_srcdir)/e-util			\
 	-DEVOLUTION_GLADEDIR=\"$(gladedir)\"	\
 	-DG_LOG_DOMAIN=\"filter\"		\
 	$(LIBFILTER_CFLAGS)
 
-privsolib_LTLIBRARIES =				\
-	libfilter.la
-
 filterincludedir = $(privincludedir)/filter
 
 filterinclude_HEADERS = 			\
diff --git a/mail/Makefile.am b/mail/Makefile.am
index d15e7b0..80777de 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -1,8 +1,11 @@
 SUBDIRS = . default importers
 
+privsolib_LTLIBRARIES = libevolution-mail.la
+
 mailincludedir = $(privincludedir)/mail
 
-AM_CPPFLAGS =						\
+libevolution_mail_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/widgets/misc			\
 	-I$(top_srcdir)					\
@@ -33,8 +36,6 @@ AM_CPPFLAGS =						\
 	-DPREFIX=\""$(prefix)"\"			\
 	-DG_LOG_DOMAIN=\"evolution-mail\"
 
-privsolib_LTLIBRARIES = libevolution-mail.la
-
 mailinclude_HEADERS =					\
 	e-mail-attachment-bar.h				\
 	e-mail-browser.h				\
diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am
index 19499a6..8851981 100644
--- a/mail/importers/Makefile.am
+++ b/mail/importers/Makefile.am
@@ -5,7 +5,9 @@ endif
 
 privsolib_LTLIBRARIES = libevolution-mail-importers.la
 
-AM_CPPFLAGS = -I.. 					\
+libevolution_mail_importers_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)					\
+	-I.. 						\
 	-I$(srcdir)/..					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
diff --git a/modules/addressbook/Makefile.am b/modules/addressbook/Makefile.am
index 97e8cdc..f014da7 100644
--- a/modules/addressbook/Makefile.am
+++ b/modules/addressbook/Makefile.am
@@ -2,7 +2,10 @@ if OS_WIN32
 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libevolution-mail.la
 endif
 
-AM_CPPFLAGS =							\
+module_LTLIBRARIES = libevolution-module-addressbook.la
+
+libevolution_module_addressbook_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)						\
 	-DG_LOG_DOMAIN=\"evolution-addressbook\"		\
 	-I$(top_srcdir)						\
 	-I$(top_srcdir)/widgets					\
@@ -23,8 +26,6 @@ AM_CPPFLAGS =							\
 	$(LDAP_CFLAGS)						\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
-module_LTLIBRARIES = libevolution-module-addressbook.la
-
 libevolution_module_addressbook_la_SOURCES = \
 	evolution-module-addressbook.c				\
 	addressbook-config.c					\
diff --git a/modules/calendar/Makefile.am b/modules/calendar/Makefile.am
index 47d3f8a..fee7c68 100644
--- a/modules/calendar/Makefile.am
+++ b/modules/calendar/Makefile.am
@@ -1,4 +1,8 @@
-AM_CPPFLAGS =						\
+module_LTLIBRARIES =					\
+	libevolution-module-calendar.la
+
+libevolution_module_calendar_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"calendar-modules\"		\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
@@ -6,9 +10,6 @@ AM_CPPFLAGS =						\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_CALENDAR_CFLAGS)
 
-module_LTLIBRARIES =					\
-	libevolution-module-calendar.la
-
 libevolution_module_calendar_la_SOURCES =		\
 	evolution-module-calendar.c			\
 	e-cal-attachment-handler.c			\
diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am
index bd968d5..962fc61 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS =								\
+module_LTLIBRARIES = libevolution-module-mail.la
+
+libevolution_module_mail_la_CPPFLAGS =					\
+	$(AM_CPPFLAGS)							\
 	-I$(top_srcdir)							\
 	-I$(top_srcdir)/mail						\
 	-I$(top_srcdir)/widgets						\
@@ -9,8 +12,6 @@ AM_CPPFLAGS =								\
 	-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\"			\
 	-DG_LOG_DOMAIN=\"evolution-module-mail\"
 
-module_LTLIBRARIES = libevolution-module-mail.la
-
 libevolution_module_mail_la_SOURCES =					\
 	evolution-module-mail.c						\
 	e-mail-attachment-handler.c					\
diff --git a/modules/plugin-lib/Makefile.am b/modules/plugin-lib/Makefile.am
index cce6090..73c4c8f 100644
--- a/modules/plugin-lib/Makefile.am
+++ b/modules/plugin-lib/Makefile.am
@@ -1,10 +1,11 @@
-AM_CPPFLAGS =							\
+module_LTLIBRARIES = libevolution-module-plugin-lib.la
+
+libevolution_module_plugin_lib_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)						\
 	-DG_LOG_DOMAIN=\"evolution-plugin-lib\"			\
 	-I$(top_srcdir)						\
 	$(E_UTIL_CFLAGS)
 
-module_LTLIBRARIES = libevolution-module-plugin-lib.la
-
 libevolution_module_plugin_lib_la_SOURCES =			\
 	evolution-module-plugin-lib.c				\
 	e-plugin-lib.c						\
diff --git a/modules/plugin-mono/Makefile.am b/modules/plugin-mono/Makefile.am
index f4f436a..8c9ba8e 100644
--- a/modules/plugin-mono/Makefile.am
+++ b/modules/plugin-mono/Makefile.am
@@ -1,11 +1,12 @@
-AM_CPPFLAGS =							\
+module_LTLIBRARIES = libevolution-module-plugin-mono.la
+
+libevolution_module_plugin_mono_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)						\
 	-DG_LOG_DOMAIN=\"evolution-plugin-mono\"		\
 	-I$(top_srcdir)						\
 	$(E_UTIL_CFLAGS)					\
 	$(MONO_CFLAGS)
 
-module_LTLIBRARIES = libevolution-module-plugin-mono.la
-
 libevolution_module_plugin_mono_la_SOURCES =			\
 	evolution-module-plugin-mono.c				\
 	e-plugin-mono.c						\
diff --git a/modules/plugin-python/Makefile.am b/modules/plugin-python/Makefile.am
index e6a32c3..4aaf14a 100644
--- a/modules/plugin-python/Makefile.am
+++ b/modules/plugin-python/Makefile.am
@@ -1,11 +1,12 @@
-AM_CPPFLAGS =							\
+module_LTLIBRARIES = libevolution-module-plugin-python.la
+
+libevolution_module_plugin_python_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)						\
 	-DG_LOG_DOMAIN=\"evolution-plugin-python\"		\
 	-I$(top_srcdir)						\
 	$(E_UTIL_CFLAGS)					\
 	$(PY_INCLUDES)
 
-module_LTLIBRARIES = libevolution-module-plugin-python.la
-
 libevolution_module_plugin_python_la_SOURCES =			\
 	evolution-module-plugin-python.c			\
 	e-plugin-python.c					\
diff --git a/modules/plugin-python/example/Makefile.am b/modules/plugin-python/example/Makefile.am
index cc14dc9..57a18ec 100644
--- a/modules/plugin-python/example/Makefile.am
+++ b/modules/plugin-python/example/Makefile.am
@@ -1,7 +1,3 @@
-AM_CPPFLAGS =						\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
-	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"	
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = \
@@ -9,6 +5,11 @@ plugin_DATA = \
 	org-gnome-hello-python-ui.xml				\
 	org-gnome-hello-python.eplug
 
+liborg_gnome_py_plug_test_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"
+
 liborg_gnome_py_plug_test_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
 errordir = $(privdatadir)/errors
diff --git a/plugins/addressbook-file/Makefile.am b/plugins/addressbook-file/Makefile.am
index 013e453..6eb0009 100644
--- a/plugins/addressbook-file/Makefile.am
+++ b/plugins/addressbook-file/Makefile.am
@@ -1,18 +1,19 @@
-AM_CPPFLAGS =					\
-	-I$(top_srcdir)				\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)		
-
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-addressbook-file.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-addressbook-file.la
 
+liborg_gnome_addressbook_file_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)				\
+	-I$(top_srcdir)				\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
 liborg_gnome_addressbook_file_la_SOURCES = addressbook-file.c
+
 liborg_gnome_addressbook_file_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_addressbook_file_la_LIBADD =	\
-	$(EVOLUTION_ADDRESSBOOK_LIBS)
+
+liborg_gnome_addressbook_file_la_LIBADD = $(EVOLUTION_ADDRESSBOOK_LIBS)
 
 EXTRA_DIST = org-gnome-addressbook-file.eplug.xml
 
diff --git a/plugins/attachment-reminder/Makefile.am b/plugins/attachment-reminder/Makefile.am
index 94e4337..1db3b79 100644
--- a/plugins/attachment-reminder/Makefile.am
+++ b/plugins/attachment-reminder/Makefile.am
@@ -1,16 +1,6 @@
-AM_CPPFLAGS =						\
-	-I$(top_builddir)/composer			\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(GNOME_PLATFORM_CFLAGS)			\
-	$(EVOLUTION_MAIL_CFLAGS)			\
-	-DEVOLUTION_PLUGINDIR="\"$(plugindir)\""
-
 @EVO_PLUGIN_RULE@
 
-error_DATA = 					\
-	org-gnome-attachment-reminder.error	
-
+error_DATA = org-gnome-attachment-reminder.error
 
 errordir = $(privdatadir)/errors
 
@@ -20,8 +10,19 @@ plugin_DATA = 						\
 
 plugin_LTLIBRARIES = liborg-gnome-evolution-attachment-reminder.la
 
+liborg_gnome_evolution_attachment_reminder_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)					\
+	-I$(top_builddir)/composer			\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(GNOME_PLATFORM_CFLAGS)			\
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	-DEVOLUTION_PLUGINDIR="\"$(plugindir)\""
+
 liborg_gnome_evolution_attachment_reminder_la_SOURCES = attachment-reminder.c 
+
 liborg_gnome_evolution_attachment_reminder_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_evolution_attachment_reminder_la_LIBADD =	\
 	$(top_builddir)/composer/libcomposer.la		\
 	$(top_builddir)/shell/libeshell.la		\
diff --git a/plugins/audio-inline/Makefile.am b/plugins/audio-inline/Makefile.am
index 67cb055..c68e46d 100644
--- a/plugins/audio-inline/Makefile.am
+++ b/plugins/audio-inline/Makefile.am
@@ -5,18 +5,22 @@ NO_UNDEFINED_REQUIRED_LIBS =				\
 	$(GNOME_PLATFORM_LIBS)
 endif
 
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	$(EVOLUTION_MAIL_CFLAGS)			\
-	$(GSTREAMER_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-audio-inline.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-audio-inline.la
 
+liborg_gnome_audio_inline_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(GSTREAMER_CFLAGS)
+
 liborg_gnome_audio_inline_la_SOURCES = audio-inline.c
+
 liborg_gnome_audio_inline_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_audio_inline_la_LIBADD =			\
 	$(top_builddir)/mail/libevolution-mail.la	\
 	$(top_builddir)/e-util/libeutil.la		\
diff --git a/plugins/backup-restore/Makefile.am b/plugins/backup-restore/Makefile.am
index b848d3c..9ffb2e3 100644
--- a/plugins/backup-restore/Makefile.am
+++ b/plugins/backup-restore/Makefile.am
@@ -1,4 +1,13 @@
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+error_DATA = org-gnome-backup-restore.error
+errordir = $(privdatadir)/errors
+
+plugin_DATA = org-gnome-backup-restore.eplug
+plugin_LTLIBRARIES = liborg-gnome-backup-restore.la
+
+liborg_gnome_backup_restore_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"	\
@@ -9,15 +18,7 @@ AM_CPPFLAGS =						\
 	-DLIBDIR=\""$(libdir)"\"			\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(SHELL_CFLAGS)					\
-	$(E_UTIL_CFLAGS)				
-
- EVO_PLUGIN_RULE@
-
-error_DATA = org-gnome-backup-restore.error
-errordir = $(privdatadir)/errors
-
-plugin_DATA = org-gnome-backup-restore.eplug
-plugin_LTLIBRARIES = liborg-gnome-backup-restore.la
+	$(E_UTIL_CFLAGS)
 
 liborg_gnome_backup_restore_la_SOURCES = backup-restore.c
 liborg_gnome_backup_restore_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
@@ -28,6 +29,20 @@ liborg_gnome_backup_restore_la_LIBADD =		\
 
 privlibexec_PROGRAMS = evolution-backup
 evolution_backup_SOURCES = backup.c
+evolution_backup_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"	\
+	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"	\
+	-DPREFIX=\""$(prefix)"\"			\
+	-DSYSCONFDIR=\""$(sysconfdir)"\"		\
+	-DDATADIR=\""$(datadir)"\"			\
+	-DLIBDIR=\""$(libdir)"\"			\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
+	$(SHELL_CFLAGS)					\
+	$(E_UTIL_CFLAGS)
+
 evolution_backup_LDADD =			\
 	$(SHELL_LIBS)				\
 	$(top_builddir)/e-util/libeutil.la
@@ -36,13 +51,13 @@ if OS_WIN32
 evolution_backup_LDFLAGS = -mwindows
 endif
 
-
 EXTRA_DIST = 					\
 	org-gnome-backup-restore.eplug.xml	\
 	org-gnome-backup-restore.error.xml
 
 BUILT_SOURCES = org-gnome-backup-restore.eplug \
 		org-gnome-backup-restore.error
+
 CLEANFILES = $(BUILT_SOURCES)
 
 -include $(top_srcdir)/git.mk
diff --git a/plugins/bbdb/Makefile.am b/plugins/bbdb/Makefile.am
index 0a44dc0..4f1d906 100644
--- a/plugins/bbdb/Makefile.am
+++ b/plugins/bbdb/Makefile.am
@@ -5,20 +5,24 @@ NO_UNDEFINED_REQUIRED_LIBS =				\
 	$(GNOME_PLATFORM_LIBS)
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-evolution-bbdb.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-evolution-bbdb.la
+
+liborg_gnome_evolution_bbdb_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_builddir)/composer			\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-evolution-bbdb.eplug
-plugin_LTLIBRARIES = liborg-gnome-evolution-bbdb.la
-
 liborg_gnome_evolution_bbdb_la_SOURCES = bbdb.c bbdb.h gaimbuddies.c
+
 liborg_gnome_evolution_bbdb_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_evolution_bbdb_la_LIBADD =		\
 	$(top_builddir)/e-util/libeutil.la	\
 	$(top_builddir)/composer/libcomposer.la	\
diff --git a/plugins/bogo-junk-plugin/Makefile.am b/plugins/bogo-junk-plugin/Makefile.am
index 00453ef..863fa4a 100644
--- a/plugins/bogo-junk-plugin/Makefile.am
+++ b/plugins/bogo-junk-plugin/Makefile.am
@@ -1,15 +1,19 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-DWELCOME_MESSAGE=\""$(privdatadir)/default/C/mail/local/Inbox"\" 	\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-bogo-junk-plugin.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-bogo-junk-plugin.la
 
+liborg_gnome_bogo_junk_plugin_la_CPPFLAGS =					\
+	$(AM_CPPFLAGS)								\
+	-I$(top_srcdir)								\
+	-DWELCOME_MESSAGE=\""$(privdatadir)/default/C/mail/local/Inbox"\" 	\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_bogo_junk_plugin_la_SOURCES = bf-junk-filter.c
+
 liborg_gnome_bogo_junk_plugin_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_bogo_junk_plugin_la_LIBADD =	\
 	$(top_builddir)/mail/libevolution-mail.la	\
 	$(top_builddir)/e-util/libeutil.la		\
diff --git a/plugins/caldav/Makefile.am b/plugins/caldav/Makefile.am
index 243338e..7ab5a14 100644
--- a/plugins/caldav/Makefile.am
+++ b/plugins/caldav/Makefile.am
@@ -1,16 +1,16 @@
-AM_CPPFLAGS = 						\
-	-I .						\
-	-I$(top_srcdir)	                                \
-	-DCALDAV_GLADEDIR=\""$(gladedir)"\"		\
-	$(EVOLUTION_CALENDAR_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-evolution-caldav.eplug
 plugin_LTLIBRARIES = liborg-gnome-evolution-caldav.la
 
-liborg_gnome_evolution_caldav_la_SOURCES =        \
-	caldav-source.c
+liborg_gnome_evolution_caldav_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I .						\
+	-I$(top_srcdir)	                                \
+	-DCALDAV_GLADEDIR=\""$(gladedir)"\"		\
+	$(EVOLUTION_CALENDAR_CFLAGS)
+
+liborg_gnome_evolution_caldav_la_SOURCES = caldav-source.c
 
 liborg_gnome_evolution_caldav_la_LIBADD = 	\
 	$(EVOLUTION_CALENDAR_LIBS)		\
diff --git a/plugins/calendar-file/Makefile.am b/plugins/calendar-file/Makefile.am
index aadb4b5..bbf8b7d 100644
--- a/plugins/calendar-file/Makefile.am
+++ b/plugins/calendar-file/Makefile.am
@@ -1,16 +1,19 @@
-AM_CPPFLAGS =					\
-	-I$(top_srcdir)				\
-	$(EVOLUTION_CALENDAR_CFLAGS)		\
-	$(SOURCE_SEL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-calendar-file.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-calendar-file.la
 
+liborg_gnome_calendar_file_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)				\
+	-I$(top_srcdir)				\
+	$(EVOLUTION_CALENDAR_CFLAGS)		\
+	$(SOURCE_SEL_CFLAGS)
 
 liborg_gnome_calendar_file_la_SOURCES = calendar-file.c
+
 liborg_gnome_calendar_file_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_calendar_file_la_LIBADD = 		\
 	$(EVOLUTION_CALENDAR_LIBS)
 
diff --git a/plugins/calendar-http/Makefile.am b/plugins/calendar-http/Makefile.am
index 89c17be..cf432dd 100644
--- a/plugins/calendar-http/Makefile.am
+++ b/plugins/calendar-http/Makefile.am
@@ -1,18 +1,20 @@
-AM_CPPFLAGS =					\
-	-I$(top_srcdir)				\
-	$(EVOLUTION_CALENDAR_CFLAGS)		\
-	$(SOURCE_SEL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-calendar-http.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-calendar-http.la
 
+liborg_gnome_calendar_http_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)				\
+	-I$(top_srcdir)				\
+	$(EVOLUTION_CALENDAR_CFLAGS)		\
+	$(SOURCE_SEL_CFLAGS)
 
 liborg_gnome_calendar_http_la_SOURCES = calendar-http.c
+
 liborg_gnome_calendar_http_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_calendar_http_la_LIBADD =		\
-	$(EVOLUTION_CALENDAR_LIBS)
+
+liborg_gnome_calendar_http_la_LIBADD = $(EVOLUTION_CALENDAR_LIBS)
 
 EXTRA_DIST = org-gnome-calendar-http.eplug.xml
 
diff --git a/plugins/calendar-weather/Makefile.am b/plugins/calendar-weather/Makefile.am
index 3da4088..d2801a6 100644
--- a/plugins/calendar-weather/Makefile.am
+++ b/plugins/calendar-weather/Makefile.am
@@ -1,6 +1,12 @@
 eds_datadir = `pkg-config --variable=privdatadir evolution-data-server-1.2`
 
-AM_CPPFLAGS =							\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-calendar-weather.eplug
+plugin_LTLIBRARIES = liborg-gnome-calendar-weather.la
+
+liborg_gnome_calendar_weather_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)						\
 	-I$(top_srcdir)						\
 	-I$(top_srcdir)/widgets					\
 	$(EVOLUTION_CALENDAR_CFLAGS)				\
@@ -9,11 +15,6 @@ AM_CPPFLAGS =							\
 	-DWEATHER_EDS_DATADIR=\""$(eds_datadir)/weather"\"	\
 	$(LIBGWEATHER_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-calendar-weather.eplug
-plugin_LTLIBRARIES = liborg-gnome-calendar-weather.la
-
 liborg_gnome_calendar_weather_la_SOURCES = calendar-weather.c
 liborg_gnome_calendar_weather_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 liborg_gnome_calendar_weather_la_LIBADD =			\
diff --git a/plugins/default-mailer/Makefile.am b/plugins/default-mailer/Makefile.am
index db71407..50dd13e 100644
--- a/plugins/default-mailer/Makefile.am
+++ b/plugins/default-mailer/Makefile.am
@@ -1,17 +1,19 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(GNOME_PLATFORM_CFLAGS)			\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 error_DATA = org-gnome-default-mailer.error
 errordir = $(privdatadir)/errors
 
 plugin_DATA        = org-gnome-default-mailer.eplug 
+
 plugin_LTLIBRARIES = liborg-gnome-default-mailer.la
 
+liborg_gnome_default_mailer_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(GNOME_PLATFORM_CFLAGS)			\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_default_mailer_la_SOURCES = default-mailer.c
 liborg_gnome_default_mailer_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 liborg_gnome_default_mailer_la_LIBADD =	\
diff --git a/plugins/default-source/Makefile.am b/plugins/default-source/Makefile.am
index dda1edf..3339f1e 100644
--- a/plugins/default-source/Makefile.am
+++ b/plugins/default-source/Makefile.am
@@ -1,22 +1,24 @@
-AM_CPPFLAGS =					\
-	-I$(top_srcdir)				\
-	$(EVOLUTION_CALENDAR_CFLAGS)		\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)          \
-	$(SOURCE_SEL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-default-source.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-default-source.la
 
+liborg_gnome_default_source_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)				\
+	-I$(top_srcdir)				\
+	$(EVOLUTION_CALENDAR_CFLAGS)		\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)         \
+	$(SOURCE_SEL_CFLAGS)
 
 liborg_gnome_default_source_la_SOURCES = default-source.c
+
 liborg_gnome_default_source_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_default_source_la_LIBADD =		\
 	$(EVOLUTION_CALENDAR_LIBS)		\
 	$(EVOLUTION_ADDRESSBOOK_LIBS)
 
-
 EXTRA_DIST = org-gnome-default-source.eplug.xml
 
 BUILT_SOURCES = $(plugin_DATA)
diff --git a/plugins/email-custom-header/Makefile.am b/plugins/email-custom-header/Makefile.am
index 95d1a97..9e827eb 100644
--- a/plugins/email-custom-header/Makefile.am
+++ b/plugins/email-custom-header/Makefile.am
@@ -1,4 +1,12 @@
-AM_CPPFLAGS = -I. 						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-email-custom-header.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-email-custom-header.la
+
+liborg_gnome_email_custom_header_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)					\
+	-I.	 					\
 	-I$(top_srcdir)	                                \
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/widgets/misc			\
@@ -9,17 +17,10 @@ AM_CPPFLAGS = -I. 						\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"          \
 	-DCONNECTOR_GLADEDIR=\""$(gladedir)"\"
 
-
- EVO_PLUGIN_RULE@
-
-plugin_DATA =	\
-	org-gnome-email-custom-header.eplug
-
-plugin_LTLIBRARIES = liborg-gnome-email-custom-header.la
-
 liborg_gnome_email_custom_header_la_SOURCES = 		\
-	email-custom-header.c					\
+	email-custom-header.c				\
 	email-custom-header.h										
+
 liborg_gnome_email_custom_header_la_LIBADD = 			\
 	$(top_builddir)/e-util/libeutil.la 			\
 	$(top_builddir)/widgets/misc/libemiscwidgets.la		\
diff --git a/plugins/exchange-operations/Makefile.am b/plugins/exchange-operations/Makefile.am
index 1e7cdd1..2914961 100644
--- a/plugins/exchange-operations/Makefile.am
+++ b/plugins/exchange-operations/Makefile.am
@@ -1,19 +1,20 @@
-AM_CPPFLAGS = -I .						\
-	-I$(top_srcdir)	                                \
-	-I$(top_srcdir)/widgets				\
-	-I$(top_srcdir)/calendar			\
-	-I$(top_builddir)/composer			\
-	-I$(top_builddir)/mail				\
-	$(CAMEL_EXCHANGE_CFLAGS)                        \
-	$(EVOLUTION_MAIL_CFLAGS)
-
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-exchange-operations.eplug
 
 plugin_LTLIBRARIES = liborg-gnome-exchange-operations.la
 
+liborg_gnome_exchange_operations_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I .						\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	-I$(top_srcdir)/calendar			\
+	-I$(top_builddir)/composer			\
+	-I$(top_builddir)/mail				\
+	$(CAMEL_EXCHANGE_CFLAGS)			\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_exchange_operations_la_SOURCES = 		\
 	exchange-operations.c				\
 	exchange-operations.h				\
diff --git a/plugins/external-editor/Makefile.am b/plugins/external-editor/Makefile.am
index 8c47bca..4e41c01 100644
--- a/plugins/external-editor/Makefile.am
+++ b/plugins/external-editor/Makefile.am
@@ -6,7 +6,19 @@ NO_UNDEFINED_REQUIRED_LIBS = \
 	$(top_builddir)/mail/libevolution-mail.la
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+error_DATA = org-gnome-external-editor.error
+
+errordir = $(privdatadir)/errors
+
+plugin_DATA = 						\
+	org-gnome-external-editor.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-external-editor.la
+
+liborg_gnome_external_editor_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"	\
 	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"	\
 	-DPREFIX=\""$(prefix)"\"			\
@@ -20,16 +32,6 @@ AM_CPPFLAGS =						\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(E_UTIL_CFLAGS)				
 
- EVO_PLUGIN_RULE@
-
-error_DATA = org-gnome-external-editor.error
-errordir = $(privdatadir)/errors
-
-plugin_DATA = 						\
-	org-gnome-external-editor.eplug
-
-plugin_LTLIBRARIES = liborg-gnome-external-editor.la
-
 liborg_gnome_external_editor_la_SOURCES = 		\
 	external-editor.c
 
diff --git a/plugins/face/Makefile.am b/plugins/face/Makefile.am
index 07cbb81..2d307f8 100644
--- a/plugins/face/Makefile.am
+++ b/plugins/face/Makefile.am
@@ -1,23 +1,23 @@
-AM_CPPFLAGS = -I. 						\
-	-I$(top_srcdir)	                                \
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-face.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-face.la
+
+liborg_gnome_face_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
+	-I. 						\
+	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/widgets/misc			\
-	-I$(top_builddir)/mail                          \
+	-I$(top_builddir)/mail				\
 	-I$(top_builddir)/composer			\
 	$(EVOLUTION_MAIL_CFLAGS)			\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"          \
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
 	-DCONNECTOR_GLADEDIR=\""$(gladedir)"\"
 
+liborg_gnome_face_la_SOURCES = face.c
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA =	\
-	org-gnome-face.eplug
-
-plugin_LTLIBRARIES = liborg-gnome-face.la
-
-liborg_gnome_face_la_SOURCES = 		\
-	face.c
 liborg_gnome_face_la_LIBADD = 			\
 	$(top_builddir)/e-util/libeutil.la 			\
 	$(top_builddir)/widgets/misc/libemiscwidgets.la		\
@@ -26,8 +26,7 @@ liborg_gnome_face_la_LIBADD = 			\
 
 liborg_gnome_face_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
-error_DATA = 					\
-	org-gnome-face.error
+error_DATA = org-gnome-face.error
 
 errordir = $(privdatadir)/errors
 
diff --git a/plugins/google-account-setup/Makefile.am b/plugins/google-account-setup/Makefile.am
index 3434dbb..7310724 100644
--- a/plugins/google-account-setup/Makefile.am
+++ b/plugins/google-account-setup/Makefile.am
@@ -1,4 +1,11 @@
-AM_CPPFLAGS = 						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-evolution-google.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-evolution-google.la
+
+liborg_gnome_evolution_google_la_CPPFLAGS = 		\
+	$(AM_CPPFLAGS)					\
 	-I .						\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
@@ -6,11 +13,6 @@ AM_CPPFLAGS = 						\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-evolution-google.eplug
-plugin_LTLIBRARIES = liborg-gnome-evolution-google.la
-
 liborg_gnome_evolution_google_la_SOURCES =        \
 	google-source.c \
 	google-contacts-source.h \
diff --git a/plugins/groupwise-features/Makefile.am b/plugins/groupwise-features/Makefile.am
index 1b3a5eb..52e33fe 100644
--- a/plugins/groupwise-features/Makefile.am
+++ b/plugins/groupwise-features/Makefile.am
@@ -2,7 +2,14 @@ if OS_WIN32
 NO_UNDEFINED_REQUIRED_LIBS = $(top_builddir)/mail/libevolution-mail.la
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-groupwise-features.eplug org-gnome-compose-send-options.xml
+
+plugin_LTLIBRARIES = liborg-gnome-groupwise-features.la
+
+liborg_gnome_groupwise_features_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_srcdir)/widgets/misc			\
@@ -16,11 +23,6 @@ AM_CPPFLAGS =						\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
 	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"	
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-groupwise-features.eplug org-gnome-compose-send-options.xml
-plugin_LTLIBRARIES = liborg-gnome-groupwise-features.la
-
 liborg_gnome_groupwise_features_la_SOURCES = 	\
 		gw-ui.h	     			\
 		gw-ui.c	     			\
diff --git a/plugins/hula-account-setup/Makefile.am b/plugins/hula-account-setup/Makefile.am
index e0d89ce..551b92c 100644
--- a/plugins/hula-account-setup/Makefile.am
+++ b/plugins/hula-account-setup/Makefile.am
@@ -1,14 +1,16 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	$(EVOLUTION_MAIL_CFLAGS)			\
-	$(EVOLUTION_CALENDAR_CFLAGS)			\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA =  org-gnome-evolution-hula-account-setup.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-evolution-hula-account-setup.la 
 
+liborg_gnome_evolution_hula_account_setup_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"
+
 liborg_gnome_evolution_hula_account_setup_la_SOURCES = \
 			camel-hula-listener.c	\
 			camel-hula-listener.h	\
diff --git a/plugins/imap-features/Makefile.am b/plugins/imap-features/Makefile.am
index d21841f..09edf33 100644
--- a/plugins/imap-features/Makefile.am
+++ b/plugins/imap-features/Makefile.am
@@ -2,32 +2,31 @@ if OS_WIN32
 NO_UNDEFINED_REQUIRED_LIBS = $(top_builddir)/mail/libevolution-mail.la
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-imap-features.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-imap-features.la
+
+liborg_gnome_imap_features_la_CPPFLAGS = 		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/mail				\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(CAMEL_IMAP_CFLAGS)				\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
-	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"	
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-imap-features.eplug 
-plugin_LTLIBRARIES = liborg-gnome-imap-features.la
-
-liborg_gnome_imap_features_la_SOURCES = 	\
-	imap-headers.c	
+liborg_gnome_imap_features_la_SOURCES = imap-headers.c
 
 liborg_gnome_imap_features_la_LIBADD=			\
 	$(top_builddir)/e-util/libeutil.la 		\
 	$(top_builddir)/mail/libevolution-mail.la	\
 	$(EVOLUTION_MAIL_LIBS)
 
-
 liborg_gnome_imap_features_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
-glade_DATA =			\
-	imap-headers.glade 
+glade_DATA = imap-headers.glade
 
 errordir = $(privdatadir)/errors
 
@@ -35,7 +34,7 @@ BUILT_SOURCES = org-gnome-imap-features.eplug $(error_i18n)
 
 EXTRA_DIST =						\
 	$(glade_DATA) 					\
-	org-gnome-imap-features.eplug.xml		
+	org-gnome-imap-features.eplug.xml
 
 CLEANFILES = $(BUILT_SOURCES)
 
diff --git a/plugins/itip-formatter/Makefile.am b/plugins/itip-formatter/Makefile.am
index c5d7fd6..9cab29a 100644
--- a/plugins/itip-formatter/Makefile.am
+++ b/plugins/itip-formatter/Makefile.am
@@ -1,17 +1,20 @@
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-itip-formatter.eplug
+plugin_LTLIBRARIES = liborg-gnome-itip-formatter.la
+
+liborg_gnome_itip_formatter_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(EVOLUTION_CALENDAR_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-itip-formatter.eplug
-plugin_LTLIBRARIES = liborg-gnome-itip-formatter.la
-
 liborg_gnome_itip_formatter_la_SOURCES = itip-formatter.c itip-view.c itip-view.h
+
 liborg_gnome_itip_formatter_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_itip_formatter_la_LIBADD =				\
 	$(top_builddir)/e-util/libeutil.la			\
 	$(top_builddir)/calendar/gui/libevolution-calendar.la	\
diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am
index 9ee65c2..ddd1b51 100644
--- a/plugins/mail-notification/Makefile.am
+++ b/plugins/mail-notification/Makefile.am
@@ -5,7 +5,14 @@ NO_UNDEFINED_REQUIRED_LIBS =				\
 	$(GNOME_PLATFORM_LIBS)
 endif
 
-AM_CPPFLAGS =					\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-mail-notification.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-mail-notification.la
+
+liborg_gnome_mail_notification_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/widgets			\
 	$(GNOME_PLATFORM_CFLAGS)		\
@@ -14,14 +21,10 @@ AM_CPPFLAGS =					\
 	$(LIBNOTIFY_CFLAGS)			\
 	$(CANBERRA_CFLAGS)
 
- EVO_PLUGIN_RULE@
+liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
 
-plugin_DATA = org-gnome-mail-notification.eplug
-plugin_LTLIBRARIES = liborg-gnome-mail-notification.la
+liborg_gnome_mail_notification_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
-liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
-liborg_gnome_mail_notification_la_LDFLAGS = 	\
-	-module -avoid-version $(NO_UNDEFINED)
 liborg_gnome_mail_notification_la_LIBADD = 		\
 	$(DBUS_GLIB_LIBS)				\
 	$(CANBERRA_LIBS)				\
diff --git a/plugins/mail-to-task/Makefile.am b/plugins/mail-to-task/Makefile.am
index 97c6f95..c7501fc 100644
--- a/plugins/mail-to-task/Makefile.am
+++ b/plugins/mail-to-task/Makefile.am
@@ -1,17 +1,21 @@
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-mail-to-task.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-mail-to-task.la
+
+liborg_gnome_mail_to_task_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-mail-to-task.eplug
-plugin_LTLIBRARIES = liborg-gnome-mail-to-task.la
-
 liborg_gnome_mail_to_task_la_SOURCES = mail-to-task.c
+
 liborg_gnome_mail_to_task_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_mail_to_task_la_LIBADD =	\
 	$(top_builddir)/e-util/libeutil.la				\
 	$(top_builddir)/shell/libeshell.la				\
@@ -26,6 +30,7 @@ liborg_gnome_mail_to_task_la_LIBADD =	\
 EXTRA_DIST = org-gnome-mail-to-task.eplug.xml
 
 BUILT_SOURCES = org-gnome-mail-to-task.eplug
+
 CLEANFILES = $(BUILT_SOURCES)
 
 -include $(top_srcdir)/git.mk
diff --git a/plugins/mailing-list-actions/Makefile.am b/plugins/mailing-list-actions/Makefile.am
index 9926ab2..8755684 100644
--- a/plugins/mailing-list-actions/Makefile.am
+++ b/plugins/mailing-list-actions/Makefile.am
@@ -1,17 +1,20 @@
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-mailing-list-actions.eplug
+plugin_LTLIBRARIES = liborg-gnome-mailing-list-actions.la
+
+liborg_gnome_mailing_list_actions_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)/composer 			\
 	$(GNOME_PLATFORM_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-mailing-list-actions.eplug
-plugin_LTLIBRARIES = liborg-gnome-mailing-list-actions.la
-
 liborg_gnome_mailing_list_actions_la_SOURCES = mailing-list-actions.c
+
 liborg_gnome_mailing_list_actions_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_mailing_list_actions_la_LIBADD =		\
 	$(top_builddir)/e-util/libeutil.la		\
 	$(top_builddir)/mail/libevolution-mail.la	\
diff --git a/plugins/mark-all-read/Makefile.am b/plugins/mark-all-read/Makefile.am
index aac01d2..bbbfae7 100644
--- a/plugins/mark-all-read/Makefile.am
+++ b/plugins/mark-all-read/Makefile.am
@@ -1,15 +1,19 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-mark-all-read.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-mark-all-read.la
 
+liborg_gnome_mark_all_read_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_mark_all_read_la_SOURCES = mark-all-read.c  
+
 liborg_gnome_mark_all_read_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_mark_all_read_la_LIBADD = 			\
 	$(top_builddir)/e-util/libeutil.la		\
 	$(top_builddir)/mail/libevolution-mail.la	\
diff --git a/plugins/plugin-manager/Makefile.am b/plugins/plugin-manager/Makefile.am
index 5f1228f..2966642 100644
--- a/plugins/plugin-manager/Makefile.am
+++ b/plugins/plugin-manager/Makefile.am
@@ -1,15 +1,19 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-plugin-manager.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-plugin-manager.la
 
+liborg_gnome_plugin_manager_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_plugin_manager_la_SOURCES = plugin-manager.c
+
 liborg_gnome_plugin_manager_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_plugin_manager_la_LIBADD =			\
 	$(top_builddir)/e-util/libeutil.la		\
 	$(top_builddir)/shell/libeshell.la		\
diff --git a/plugins/prefer-plain/Makefile.am b/plugins/prefer-plain/Makefile.am
index c8abf81..61222e9 100644
--- a/plugins/prefer-plain/Makefile.am
+++ b/plugins/prefer-plain/Makefile.am
@@ -1,14 +1,18 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-prefer-plain.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-prefer-plain.la
 
+liborg_gnome_prefer_plain_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_prefer_plain_la_SOURCES = prefer-plain.c
+
 liborg_gnome_prefer_plain_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_prefer_plain_la_LIBADD =	\
 	$(top_builddir)/mail/libevolution-mail.la	\
 	$(top_builddir)/em-format/libemformat.la	\
diff --git a/plugins/profiler/Makefile.am b/plugins/profiler/Makefile.am
index 21f63af..2a61fba 100644
--- a/plugins/profiler/Makefile.am
+++ b/plugins/profiler/Makefile.am
@@ -1,15 +1,18 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	$(SHELL_CFLAGS)
-
 LIBS = $(SHELL_LIBS)
 
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-evolution-profiler.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-evolution-profiler.la
 
+liborg_gnome_evolution_profiler_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	$(SHELL_CFLAGS)
+
 liborg_gnome_evolution_profiler_la_SOURCES = profiler.c
+
 liborg_gnome_evolution_profiler_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
 EXTRA_DIST = org-gnome-evolution-profiler.eplug.xml
diff --git a/plugins/pst-import/Makefile.am b/plugins/pst-import/Makefile.am
index 7c4ace9..f120065 100644
--- a/plugins/pst-import/Makefile.am
+++ b/plugins/pst-import/Makefile.am
@@ -6,7 +6,14 @@ NO_UNDEFINED_REQUIRED_LIBS =				\
 	$(EVOLUTION_MAIL_LIBS)
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-pst-import.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-pst-import.la
+
+liborg_gnome_pst_import_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)				\
@@ -17,14 +24,10 @@ AM_CPPFLAGS =						\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(LIBPST_CFLAGS)
 
- EVO_PLUGIN_RULE@
+liborg_gnome_pst_import_la_SOURCES = pst-importer.c
 
-plugin_DATA = org-gnome-pst-import.eplug
-plugin_LTLIBRARIES = liborg-gnome-pst-import.la
+liborg_gnome_pst_import_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
-liborg_gnome_pst_import_la_SOURCES = pst-importer.c
-liborg_gnome_pst_import_la_LDFLAGS = \
-	-module -avoid-version $(NO_UNDEFINED)
 liborg_gnome_pst_import_la_LIBADD =			\
 	$(top_builddir)/mail/libevolution-mail.la	\
 	$(GNOME_PLATFORM_LIBS)				\
diff --git a/plugins/publish-calendar/Makefile.am b/plugins/publish-calendar/Makefile.am
index 7e7af76..a811753 100644
--- a/plugins/publish-calendar/Makefile.am
+++ b/plugins/publish-calendar/Makefile.am
@@ -1,21 +1,22 @@
-AM_CPPFLAGS =					\
-	-I$(top_srcdir)				\
-	-I$(top_srcdir)/widgets			\
-	-I$(top_builddir)/shell			\
-	$(EVOLUTION_CALENDAR_CFLAGS)		\
-	-DEVOLUTION_PLUGINDIR="\"$(plugindir)\"" \
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"          
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = 					\
 	org-gnome-publish-calendar.eplug
 
 glade_DATA =							\
-	publish-calendar.glade				
+	publish-calendar.glade
 
 plugin_LTLIBRARIES = liborg-gnome-publish-calendar.la
 
+liborg_gnome_publish_calendar_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	-I$(top_builddir)/shell				\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
+	-DEVOLUTION_PLUGINDIR="\"$(plugindir)\""	\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"
+
 liborg_gnome_publish_calendar_la_SOURCES =	\
 	publish-calendar.c			\
 	publish-format-fb.c			\
diff --git a/plugins/sa-junk-plugin/Makefile.am b/plugins/sa-junk-plugin/Makefile.am
index 39bd74e..42ea8a8 100644
--- a/plugins/sa-junk-plugin/Makefile.am
+++ b/plugins/sa-junk-plugin/Makefile.am
@@ -1,15 +1,18 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(GNOME_PLATFORM_CFLAGS)			\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-sa-junk-plugin.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-sa-junk-plugin.la
 
+liborg_gnome_sa_junk_plugin_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(GNOME_PLATFORM_CFLAGS)			\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_sa_junk_plugin_la_SOURCES = em-junk-filter.c
+
 liborg_gnome_sa_junk_plugin_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
 liborg_gnome_sa_junk_plugin_la_LIBADD =	\
@@ -22,9 +25,6 @@ BUILT_SOURCES = $(plugin_DATA) $(error_DATA)
 
 CLEANFILES = $(BUILT_SOURCES)
 
-EXTRA_DIST = \
-	org-gnome-sa-junk-plugin.eplug.xml
-
-
+EXTRA_DIST = org-gnome-sa-junk-plugin.eplug.xml
 
 -include $(top_srcdir)/git.mk
diff --git a/plugins/save-calendar/Makefile.am b/plugins/save-calendar/Makefile.am
index 7149e78..0e95ec6 100644
--- a/plugins/save-calendar/Makefile.am
+++ b/plugins/save-calendar/Makefile.am
@@ -1,13 +1,15 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(EVOLUTION_CALENDAR_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-save-calendar.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-save-calendar.la
 
+liborg_gnome_save_calendar_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(EVOLUTION_CALENDAR_CFLAGS)
+
 liborg_gnome_save_calendar_la_SOURCES = \
 	save-calendar.c			\
 	ical-format.c			\
diff --git a/plugins/startup-wizard/Makefile.am b/plugins/startup-wizard/Makefile.am
index 613acbc..375b46d 100644
--- a/plugins/startup-wizard/Makefile.am
+++ b/plugins/startup-wizard/Makefile.am
@@ -1,15 +1,18 @@
-AM_CPPFLAGS = -I .					\
+plugin_LTLIBRARIES = liborg-gnome-evolution-startup-wizard.la
+
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-evolution-startup-wizard.eplug
+
+liborg_gnome_evolution_startup_wizard_la_CPPFLAGS =	\
+	$(AM_CPPFLAGS)					\
+	-I .						\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)/shell				\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(EVOLUTION_MAIL_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-evolution-startup-wizard.eplug
-plugin_LTLIBRARIES = liborg-gnome-evolution-startup-wizard.la
-
 liborg_gnome_evolution_startup_wizard_la_SOURCES = 	\
 	startup-wizard.c
 
diff --git a/plugins/subject-thread/Makefile.am b/plugins/subject-thread/Makefile.am
index e27b08b..a5686b6 100644
--- a/plugins/subject-thread/Makefile.am
+++ b/plugins/subject-thread/Makefile.am
@@ -1,11 +1,13 @@
-AM_CPPFLAGS =						\
-	-I$(top_srcdir)					\
-	$(EVOLUTION_MAIL_CFLAGS)
+plugin_LTLIBRARIES = liborg-gnome-subject-thread.la
 
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-subject-thread.eplug
-plugin_LTLIBRARIES = liborg-gnome-subject-thread.la
+
+liborg_gnome_subject_thread_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	$(EVOLUTION_MAIL_CFLAGS)
 
 liborg_gnome_subject_thread_la_SOURCES = subject-thread.c
 liborg_gnome_subject_thread_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
diff --git a/plugins/templates/Makefile.am b/plugins/templates/Makefile.am
index 6c9522d..8f47a03 100644
--- a/plugins/templates/Makefile.am
+++ b/plugins/templates/Makefile.am
@@ -1,4 +1,13 @@
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = 					\
+		org-gnome-templates.eplug	\
+		templates.glade
+
+plugin_LTLIBRARIES = liborg-gnome-templates.la
+
+liborg_gnome_templates_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-I$(top_builddir)				\
@@ -8,16 +17,10 @@ AM_CPPFLAGS =						\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
 	-DEVOLUTION_PLUGINDIR="\"$(plugindir)\""
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = 					\
-		org-gnome-templates.eplug	\
-		templates.glade
-
-plugin_LTLIBRARIES = liborg-gnome-templates.la
-
 liborg_gnome_templates_la_SOURCES = templates.c
+
 liborg_gnome_templates_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_templates_la_LIBADD =	\
 	$(top_builddir)/e-util/libeutil.la		\
 	$(top_builddir)/shell/libeshell.la		\
diff --git a/plugins/tnef-attachments/Makefile.am b/plugins/tnef-attachments/Makefile.am
index 2273e6e..26a679b 100644
--- a/plugins/tnef-attachments/Makefile.am
+++ b/plugins/tnef-attachments/Makefile.am
@@ -6,7 +6,14 @@ NO_UNDEFINED_REQUIRED_LIBS = 				\
 	$(top_builddir)/mail/libevolution-mail.la
 endif
 
-AM_CPPFLAGS =						\
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-tnef-attachments.eplug
+
+plugin_LTLIBRARIES = liborg-gnome-tnef-attachments.la
+
+liborg_gnome_tnef_attachments_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/widgets				\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""	\
@@ -14,13 +21,10 @@ AM_CPPFLAGS =						\
 	$(EVOLUTION_MAIL_CFLAGS)			\
 	$(TNEF_CFLAGS)
 
- EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-tnef-attachments.eplug
-plugin_LTLIBRARIES = liborg-gnome-tnef-attachments.la
-
 liborg_gnome_tnef_attachments_la_SOURCES = tnef-plugin.c
+
 liborg_gnome_tnef_attachments_la_LDFLAGS = -module -avoid-version  $(NO_UNDEFINED)
+
 liborg_gnome_tnef_attachments_la_LIBADD = 		\
 	$(top_builddir)/e-util/libeutil.la		\
 	$(top_builddir)/em-format/libemformat.la	\
diff --git a/plugins/vcard-inline/Makefile.am b/plugins/vcard-inline/Makefile.am
index a126750..ead97d7 100644
--- a/plugins/vcard-inline/Makefile.am
+++ b/plugins/vcard-inline/Makefile.am
@@ -5,19 +5,23 @@ NO_UNDEFINED_REQUIRED_LIBS =				\
 	$(GNOME_PLATFORM_LIBS)
 endif
 
-AM_CPPFLAGS = \
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/widgets				\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
-	$(EVOLUTION_MAIL_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-vcard-inline.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-vcard-inline.la
 
+liborg_gnome_vcard_inline_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)					\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/widgets				\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
+	$(EVOLUTION_MAIL_CFLAGS)
+
 liborg_gnome_vcard_inline_la_SOURCES = vcard-inline.c
+
 liborg_gnome_vcard_inline_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
 liborg_gnome_vcard_inline_la_LIBADD =	\
 	$(top_builddir)/mail/libevolution-mail.la		\
 	$(top_builddir)/addressbook/util/libeabutil.la		\
diff --git a/plugins/webdav-account-setup/Makefile.am b/plugins/webdav-account-setup/Makefile.am
index 761cd69..bc281a7 100644
--- a/plugins/webdav-account-setup/Makefile.am
+++ b/plugins/webdav-account-setup/Makefile.am
@@ -1,13 +1,15 @@
-AM_CPPFLAGS = \
-	-I .				\
-	-I$(top_srcdir)			\
-	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
 @EVO_PLUGIN_RULE@
 
 plugin_DATA = org-gnome-evolution-webdav.eplug
+
 plugin_LTLIBRARIES = liborg-gnome-evolution-webdav.la
 
+liborg_gnome_evolution_webdav_la_CPPFLAGS = 	\
+	$(AM_CPPFLAGS)				\
+	-I .					\
+	-I$(top_srcdir)				\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
+
 liborg_gnome_evolution_webdav_la_SOURCES = \
 	webdav-contacts-source.c
 
diff --git a/shell/Makefile.am b/shell/Makefile.am
index c1e4b11..d8eea3c 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -2,46 +2,18 @@ if ENABLE_TEST_COMPONENT
 SUBDIRS = . test
 endif
 
-AM_CPPFLAGS =							\
-	-I$(top_srcdir)/widgets					\
-	-I$(top_srcdir)/widgets/menus				\
-	-I$(top_srcdir)/widgets/misc				\
-	-I$(top_srcdir)						\
-	-I$(top_srcdir)/shell					\
-	-DEVOLUTION_BINDIR=\""$(bindir)"\"			\
-	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"		\
-	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"		\
-	-DEVOLUTION_DATADIR=\""$(datadir)"\"			\
-	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"		\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"			\
-	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"		\
-	-DEVOLUTION_MODULEDIR=\""$(moduledir)"\"		\
-	-DEVOLUTION_RULEDIR=\""$(privdatadir)"\"		\
-	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"		\
-	-DPREFIX=\""$(prefix)"\"				\
-	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
-	-DDATADIR=\""$(datadir)"\"				\
-	-DLIBDIR=\""$(datadir)"\"				\
-	-DG_LOG_DOMAIN=\"evolution-shell\"			\
-	$(TZDIALOG_CFLAGS)					\
-	$(SHELL_CFLAGS)
-
 if NM_SUPPORT
-AM_CPPFLAGS += \
+NM_CPPFLAGS = \
 	$(DBUS_GLIB_CFLAGS) \
 	$(NM_CFLAGS)
+NM_SUPPORT_FILES = e-shell-nm.c
 endif
 
+# Executable
 bin_PROGRAMS = evolution
 
-if NM_SUPPORT
-NM_SUPPORT_FILES = e-shell-nm.c
-endif
-
 # Shell library
-
-privsolib_LTLIBRARIES =	\
-	libeshell.la
+privsolib_LTLIBRARIES =	libeshell.la
 
 eshellincludedir = $(privincludedir)/shell
 
@@ -59,6 +31,32 @@ eshellinclude_HEADERS = 			\
 	e-shell-window-actions.h		\
 	es-event.h
 
+libeshell_la_CPPFLAGS =						\
+	$(AM_CPPFLAGS)						\
+	$(NM_CPPFLAGS)						\
+	-I$(top_srcdir)/widgets					\
+	-I$(top_srcdir)/widgets/menus				\
+	-I$(top_srcdir)/widgets/misc				\
+	-I$(top_srcdir)						\
+	-I$(top_srcdir)/shell					\
+	-DEVOLUTION_BINDIR=\""$(bindir)"\"			\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"		\
+	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"		\
+	-DEVOLUTION_DATADIR=\""$(datadir)"\"			\
+	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"		\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"			\
+	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"		\
+	-DEVOLUTION_MODULEDIR=\""$(moduledir)"\"		\
+	-DEVOLUTION_RULEDIR=\""$(privdatadir)"\"		\
+	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"		\
+	-DPREFIX=\""$(prefix)"\"				\
+	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
+	-DDATADIR=\""$(datadir)"\"				\
+	-DLIBDIR=\""$(datadir)"\"				\
+	-DG_LOG_DOMAIN=\"evolution-shell\"			\
+	$(TZDIALOG_CFLAGS)					\
+	$(SHELL_CFLAGS)
+
 libeshell_la_SOURCES =				\
 	$(NM_SUPPORT_FILES)			\
 	$(IDL_GENERATED)			\
@@ -99,6 +97,32 @@ if HAVE_WINDRES
 EVOLUTIONICONRC = evolution-icon.o
 endif
 
+evolution_CPPFLAGS =						\
+	$(AM_CPPFLAGS)						\
+	$(NM_CPPFLAGS)						\
+	-I$(top_srcdir)/widgets					\
+	-I$(top_srcdir)/widgets/menus				\
+	-I$(top_srcdir)/widgets/misc				\
+	-I$(top_srcdir)						\
+	-I$(top_srcdir)/shell					\
+	-DEVOLUTION_BINDIR=\""$(bindir)"\"			\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"		\
+	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"		\
+	-DEVOLUTION_DATADIR=\""$(datadir)"\"			\
+	-DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\"		\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"			\
+	-DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\"		\
+	-DEVOLUTION_MODULEDIR=\""$(moduledir)"\"		\
+	-DEVOLUTION_RULEDIR=\""$(privdatadir)"\"		\
+	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"		\
+	-DPREFIX=\""$(prefix)"\"				\
+	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
+	-DDATADIR=\""$(datadir)"\"				\
+	-DLIBDIR=\""$(datadir)"\"				\
+	-DG_LOG_DOMAIN=\"evolution-shell\"			\
+	$(TZDIALOG_CFLAGS)					\
+	$(SHELL_CFLAGS)
+
 evolution_SOURCES =				\
 	e-config-upgrade.c			\
 	e-config-upgrade.h			\
diff --git a/shell/test/Makefile.am b/shell/test/Makefile.am
index 10b1bfb..0756a47 100644
--- a/shell/test/Makefile.am
+++ b/shell/test/Makefile.am
@@ -1,6 +1,7 @@
 module_LTLIBRARIES = libevolution-module-test.la
 
-AM_CPPFLAGS =					\
+libevolution_module_test_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/shell			\
 	-I$(top_srcdir)/widgets			\
diff --git a/smclient/Makefile.am b/smclient/Makefile.am
index 4d5c63f..cbc004f 100644
--- a/smclient/Makefile.am
+++ b/smclient/Makefile.am
@@ -8,15 +8,16 @@ platform_libs = libeggdesktopfile.la -lSM -lICE
 platform_sources = eggsmclient-xsmp.c
 endif
 
-AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\""EggSMClient"\" \
-	$(platform_defines) \
-	$(EGG_SMCLIENT_CFLAGS)
-
 noinst_LTLIBRARIES = \
 	libeggsmclient.la \
 	$(platform_ltlibraries)
 
+libeggsmclient_la_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
+	-DG_LOG_DOMAIN=\""EggSMClient"\" \
+	$(platform_defines) \
+	$(EGG_SMCLIENT_CFLAGS)
+
 libeggsmclient_la_LIBADD = \
 	$(EGG_SMCLIENT_LIBS) \
 	$(platform_libs)
@@ -30,6 +31,12 @@ libeggsmclient_la_SOURCES = \
 	eggsmclient-private.h \
 	$(platform_sources)
 
+libeggdesktopfile_la_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
+	-DG_LOG_DOMAIN=\""EggSMClient"\" \
+	$(platform_defines) \
+	$(EGG_SMCLIENT_CFLAGS)
+
 libeggdesktopfile_la_LIBADD = \
 	$(EGG_SMCLIENT_LIBS)
 
diff --git a/smime/gui/Makefile.am b/smime/gui/Makefile.am
index a6a595e..97eec85 100644
--- a/smime/gui/Makefile.am
+++ b/smime/gui/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS =						\
+privsolib_LTLIBRARIES = libevolution-smime.la
+
+libevolution_smime_la_CPPFLAGS =			\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"evolution-smime\"		\
 	-I$(top_srcdir)					\
 	-I$(top_builddir)				\
@@ -18,8 +21,6 @@ AM_CPPFLAGS =						\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
 	$(CERT_UI_CFLAGS)
 
-privsolib_LTLIBRARIES = libevolution-smime.la
-
 libevolution_smime_la_SOURCES = 	\
 	ca-trust-dialog.c		\
 	ca-trust-dialog.h		\
diff --git a/smime/lib/Makefile.am b/smime/lib/Makefile.am
index 8cd547a..1ea8a30 100644
--- a/smime/lib/Makefile.am
+++ b/smime/lib/Makefile.am
@@ -1,4 +1,7 @@
-AM_CPPFLAGS =						\
+privsolib_LTLIBRARIES = libessmime.la
+
+libessmime_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)					\
 	-DG_LOG_DOMAIN=\"evolution-smime\"		\
 	-I$(top_srcdir)					\
 	-I$(top_srcdir)/shell				\
@@ -13,8 +16,6 @@ AM_CPPFLAGS =						\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
 	$(CERT_UI_CFLAGS)
 
-privsolib_LTLIBRARIES = libessmime.la
-
 libessmime_la_SOURCES = 	\
 	e-asn1-object.c		\
 	e-asn1-object.h		\
diff --git a/smime/tests/Makefile.am b/smime/tests/Makefile.am
index 777d327..762e497 100644
--- a/smime/tests/Makefile.am
+++ b/smime/tests/Makefile.am
@@ -1,7 +1,7 @@
-
 noinst_PROGRAMS=import-cert
 
-AM_CPPFLAGS=						\
+TEST_CPPFLAGS=						\
+	$(AM_CPPFLAGS)					\
 	-I$(top_srcdir)/smime/lib			\
 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)			\
 	$(CERT_UI_CFLAGS)
diff --git a/widgets/e-timezone-dialog/Makefile.am b/widgets/e-timezone-dialog/Makefile.am
index cdc88e3..d08bef1 100644
--- a/widgets/e-timezone-dialog/Makefile.am
+++ b/widgets/e-timezone-dialog/Makefile.am
@@ -1,13 +1,13 @@
-AM_CPPFLAGS =								\
+privsolib_LTLIBRARIES =	libetimezonedialog.la
+
+libetimezonedialog_la_CPPFLAGS =					\
+	$(AM_CPPFLAGS)							\
 	-I$(top_srcdir)							\
 	-I$(top_srcdir)/widgets						\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
 	-DG_LOG_DOMAIN=__FILE__						\
 	$(TZDIALOG_CFLAGS)
 
-privsolib_LTLIBRARIES =	\
-	libetimezonedialog.la
-
 libetimezonedialog_la_SOURCES =	\
 	e-timezone-dialog.c	\
 	e-timezone-dialog.h
diff --git a/widgets/menus/Makefile.am b/widgets/menus/Makefile.am
index 1aadfcc..920dae4 100644
--- a/widgets/menus/Makefile.am
+++ b/widgets/menus/Makefile.am
@@ -1,6 +1,7 @@
 privsolib_LTLIBRARIES = libmenus.la
 
-AM_CPPFLAGS =					\
+libmenus_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/widgets			\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"  \
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index ef3eba0..da75d75 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -2,18 +2,7 @@ if OS_WIN32
 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libfilter.la
 endif
 
-AM_CPPFLAGS =								\
-	-I$(top_srcdir)							\
-	-I$(top_srcdir)/filter						\
-	-I$(top_srcdir)/widgets						\
-	-DEVOLUTION_IMAGES=\""$(imagesdir)"\"				\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
-	-DG_LOG_DOMAIN=__FILE__						\
-	$(EVOLUTION_MAIL_CFLAGS)					\
-	$(GNOME_PLATFORM_CFLAGS)
-
-privsolib_LTLIBRARIES =		\
-	libemiscwidgets.la
+privsolib_LTLIBRARIES =	libemiscwidgets.la
 
 widgetsincludedir = $(privincludedir)/misc
 
@@ -92,6 +81,17 @@ widgetsinclude_HEADERS =			\
 	ea-cell-table.h				\
 	ea-widgets.h
 
+libemiscwidgets_la_CPPFLAGS =						\
+	$(AM_CPPFLAGS)							\
+	-I$(top_srcdir)							\
+	-I$(top_srcdir)/filter						\
+	-I$(top_srcdir)/widgets						\
+	-DEVOLUTION_IMAGES=\""$(imagesdir)"\"				\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
+	-DG_LOG_DOMAIN=__FILE__						\
+	$(EVOLUTION_MAIL_CFLAGS)					\
+	$(GNOME_PLATFORM_CFLAGS)
+
 libemiscwidgets_la_SOURCES =			\
 	$(widgetsinclude_HEADERS)		\
 	$(pilot_sources)			\
@@ -172,8 +172,21 @@ noinst_PROGRAMS = 			\
 	test-dateedit			\
 	test-preferences-window	
 
+test_widgets_misc_CPPFLAGS=						\
+	$(AM_CPPFLAGS)							\
+	-I$(top_srcdir)							\
+	-I$(top_srcdir)/filter						\
+	-I$(top_srcdir)/widgets						\
+	-DEVOLUTION_IMAGES=\""$(imagesdir)"\"				\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"				\
+	-DG_LOG_DOMAIN=__FILE__						\
+	$(EVOLUTION_MAIL_CFLAGS)					\
+	$(GNOME_PLATFORM_CFLAGS)
+
 # test-calendar
 
+test_calendar_CPPFLAGS = $(test_widgets_misc_CPPFLAGS)
+
 test_calendar_SOURCES = 	\
 	test-calendar.c
 
@@ -185,6 +198,8 @@ test_calendar_LDADD = 				\
 
 # test-dateedit
 
+test_dateedit_CPPFLAGS = $(test_widgets_misc_CPPFLAGS)
+
 test_dateedit_SOURCES = 	\
 	test-dateedit.c
 
@@ -196,6 +211,8 @@ test_dateedit_LDADD = 				\
 
 # test-preferences-window
 
+test_preferences_window_CPPFLAGS = $(test_widgets_misc_CPPFLAGS)
+
 test_preferences_window_SOURCES =		\
 	test-preferences-window.c
 
diff --git a/widgets/table/Makefile.am b/widgets/table/Makefile.am
index 3ff3b73..56fc72d 100644
--- a/widgets/table/Makefile.am
+++ b/widgets/table/Makefile.am
@@ -2,7 +2,10 @@ glade_DATA = 					\
 	e-table-config.glade			\
 	e-table-field-chooser.glade
 
-AM_CPPFLAGS =					\
+privsolib_LTLIBRARIES = libetable.la
+
+libetable_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/widgets			\
 	$(E_UTIL_CFLAGS)			\
@@ -11,8 +14,6 @@ AM_CPPFLAGS =					\
 	-DEVOLUTION_GLADEDIR=\"$(gladedir)\"	\
         -DG_LOG_DOMAIN=\"e-table\"
 
-privsolib_LTLIBRARIES = libetable.la
-
 libetable_la_SOURCES = 				\
 	e-cell.c				\
 	e-cell-checkbox.c			\
diff --git a/widgets/text/Makefile.am b/widgets/text/Makefile.am
index ee426f4..4c53141 100644
--- a/widgets/text/Makefile.am
+++ b/widgets/text/Makefile.am
@@ -2,16 +2,16 @@ if OS_WIN32
 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libemiscwidgets.la
 endif
 
-AM_CPPFLAGS =					\
+privsolib_LTLIBRARIES = libetext.la
+
+libetext_la_CPPFLAGS =				\
+	$(AM_CPPFLAGS)				\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/widgets			\
 	$(E_UTIL_CFLAGS)			\
 	$(GNOME_PLATFORM_CFLAGS)		\
 	-DG_LOG_DOMAIN=\"e-text\"
 
-
-privsolib_LTLIBRARIES = libetext.la
-
 libetext_la_SOURCES =				\
 	e-text-model-repos.c			\
 	e-text-model.c				\



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