From: Thomas Monjalon Date: Tue, 22 Sep 2015 14:49:23 +0000 (+0200) Subject: mk: show version as a decimal integer X-Git-Tag: spdx-start~7042 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f795c1e66e344d9c4715b1a617658c16e4644b71;p=dpdk.git mk: show version as a decimal integer In order to ease packaging support of changes in DPDK build system, introduce a decimal integer to compare version numbers. It does not show the minor numbers as it is not meaningful for packaging. Usage for DPDK 16.04: % make showversionum 1604 Signed-off-by: Thomas Monjalon --- diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 564a5c3327..a3acfe64f9 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -42,6 +42,13 @@ showversion: else echo $$(($$5 - 16)); fi; \ fi +.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" + INSTALL_CONFIGS := $(sort $(filter-out %~,\ $(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\ $(wildcard $(RTE_SRCDIR)/config/defconfig_*)))) diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index 2424dcef47..55a9d8aeca 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -85,8 +85,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n .PHONY: default default: all -.PHONY: config showconfigs showversion -config showconfigs showversion: +.PHONY: config showconfigs showversion showversionum +config showconfigs showversion showversionum: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ .PHONY: test fast_test ring_test mempool_test perf_test coverage