summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-09-20 10:59:34 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-09-20 13:43:20 +0200
commitfb40060ac1742840eacc59abee701f00907278c2 (patch)
treec1db97333eae38d912177eca22dc6bcbfbe3d1ad
parenta87560335562f424bfc1f79095fb2982d5087cfd (diff)
downloadNetworkManager-fb40060ac1742840eacc59abee701f00907278c2.tar.gz
build: add macro to check shared objects symbols
-rw-r--r--nm.mk4
-rw-r--r--src/devices/adsl/Makefile.am4
-rw-r--r--src/devices/bluetooth/Makefile.am4
-rw-r--r--src/devices/team/Makefile.am4
-rw-r--r--src/devices/wifi/Makefile.am2
-rw-r--r--src/devices/wwan/Makefile.am7
-rw-r--r--src/settings/plugins/ibft/tests/Makefile.am4
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.am4
-rw-r--r--src/settings/plugins/ifnet/tests/Makefile.am4
-rw-r--r--src/settings/plugins/ifupdown/tests/Makefile.am4
10 files changed, 31 insertions, 10 deletions
diff --git a/nm.mk b/nm.mk
new file mode 100644
index 0000000000..b97fa4bfe3
--- /dev/null
+++ b/nm.mk
@@ -0,0 +1,4 @@
+# NetworkManager Makefile helpers
+
+check_so_symbols = \
+ LD_BIND_NOW=1 LD_PRELOAD=$(1) $(top_builddir)/src/NetworkManager --version >/dev/null
diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am
index 9075021c3e..d7f23970bc 100644
--- a/src/devices/adsl/Makefile.am
+++ b/src/devices/adsl/Makefile.am
@@ -1,5 +1,7 @@
include $(GLIB_MAKEFILE)
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
@@ -40,7 +42,7 @@ if ENABLE_TESTS
check-local:
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-adsl.so $(SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-device-plugin-adsl.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-adsl.so)
endif
diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am
index 8454702e5f..8997bf7861 100644
--- a/src/devices/bluetooth/Makefile.am
+++ b/src/devices/bluetooth/Makefile.am
@@ -1,5 +1,7 @@
include $(GLIB_MAKEFILE)
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
@@ -76,7 +78,7 @@ if ENABLE_TESTS
check-local:
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-bluetooth.so $(SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-device-plugin-bluetooth.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-bluetooth.so)
endif
diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am
index db756b4c60..00d824915d 100644
--- a/src/devices/team/Makefile.am
+++ b/src/devices/team/Makefile.am
@@ -1,5 +1,7 @@
include $(GLIB_MAKEFILE)
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
@@ -49,7 +51,7 @@ if ENABLE_TESTS
check-local:
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-team.so $(SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-device-plugin-team.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-team.so)
endif
diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am
index add0a007c4..dad6989cd1 100644
--- a/src/devices/wifi/Makefile.am
+++ b/src/devices/wifi/Makefile.am
@@ -52,7 +52,7 @@ if ENABLE_TESTS
check-local:
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-wifi.so $(SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-device-plugin-wifi.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-wifi.so)
endif
diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am
index 0d061a792e..1b117d4f3d 100644
--- a/src/devices/wwan/Makefile.am
+++ b/src/devices/wwan/Makefile.am
@@ -1,5 +1,7 @@
include $(GLIB_MAKEFILE)
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
@@ -88,9 +90,10 @@ if ENABLE_TESTS
check-local:
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-device-plugin-wwan.so $(SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-device-plugin-wwan.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-device-plugin-wwan.so)
+
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-wwan.so $(WWAN_SYMBOL_VIS_FILE)
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/.libs/libnm-wwan.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/.libs/libnm-wwan.so)
endif
diff --git a/src/settings/plugins/ibft/tests/Makefile.am b/src/settings/plugins/ibft/tests/Makefile.am
index e5cff73f58..15710f27e1 100644
--- a/src/settings/plugins/ibft/tests/Makefile.am
+++ b/src/settings/plugins/ibft/tests/Makefile.am
@@ -1,5 +1,7 @@
if ENABLE_TESTS
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
@@ -35,7 +37,7 @@ test_ibft_LDADD = \
TESTS = test-ibft
check-local:
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ibft.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/../.libs/libnm-settings-plugin-ibft.so)
endif
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
index fedbd93fa2..4a28a81a2b 100644
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
@@ -1,5 +1,7 @@
if ENABLE_TESTS
+include $(top_srcdir)/nm.mk
+
SUBDIRS=network-scripts
@GNOME_CODE_COVERAGE_RULES@
@@ -50,7 +52,7 @@ test_ifcfg_rh_utils_LDADD = \
TESTS = test-ifcfg-rh-utils test-ifcfg-rh
check-local:
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ifcfg-rh.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/../.libs/libnm-settings-plugin-ifcfg-rh.so)
endif
diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am
index 8ece14c64b..0cdcb81549 100644
--- a/src/settings/plugins/ifnet/tests/Makefile.am
+++ b/src/settings/plugins/ifnet/tests/Makefile.am
@@ -1,5 +1,7 @@
if ENABLE_TESTS
+include $(top_srcdir)/nm.mk
+
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS= \
@@ -38,7 +40,7 @@ test_ifnet_LDADD = $(top_builddir)/src/libNetworkManager.la
TESTS = test-ifnet
check-local:
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ifnet.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/../.libs/libnm-settings-plugin-ifnet.so)
endif
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am
index 3d702375b9..1dab1ce798 100644
--- a/src/settings/plugins/ifupdown/tests/Makefile.am
+++ b/src/settings/plugins/ifupdown/tests/Makefile.am
@@ -1,5 +1,7 @@
if ENABLE_TESTS
+include $(top_srcdir)/nm.mk
+
AM_CPPFLAGS = \
-I$(top_srcdir)/shared \
-I$(top_builddir)/shared \
@@ -27,7 +29,7 @@ test_ifupdown_LDADD = \
TESTS = test-ifupdown
check-local:
- LD_BIND_NOW=1 LD_PRELOAD=$(builddir)/../.libs/libnm-settings-plugin-ifupdown.so $(top_builddir)/src/NetworkManager --version >/dev/null
+ $(call check_so_symbols,$(builddir)/../.libs/libnm-settings-plugin-ifupdown.so)
endif