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 <thomas.monjalon@6wind.com>
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_*))))
.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