X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=mk%2Frte.sdkconfig.mk;h=f538649f228ae1bc01a4a0d47c83954d2fc4cee7;hb=a617494eeb01ff3839e61a6b21259fbb19b1218b;hp=c79bec1795d9e25d003ebbbd2c7e5b466a83cc0a;hpb=218c4e68c1d9bd4a9281bc1dc4d0ab89859083bf;p=dpdk.git diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index c79bec1795..f538649f22 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -3,23 +3,11 @@ .PHONY: showversion showversion: - @set -- \ - $$(sed -rne 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \ - -e 's,^#define RTE_VER_SUFFIX[[:space:]]+"(.*)",\1,p' \ - $(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h) ;\ - printf '%d.%02d.%d' "$$1" "$$2" "$$3"; \ - if [ -z "$$5" ]; then echo; \ - else printf '%s' "$$4"; \ - if [ $$5 -lt 16 ] ; then echo $$5; \ - else echo $$(($$5 - 16)); fi; \ - fi + @cat $(RTE_SRCDIR)/VERSION .PHONY: showversionum showversionum: - @set -- \ - $$(sed -rne 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \ - $(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h); \ - printf '%02d%02d\n' "$$1" "$$2" + @cat $(RTE_SRCDIR)/VERSION | awk -F '.' '{print $$1$$2}' INSTALL_CONFIGS := $(sort $(filter-out %app-icc,$(filter-out %app-clang,\ $(filter-out %app-gcc,$(filter-out %~,\ @@ -86,9 +74,16 @@ else # To do so the temp config is checked for duplicate keys with cut/sort/uniq # Then for each of those identified duplicates as long as there are more than # just one left the last match is removed. +# Part of the config includes the version information taken from "VERSION" +# in the repo. This needs to be split into the various parts using sed and awk. +# To ensure correct version comparison, we append ".99" to the version number +# so that the version of a release is higher than that of its rc's. $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE | $(RTE_OUTPUT) $(Q)if [ "$(RTE_CONFIG_TEMPLATE)" != "" -a -f "$(RTE_CONFIG_TEMPLATE)" ]; then \ $(CPP) -undef -P -x assembler-with-cpp \ + `cat $(RTE_SRCDIR)/VERSION | \ + sed -e 's/-rc/.-rc./' -e 's/$$/..99/' | \ + awk -F '.' '{print "-D__YEAR="int($$1), "-D__MONTH="int($$2), "-D__MINOR="int($$3), "-D__SUFFIX=\""$$4"\"", "-D__RELEASE="int($$5)}'` \ -ffreestanding \ -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \ config=$$(cat $(RTE_OUTPUT)/.config_tmp) ; \