diff options
author | Dan Winship <danw@gnome.org> | 2013-08-22 10:47:21 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-08-22 11:49:16 -0400 |
commit | bfce3f7dc8859eef5ba46f3eec463bd591ee8686 (patch) | |
tree | 8f16f9b781ce447a2f2f22728154b3ed5979dfee | |
parent | 1a3c2ed1cb6d96bb71b2f12711281c9153f4223b (diff) | |
download | NetworkManager-bfce3f7dc8859eef5ba46f3eec463bd591ee8686.tar.gz |
build: switch from $(INCLUDES) to $(AM_CPPFLAGS) to make automake happy
Unfortunately, $(AM_CPPFLAGS) gets overridden by per-target _CPPFLAGS
variables, which $(INCLUDES) did not, so this requires some additional
changes.
In most places, I have just gotten rid of the per-target _CPPFLAGS
variables; in directories with a single target, the per-target
variable is unnecessary, and in directories with multiple targets, the
per-target variable is often undesirable, since it forces some files
to be compiled twice, even though there ends up being no difference
between the two files.
30 files changed, 168 insertions, 268 deletions
diff --git a/callouts/Makefile.am b/callouts/Makefile.am index 79f6af54a9..e3579489a0 100644 --- a/callouts/Makefile.am +++ b/callouts/Makefile.am @@ -1,5 +1,16 @@ SUBDIRS = . tests +AM_CPPFLAGS = \ + -I${top_srcdir}/include \ + -I${top_builddir}/include \ + -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + -DNMCONFDIR=\"$(nmconfdir)\" \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" + ########################################### # Test libraries ########################################### @@ -21,12 +32,6 @@ libexec_PROGRAMS = \ nm_avahi_autoipd_action_SOURCES = \ nm-avahi-autoipd-action.c -nm_avahi_autoipd_action_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" - nm_avahi_autoipd_action_LDADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) @@ -38,17 +43,6 @@ nm_dispatcher_action_SOURCES = \ nm-dispatcher-utils.c \ nm-dispatcher-utils.h -nm_dispatcher_action_CPPFLAGS = \ - -I${top_srcdir} \ - -I${top_srcdir}/include \ - -I${top_builddir}/include \ - -I${top_srcdir}/libnm-util \ - -I${top_builddir}/libnm-util \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -DNMCONFDIR=\"$(nmconfdir)\" \ - -DLIBEXECDIR=\"$(libexecdir)\" - nm_dispatcher_action_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(DBUS_LIBS) \ @@ -66,12 +60,7 @@ libtest_dispatcher_envp_la_SOURCES = \ nm-dispatcher-utils.h libtest_dispatcher_envp_la_CPPFLAGS = \ - -I${top_srcdir}/include \ - -I${top_builddir}/include \ - -I${top_srcdir}/libnm-util \ - -I${top_builddir}/libnm-util \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) + $(AM_CPPFLAGS) libtest_dispatcher_envp_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/callouts/tests/Makefile.am b/callouts/tests/Makefile.am index e8a13fc6ea..3243d9efef 100644 --- a/callouts/tests/Makefile.am +++ b/callouts/tests/Makefile.am @@ -1,11 +1,13 @@ if ENABLE_TESTS -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I${top_builddir}/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/callouts + -I$(top_srcdir)/callouts \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = \ test-dispatcher-envp @@ -15,10 +17,6 @@ noinst_PROGRAMS = \ test_dispatcher_envp_SOURCES = \ test-dispatcher-envp.c -test_dispatcher_envp_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_dispatcher_envp_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/callouts/libtest-dispatcher-envp.la \ diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am index 0f379c10d9..17b163cb51 100644 --- a/cli/src/Makefile.am +++ b/cli/src/Makefile.am @@ -1,13 +1,16 @@ bin_PROGRAMS = \ nmcli -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_builddir}/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-glib + -I${top_srcdir}/libnm-glib \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DNMCLI_LOCALEDIR=\"$(datadir)/locale\" nmcli_SOURCES = \ common.c \ @@ -25,11 +28,6 @@ nmcli_SOURCES = \ utils.c \ utils.h -nmcli_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -DNMCLI_LOCALEDIR=\"$(datadir)/locale\" - nmcli_LDADD = \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ diff --git a/examples/C/glib/Makefile.am b/examples/C/glib/Makefile.am index 1511f60765..1f4785dad8 100644 --- a/examples/C/glib/Makefile.am +++ b/examples/C/glib/Makefile.am @@ -1,10 +1,9 @@ -INCLUDES = -I${top_srcdir}/libnm-util \ - -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-glib \ - -I${top_srcdir}/include \ - -I${top_builddir}/include - AM_CPPFLAGS = \ + -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-util \ + -I${top_srcdir}/libnm-glib \ + -I${top_srcdir}/include \ + -I${top_builddir}/include \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) diff --git a/examples/C/qt/Makefile.am b/examples/C/qt/Makefile.am index a0cf8f4dbb..15b6bf4521 100644 --- a/examples/C/qt/Makefile.am +++ b/examples/C/qt/Makefile.am @@ -1,7 +1,6 @@ -INCLUDES = -I${top_srcdir}/include \ - -I${top_builddir}/include - AM_CPPFLAGS = \ + -I${top_srcdir}/include \ + -I${top_builddir}/include \ $(DBUS_CFLAGS) \ $(QT_CFLAGS) diff --git a/libnm-glib/Makefile.am b/libnm-glib/Makefile.am index c4f8299d54..165b03f6a4 100644 --- a/libnm-glib/Makefile.am +++ b/libnm-glib/Makefile.am @@ -2,11 +2,13 @@ include $(GLIB_MAKEFILE) SUBDIRS = . tests -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) BUILT_SOURCES = \ nm-vpn-plugin-glue.h \ @@ -26,8 +28,7 @@ libdeprecated_nm_glib_la_SOURCES = \ libnm_glib.c libdeprecated_nm_glib_la_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ + $(AM_CPPFLAGS) \ -Wno-deprecated-declarations \ -Wno-deprecated @@ -222,7 +223,7 @@ NMClient-1.0.gir: libnm-glib.la NMClient_1_0_gir_INCLUDES = Gio-2.0 DBusGLib-1.0 NMClient_1_0_gir_PACKAGES = gio-2.0 dbus-glib-1 gudev-1.0 NMClient_1_0_gir_EXPORT_PACKAGES = libnm-glib libnm-glib-vpn -NMClient_1_0_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/libnm-glib -I$(top_srcdir)/libnm-util +NMClient_1_0_gir_CFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/libnm-glib -I$(top_srcdir)/libnm-util NMClient_1_0_gir_LIBS = libnm-glib.la $(top_builddir)/libnm-util/libnm-util.la NMClient_1_0_gir_FILES = $(introspection_sources) NMClient_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=NM --symbol-prefix=nm --include-uninstalled=$(top_builddir)/libnm-util/NetworkManager-1.0.gir diff --git a/libnm-glib/tests/Makefile.am b/libnm-glib/tests/Makefile.am index 5fda5bd269..ebad96fa7b 100644 --- a/libnm-glib/tests/Makefile.am +++ b/libnm-glib/tests/Makefile.am @@ -1,11 +1,13 @@ if ENABLE_TESTS -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/libnm-glib + -I$(top_srcdir)/libnm-glib \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = test-remote-settings-client @@ -14,10 +16,6 @@ noinst_PROGRAMS = test-remote-settings-client test_remote_settings_client_SOURCES = \ test-remote-settings-client.c -test_remote_settings_client_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_remote_settings_client_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/libnm-glib/libnm-glib-test.la \ diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index 554b4a4b1b..24ddacbeb5 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -2,15 +2,24 @@ include $(GLIB_MAKEFILE) SUBDIRS = . tests -INCLUDES = -I${top_srcdir} -I${top_srcdir}/include -I${top_builddir}/include - -lib_LTLIBRARIES=libnm-util.la - -libnm_util_la_CPPFLAGS = \ +AM_CPPFLAGS = \ + -I${top_srcdir} \ + -I${top_srcdir}/include \ + -I${top_builddir}/include \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ $(UUID_CFLAGS) +if WITH_GNUTLS +AM_CPPFLAGS += $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS) +endif + +if WITH_NSS +AM_CPPFLAGS += $(NSS_CFLAGS) +endif + +lib_LTLIBRARIES=libnm-util.la + libnm_util_include_HEADERS = \ nm-connection.h \ nm-setting.h \ @@ -101,13 +110,11 @@ libnm_util_la_LDFLAGS = -Wl,--version-script=$(SYMBOL_VIS_FILE) \ if WITH_GNUTLS libnm_util_la_SOURCES += crypto_gnutls.c -libnm_util_la_CPPFLAGS += $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS) libnm_util_la_LIBADD += $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS) endif if WITH_NSS libnm_util_la_SOURCES += crypto_nss.c -libnm_util_la_CPPFLAGS += $(NSS_CFLAGS) libnm_util_la_LIBADD += $(NSS_LIBS) endif @@ -122,21 +129,16 @@ noinst_LTLIBRARIES = libtest-crypto.la libtest_crypto_la_SOURCES = crypto.c -libtest_crypto_la_CPPFLAGS = \ - $(GLIB_CFLAGS) - libtest_crypto_la_LIBADD = \ $(GLIB_LIBS) if WITH_GNUTLS libtest_crypto_la_SOURCES += crypto_gnutls.c -libtest_crypto_la_CPPFLAGS += $(LIBGCRYPT_CFLAGS) $(GNUTLS_CFLAGS) libtest_crypto_la_LIBADD += $(LIBGCRYPT_LIBS) $(GNUTLS_LIBS) endif if WITH_NSS libtest_crypto_la_SOURCES += crypto_nss.c -libtest_crypto_la_CPPFLAGS += $(NSS_CFLAGS) libtest_crypto_la_LIBADD += $(NSS_LIBS) endif @@ -160,7 +162,7 @@ NetworkManager-1.0.gir: libnm-util.la NetworkManager_1_0_gir_INCLUDES = GObject-2.0 DBusGLib-1.0 NetworkManager_1_0_gir_PACKAGES = gobject-2.0 dbus-glib-1 NetworkManager_1_0_gir_EXPORT_PACKAGES = libnm-util -NetworkManager_1_0_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/libnm-util +NetworkManager_1_0_gir_CFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/libnm-util NetworkManager_1_0_gir_LIBS = libnm-util.la NetworkManager_1_0_gir_FILES = $(introspection_sources) NetworkManager_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=NM --symbol-prefix=nm diff --git a/libnm-util/tests/Makefile.am b/libnm-util/tests/Makefile.am index 98f8aad85d..45690c4f8b 100644 --- a/libnm-util/tests/Makefile.am +++ b/libnm-util/tests/Makefile.am @@ -2,11 +2,14 @@ if ENABLE_TESTS SUBDIRS=certs -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-util/tests/certs/\" noinst_PROGRAMS = \ test-settings-defaults \ @@ -18,10 +21,6 @@ noinst_PROGRAMS = \ test_settings_defaults_SOURCES = \ test-settings-defaults.c -test_settings_defaults_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_settings_defaults_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ @@ -30,9 +29,6 @@ test_settings_defaults_LDADD = \ test_crypto_SOURCES = \ test-crypto.c -test_crypto_CPPFLAGS = \ - $(GLIB_CFLAGS) - test_crypto_LDADD = \ $(top_builddir)/libnm-util/libtest-crypto.la \ $(top_builddir)/libnm-util/libnm-util.la \ @@ -41,11 +37,6 @@ test_crypto_LDADD = \ test_secrets_SOURCES = \ test-secrets.c -test_secrets_CPPFLAGS = \ - -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-util/tests/certs/\" \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_secrets_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ @@ -54,10 +45,6 @@ test_secrets_LDADD = \ test_general_SOURCES = \ test-general.c -test_general_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_general_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ @@ -66,10 +53,6 @@ test_general_LDADD = \ test_setting_8021x_SOURCES = \ test-setting-8021x.c -test_setting_8021x_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_setting_8021x_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ diff --git a/src/Makefile.am b/src/Makefile.am index c90c12c973..a4ff0ef011 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ SUBDIRS += \ tests endif -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I${top_srcdir}/libgsystem \ @@ -33,7 +33,7 @@ INCLUDES = \ # add each subdirectory that contains a libNM source file. $(sort) is being used # primarily for its side effect of removing duplicates. -INCLUDES += $(foreach d,$(sort $(dir $(libNetworkManager_la_SOURCES))),-I$(top_srcdir)/src/$d) +AM_CPPFLAGS += $(foreach d,$(sort $(dir $(libNetworkManager_la_SOURCES))),-I$(top_srcdir)/src/$d) ########################################### # NetworkManager @@ -303,7 +303,7 @@ GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM nm_enum_types_sources = $(nm_sources) if WITH_WIMAX nm_enum_types_sources += devices/wimax/nm-device-wimax.h -INCLUDES += -I$(top_srcdir)/src/devices/wimax +AM_CPPFLAGS += -I$(top_srcdir)/src/devices/wimax endif BUILT_SOURCES = $(GLIB_GENERATED) @@ -346,7 +346,7 @@ BUILT_SOURCES += $(glue_sources) $(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $< -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(BLUEZ_CFLAGS) \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ diff --git a/src/config/tests/Makefile.am b/src/config/tests/Makefile.am index 1846eaeec5..88601b3a79 100644 --- a/src/config/tests/Makefile.am +++ b/src/config/tests/Makefile.am @@ -1,9 +1,11 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/src/config + -I$(top_srcdir)/src/config \ + $(GLIB_CFLAGS) \ + -DSRCDIR=\""$(srcdir)"\" noinst_PROGRAMS = \ test-config @@ -13,10 +15,6 @@ test_config_SOURCES = \ nm-test-device.h \ test-config.c -test_config_CPPFLAGS = \ - -DSRCDIR=\""$(srcdir)"\" \ - $(GLIB_CFLAGS) - test_config_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/src/devices/wimax/Makefile.am b/src/devices/wimax/Makefile.am index 0f2b635b5f..80a93b5be7 100644 --- a/src/devices/wimax/Makefile.am +++ b/src/devices/wimax/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ -I${top_srcdir}/src/logging \ @@ -7,7 +7,11 @@ INCLUDES = \ -I${top_builddir}/include \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-util + -I${top_srcdir}/libnm-util \ + $(DBUS_CFLAGS) \ + $(IWMX_SDK_CFLAGS) \ + $(LIBNL_CFLAGS) \ + $(GUDEV_CFLAGS) pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la @@ -23,12 +27,6 @@ libnm_device_plugin_wimax_la_SOURCES = \ iwmxsdk.c \ iwmxsdk.h -libnm_device_plugin_wimax_la_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(IWMX_SDK_CFLAGS) \ - $(LIBNL_CFLAGS) \ - $(GUDEV_CFLAGS) - libnm_device_plugin_wimax_la_LDFLAGS = -module -avoid-version libnm_device_plugin_wimax_la_LIBADD = \ $(DBUS_LIBS) \ diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am index e9b958fbbc..7698d09e86 100644 --- a/src/dhcp-manager/tests/Makefile.am +++ b/src/dhcp-manager/tests/Makefile.am @@ -1,9 +1,11 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/libnm-util \ - -I$(top_srcdir)/src/dhcp-manager + -I$(top_srcdir)/src/dhcp-manager \ + $(GLIB_CFLAGS) \ + -DTESTDIR="\"$(abs_srcdir)\"" noinst_PROGRAMS = test-dhcp-dhclient @@ -12,10 +14,6 @@ noinst_PROGRAMS = test-dhcp-dhclient test_dhcp_dhclient_SOURCES = \ test-dhcp-dhclient.c -test_dhcp_dhclient_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - -DTESTDIR="\"$(abs_srcdir)\"" - test_dhcp_dhclient_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/src/platform/tests/Makefile.am b/src/platform/tests/Makefile.am index da9986ffe3..68e77bfe84 100644 --- a/src/platform/tests/Makefile.am +++ b/src/platform/tests/Makefile.am @@ -38,15 +38,12 @@ noinst_PROGRAMS = \ EXTRA_DIST = test-common.h monitor_SOURCES = monitor.c $(PLATFORM_SOURCES) -monitor_CPPFLAGS = $(AM_CPPFLAGS) monitor_LDADD = $(PLATFORM_LDADD) dump_SOURCES = dump.c $(PLATFORM_SOURCES) -dump_CPPFLAGS = $(AM_CPPFLAGS) dump_LDADD = $(PLATFORM_LDADD) platform_SOURCES = platform.c $(PLATFORM_SOURCES) -platform_CPPFLAGS = $(AM_CPPFLAGS) platform_LDADD = $(PLATFORM_LDADD) test_link_fake_SOURCES = test-link.c $(TEST_SOURCES) diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am index 55f1c683cf..51d5860c8d 100644 --- a/src/ppp-manager/Makefile.am +++ b/src/ppp-manager/Makefile.am @@ -1,8 +1,10 @@ if WITH_PPP -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_builddir}/include \ - -I${top_srcdir}/include + -I${top_srcdir}/include \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) pppd_plugindir = $(PPPD_PLUGIN_DIR) pppd_plugin_LTLIBRARIES = nm-pppd-plugin.la @@ -12,10 +14,6 @@ nm_pppd_plugin_la_SOURCES = \ nm-pppd-plugin.h \ nm-ppp-status.h -nm_pppd_plugin_la_CPPFLAGS = \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) - nm_pppd_plugin_la_LDFLAGS = -module -avoid-version nm_pppd_plugin_la_LIBADD = \ diff --git a/src/settings/plugins/example/Makefile.am b/src/settings/plugins/example/Makefile.am index d5832d8ee7..8cb7adebf2 100644 --- a/src/settings/plugins/example/Makefile.am +++ b/src/settings/plugins/example/Makefile.am @@ -1,10 +1,13 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + -DNMCONFDIR=\"$(nmconfdir)\" # 'noinst' here because this is an example plugin we don't want to install noinst_LTLIBRARIES = libnm-settings-plugin-example.la @@ -24,11 +27,6 @@ libnm_settings_plugin_example_la_SOURCES = \ reader.c \ writer.c -libnm_settings_plugin_example_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DNMCONFDIR=\"$(nmconfdir)\" - libnm_settings_plugin_example_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am index 49b115c992..7d1684586e 100644 --- a/src/settings/plugins/ifcfg-rh/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/Makefile.am @@ -24,7 +24,7 @@ libifcfg_rh_io_la_SOURCES = \ utils.c \ utils.h -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src/wifi \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/src/posix-signals \ @@ -33,9 +33,7 @@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util - -libifcfg_rh_io_la_CPPFLAGS = \ + -I$(top_builddir)/libnm-util \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ $(NSS_CFLAGS) \ @@ -48,11 +46,6 @@ libnm_settings_plugin_ifcfg_rh_la_SOURCES = \ nm-ifcfg-connection.c \ nm-ifcfg-connection.h -libnm_settings_plugin_ifcfg_rh_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" - libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifcfg_rh_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am index 4f9a8d177c..6e67fe008c 100644 --- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am @@ -16,7 +16,11 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/src/wifi \ -I$(top_srcdir)/src/posix-signals \ - -I$(srcdir)/../ + -I$(srcdir)/../ \ + -DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \ + -DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \ + -DSYSCONFDIR=\"nonexistent\" \ + -DSBINDIR=\"nonexistent\" AM_LDFLAGS = \ $(GLIB_LIBS) \ @@ -37,13 +41,6 @@ test_ifcfg_rh_SOURCES = \ ../utils.c \ ../writer.c -test_ifcfg_rh_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - -DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \ - -DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \ - -DSYSCONFDIR=\"nonexistent\" \ - -DSBINDIR=\"nonexistent\" - test_ifcfg_rh_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/src/settings/plugins/ifcfg-suse/Makefile.am b/src/settings/plugins/ifcfg-suse/Makefile.am index 6b14bfe20b..e9f3b6f094 100644 --- a/src/settings/plugins/ifcfg-suse/Makefile.am +++ b/src/settings/plugins/ifcfg-suse/Makefile.am @@ -1,11 +1,4 @@ - -pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-suse.la - -libnm_settings_plugin_ifcfg_suse_la_SOURCES = \ - plugin.c \ - plugin.h - -libnm_settings_plugin_ifcfg_suse_la_CPPFLAGS = \ +AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ -I${top_srcdir}/src/settings \ @@ -15,6 +8,12 @@ libnm_settings_plugin_ifcfg_suse_la_CPPFLAGS = \ -I$(top_srcdir)/libnm-glib \ -DSYSCONFDIR=\"$(sysconfdir)\" +pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-suse.la + +libnm_settings_plugin_ifcfg_suse_la_SOURCES = \ + plugin.c \ + plugin.h + libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifcfg_suse_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am index ed387e583a..55e2f05b74 100644 --- a/src/settings/plugins/ifnet/Makefile.am +++ b/src/settings/plugins/ifnet/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = . tests @GNOME_CODE_COVERAGE_RULES@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/wifi \ -I$(top_srcdir)/src/settings \ @@ -10,7 +10,12 @@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(GUDEV_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" + -DSBINDIR=\"$(sbindir)\" pkglib_LTLIBRARIES = libnm-settings-plugin-ifnet.la @@ -22,12 +27,6 @@ libnm_settings_plugin_ifnet_la_SOURCES = \ plugin.c \ plugin.h -libnm_settings_plugin_ifnet_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(GUDEV_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" - libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifnet_la_LIBADD = \ @@ -49,12 +48,6 @@ lib_ifnet_io_la_SOURCES = \ errors.h \ errors.c -lib_ifnet_io_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DSBINDIR=\"$(sbindir)\" - lib_ifnet_io_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am index f3dc6cbe27..1f908046f5 100644 --- a/src/settings/plugins/ifnet/tests/Makefile.am +++ b/src/settings/plugins/ifnet/tests/Makefile.am @@ -2,15 +2,21 @@ if ENABLE_TESTS @GNOME_CODE_COVERAGE_RULES@ -INCLUDES=-I$(srcdir)/../ \ - -I$(top_srcdir)/libnm-glib \ - -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/src/config \ - -I$(top_srcdir)/src/settings \ - -I$(top_srcdir)/src/wifi +AM_CPPFLAGS= \ + -I$(srcdir)/../ \ + -I$(top_srcdir)/libnm-glib \ + -I$(top_srcdir)/libnm-util \ + -I$(top_builddir)/libnm-util \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/src/config \ + -I$(top_srcdir)/src/settings \ + -I$(top_srcdir)/src/wifi \ + $(CHECK_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) \ + -DTEST_WPA_SUPPLICANT_CONF='"$(srcdir)/wpa_supplicant.conf"' \ + -DSYSCONFDIR=\"nonexistent\" noinst_PROGRAMS = check_ifnet check_ifnet_SOURCES = \ @@ -21,13 +27,6 @@ check_ifnet_SOURCES = \ ../wpa_parser.c \ ../errors.c -check_ifnet_CPPFLAGS = \ - $(CHECK_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(CODE_COVERAGE_CFLAGS) \ - -DTEST_WPA_SUPPLICANT_CONF='"$(srcdir)/wpa_supplicant.conf"' \ - -DSYSCONFDIR=\"nonexistent\" - check_ifnet_LDFLAGS = \ $(CODE_COVERAGE_LDFLAGS) diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am index 2942b140ff..c8a7c0ac8d 100644 --- a/src/settings/plugins/ifupdown/Makefile.am +++ b/src/settings/plugins/ifupdown/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = . tests @GNOME_CODE_COVERAGE_RULES@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/settings \ @@ -10,7 +10,11 @@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(GUDEV_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" noinst_LTLIBRARIES = libifupdown-io.la @@ -20,11 +24,6 @@ libifupdown_io_la_SOURCES = \ parser.c \ parser.h -libifupdown_io_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" - libifupdown_io_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) @@ -37,12 +36,6 @@ libnm_settings_plugin_ifupdown_la_SOURCES = \ plugin.c \ plugin.h -libnm_settings_plugin_ifupdown_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(GUDEV_CFLAGS) \ - -DSYSCONFDIR=\"$(sysconfdir)\" - libnm_settings_plugin_ifupdown_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifupdown_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am index ec5e5dbfc8..4654691636 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.am +++ b/src/settings/plugins/ifupdown/tests/Makefile.am @@ -1,13 +1,16 @@ if ENABLE_TESTS -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/src/settings \ - -I$(srcdir)/../ + -I$(srcdir)/../ \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + -DTEST_ENI_DIR=\"$(abs_srcdir)\" noinst_PROGRAMS = test-ifupdown @@ -16,11 +19,6 @@ test_ifupdown_SOURCES = \ ../interface_parser.c \ ../parser.c -test_ifupdown_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DTEST_ENI_DIR=\"$(abs_srcdir)\" - test_ifupdown_LDADD = \ $(top_builddir)/libnm-glib/libnm-glib.la \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am index 90965a1eac..e975cabd28 100644 --- a/src/settings/plugins/keyfile/Makefile.am +++ b/src/settings/plugins/keyfile/Makefile.am @@ -2,13 +2,16 @@ SUBDIRS = . tests @GNOME_CODE_COVERAGE_RULES@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src/config \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + -DNMCONFDIR=\"$(nmconfdir)\" noinst_LTLIBRARIES = \ libkeyfile-io.la \ @@ -26,11 +29,6 @@ libkeyfile_io_la_SOURCES = \ utils.h \ common.h -libkeyfile_io_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DNMCONFDIR=\"$(nmconfdir)\" - libkeyfile_io_la_LIBADD = $(GLIB_LIBS) ##################################### @@ -41,11 +39,6 @@ libnm_settings_plugin_keyfile_la_SOURCES = \ plugin.c \ plugin.h -libnm_settings_plugin_keyfile_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DNMCONFDIR=\"$(nmconfdir)\" - libnm_settings_plugin_keyfile_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ libkeyfile-io.la \ diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am index 0d0f239e89..56a051f40d 100644 --- a/src/settings/plugins/keyfile/tests/Makefile.am +++ b/src/settings/plugins/keyfile/tests/Makefile.am @@ -4,14 +4,20 @@ SUBDIRS=keyfiles @GNOME_CODE_COVERAGE_RULES@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/libnm-glib \ -I$(top_srcdir)/src/settings \ - -I$(srcdir)/../ + -I$(srcdir)/../ \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(CODE_COVERAGE_CFLAGS) \ + -DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \ + -DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \ + -DNMCONFDIR=\"nonexistent\" noinst_PROGRAMS = test-keyfile @@ -22,14 +28,6 @@ test_keyfile_SOURCES = \ ../errors.c \ ../utils.c -test_keyfile_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(CODE_COVERAGE_CFLAGS) \ - -DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \ - -DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \ - -DNMCONFDIR=\"nonexistent\" - test_keyfile_LDADD = \ $(top_builddir)/libnm-glib/libnm-glib.la \ $(top_builddir)/libnm-util/libnm-util.la \ diff --git a/src/settings/tests/Makefile.am b/src/settings/tests/Makefile.am index 1796b2aa2b..059914b371 100644 --- a/src/settings/tests/Makefile.am +++ b/src/settings/tests/Makefile.am @@ -1,8 +1,10 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_srcdir)/src/settings + -I$(top_srcdir)/src/settings \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = \ test-wired-defname @@ -12,10 +14,6 @@ noinst_PROGRAMS = \ test_wired_defname_SOURCES = \ test-wired-defname.c -test_wired_defname_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_wired_defname_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/src/supplicant-manager/tests/Makefile.am b/src/supplicant-manager/tests/Makefile.am index baa493b875..8e772b2e3d 100644 --- a/src/supplicant-manager/tests/Makefile.am +++ b/src/supplicant-manager/tests/Makefile.am @@ -1,20 +1,18 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ -I$(top_builddir)/libnm-util \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/supplicant-manager + -I$(top_srcdir)/src/supplicant-manager \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = test-supplicant-config test_supplicant_config_SOURCES = \ test-supplicant-config.c -test_supplicant_config_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_supplicant_config_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 2132b38fb4..8a7ecc6781 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ @@ -6,7 +6,9 @@ INCLUDES = \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/dhcp-manager \ -I$(top_srcdir)/src \ - -I$(top_builddir)/src + -I$(top_builddir)/src \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = \ test-dhcp-options \ @@ -20,8 +22,7 @@ test_dhcp_options_SOURCES = \ test-dhcp-options.c test_dhcp_options_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ + $(AM_CPPFLAGS) \ -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" @@ -33,9 +34,6 @@ test_dhcp_options_LDADD = \ test_policy_hosts_SOURCES = \ test-policy-hosts.c -test_policy_hosts_CPPFLAGS = \ - $(GLIB_CFLAGS) - test_policy_hosts_LDADD = \ $(top_builddir)/src/libNetworkManager.la @@ -44,10 +42,6 @@ test_policy_hosts_LDADD = \ test_wifi_ap_utils_SOURCES = \ test-wifi-ap-utils.c -test_wifi_ap_utils_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_wifi_ap_utils_LDADD = \ $(top_builddir)/src/libNetworkManager.la @@ -56,10 +50,6 @@ test_wifi_ap_utils_LDADD = \ test_ip4_config_SOURCES = \ test-ip4-config.c -test_ip4_config_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - test_ip4_config_LDADD = \ $(top_builddir)/src/libNetworkManager.la diff --git a/test/Makefile.am b/test/Makefile.am index 19c46ec6f6..0e3e230286 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,11 +1,10 @@ -INCLUDES = -I${top_srcdir} \ - -I${top_srcdir}/libnm-util \ - -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-glib \ - -I${top_srcdir}/include \ - -I${top_builddir}/include - AM_CPPFLAGS = \ + -I${top_srcdir} \ + -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-util \ + -I${top_srcdir}/libnm-glib \ + -I${top_srcdir}/include \ + -I${top_builddir}/include \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ -DBINDIR=\"$(bindir)\" \ diff --git a/tools/Makefile.am b/tools/Makefile.am index a6c14ef807..812100c529 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,10 +1,12 @@ GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util + -I$(top_builddir)/libnm-util \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) noinst_PROGRAMS = \ generate-settings-spec @@ -12,10 +14,6 @@ noinst_PROGRAMS = \ generate_settings_spec_SOURCES = \ $(GENERATE_SETTINGS_SPEC_SOURCE) -generate_settings_spec_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - generate_settings_spec_LDADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(GLIB_LIBS) \ |