aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp.am
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-01-08 15:34:50 +0100
committerDamjan Marion <damarion@cisco.com>2017-01-08 16:50:19 +0100
commit45a00c44d1dd893474819e88a7d7eed1c7947c4d (patch)
treecdcef90e5e59cd761caa28a924f5ad6d1459a313 /src/vpp.am
parentf935e336db1282c1ec67cf703db2d3cfaec32915 (diff)
Multiple Autotools improvements
- Defines some dependencies between shared libraries - updates version.h only when version changes Updating version.h on each "make" and "make install" was causing issues with parallel builds. "make install" was re-linking vpp binary due to "updated" version.h and in parallel it was re-linking shared libraries as part of installation process. That was resulting on sporadic build failures. Change-Id: I2a27ae1aea6a7a4100822018e095a60dd48d39ca Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vpp.am')
-rw-r--r--src/vpp.am33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/vpp.am b/src/vpp.am
index 77010e1f36a..3bb2c1beaae 100644
--- a/src/vpp.am
+++ b/src/vpp.am
@@ -44,19 +44,30 @@ nobase_include_HEADERS += \
API_FILES += vpp/api/vpe.api
-BUILT_SOURCES += vpp/app/version.h
+BUILT_SOURCES += .version
vpp/app/version.o: vpp/app/version.h
-.PHONY: vpp/app/version.h
+.PHONY: .version
+
+VPP_VERSION = $(shell $(srcdir)/scripts/version)
+
+# update version.h only when version changes, to avoid
+# unnecessary re-linking of vpp binary
+
+.version:
+ @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \
+ f="vpp/app/version.h" ;\
+ echo " VERSION $$f ($(VPP_VERSION))" ;\
+ echo $(VPP_VERSION) > .version ;\
+ echo "#define VPP_BUILD_DATE \"$$(date)\"" > $$f ;\
+ echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $$f ;\
+ echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $$f ;\
+ echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\
+ echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\
+ echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
+ fi
-vpp/app/version.h:
- @echo " VERSION " $@
- @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@
- @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@
- @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@
- @echo "#define VPP_BUILD_TOPDIR \"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $@
- @echo "#define VPP_BUILD_VER \"$$($(srcdir)/scripts/version)\"" >> $@
# Generate a plugin configuration script. Misconfiguring a
# plugin can cause very subtle problems.
@@ -103,10 +114,6 @@ bin_vpp_LDADD = \
bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS)
bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD)
-if WITH_IPV6SR
- bin_vpp_LDADD += -lcrypto
-endif
-
noinst_PROGRAMS += bin/test_client
bin_test_client_SOURCES = \