From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: show version as a decimal integer
Date: Thu, 24 Mar 2016 22:26:12 +0100 [thread overview]
Message-ID: <1458854772-20704-1-git-send-email-thomas.monjalon@6wind.com> (raw)
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>
---
mk/rte.sdkconfig.mk | 7 +++++++
mk/rte.sdkroot.mk | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 564a5c3..a3acfe6 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 2424dce..55a9d8a 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
--
2.7.0
next reply other threads:[~2016-03-24 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 21:26 Thomas Monjalon [this message]
2016-04-07 21:09 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458854772-20704-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).