diff options
author | 2015-12-12 14:40:59 +0100 | |
---|---|---|
committer | 2015-12-13 18:18:27 +0100 | |
commit | a0d4a1a6d1b81b132787e382ac3f8487b71cf52c (patch) | |
tree | aabeaa39e8b0e6db087e993c9acecadbf84811b7 /vpp/Makefile.am | |
parent | 29726ab117a1fc5b3d92d1afaaaaa08ef7f138eb (diff) |
new version handling
Change-Id: I90983f3df94a3b28199908b29ffd8f827ab0c379
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vpp/Makefile.am')
-rw-r--r-- | vpp/Makefile.am | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/vpp/Makefile.am b/vpp/Makefile.am index eef0ff6f..1e3bbf08 100644 --- a/vpp/Makefile.am +++ b/vpp/Makefile.am @@ -49,18 +49,16 @@ nobase_include_HEADERS = \ apidir = $(prefix)/api api_DATA = api/vpe.api -BUILT_SOURCES += api/vpe.api.h app/version.c - -.PHONY: app/version.c - -app/version.c: - @pushd ../../../vpp ; \ - branch=`git rev-parse --abbrev-ref HEAD` ; \ - popd ; \ - if [ x$$GITTAG = "x" ] ; then \ - GITTAG=$$USER-private ; \ - fi ; \ - vppversion -p vpe -b $${branch}@$${GITTAG} -o $@ +BUILT_SOURCES += api/vpe.api.h app/version.h + +.PHONY: app/version.h + +app/version.h: ../build-root/scripts/version + @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@ + @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@ + @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@ + @echo "#define VPP_BUILD_TOPDIR \"$$(git rev-parse --show-toplevel)\"" >> $@ + @echo "#define VPP_BUILD_VER \"$$(../../scripts/version)\"" >> $@ vpe_LDADD = -lvlibapi -lvlibmemory -lvlib_unix -lvlib |