diff options
author | Marco Varlese <marco.varlese@suse.com> | 2017-05-03 17:37:46 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-05-10 15:53:39 +0000 |
commit | df82ec8fe7d91467c8b479bba74c761c0a6ffc59 (patch) | |
tree | 223735b25692ad6668949d73acb205819ddc9347 /src/vpp.am | |
parent | e3a395c8406a292becb719495052374449fcd152 (diff) |
Make reproducible build possible
For downstream consumption is important to have a way to specify the date or
the user or the hostname to particular values so to have reproducible builds
and/or packages.
Change-Id: I134288662b6cfbbe26bba7d8bc6be8511b34360c
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vpp.am')
-rw-r--r-- | src/vpp.am | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vpp.am b/src/vpp.am index d8b3e4ec205..1c95949aa3a 100644 --- a/src/vpp.am +++ b/src/vpp.am @@ -54,6 +54,10 @@ vpp/app/version.o: vpp/app/version.h VPP_VERSION = $(shell $(srcdir)/scripts/version) +VPP_BUILD_DATE ?= $$(date) +VPP_BUILD_USER ?= $$(whoami) +VPP_BUILD_HOST ?= $$(hostname) + # update version.h only when version changes, to avoid # unnecessary re-linking of vpp binary @@ -62,9 +66,9 @@ VPP_VERSION = $(shell $(srcdir)/scripts/version) 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 "#define VPP_BUILD_DATE \"$(VPP_BUILD_DATE)\"" > $$f ;\ + echo "#define VPP_BUILD_USER \"$(VPP_BUILD_USER)\"" >> $$f ;\ + echo "#define VPP_BUILD_HOST \"$(VPP_BUILD_HOST)\"" >> $$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 ;\ |