From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id CA38ACE7 for ; Thu, 24 Mar 2016 22:28:15 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id l68so5673489wml.0 for ; Thu, 24 Mar 2016 14:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=9Ts87MXPEL5mMzuTEmf9UBIWwJgQw1pQx+ztPY9EC74=; b=Ac88sP+5pNvV+zS8egkpkkEUTm8rV43z2Mj9fZxOuF2jzYUpJkLjCesLswrvRGL2Od ybbQdW15Q9MzbnTHkHNJJkg6qabvQcsRLJKaQkTjw4cHzkNyuLP54zew9FdmxoIsELmc m5eqGsw/bnlKjvSDMeQk+Ieg+ce7+b9q+N19jHWsJVsj0YVmM7DQSYQgwFKZoLb8Q+5W DJEoJii01wVYpK1+2TZr64cFmyJRUfPDU+xV0oAPMBhwJR7GPBxnCq9zcpEe32aXC1m7 O9GbyrGuhL6mG0Va2ETZeEbu29XSb8QYYBBupLkj8TeYTMuJSrqf8XxvdYJpdXNJk4z2 soaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=9Ts87MXPEL5mMzuTEmf9UBIWwJgQw1pQx+ztPY9EC74=; b=Nizsxq/F+n9bTen3YPQ/mEcgsSvd7zN5PHK9KGAEcuWq5BBVIo7CVBLHzHu/VGpf66 7P2Mkh/G55FwTO8wyRFe7U0nsyxS1gesQJwbP44JmVAIURkXZZzFMgFlwJ6N5mmaw1dS k4IxhWloOoQIfRugB4zOf3E2izNo/JG0YtAauCxTyv/nQnlRIDsMt8cqs5gJFuvoAtDE hYBNqu3GbVHhnriSCa+5on653eM1BcwDIvg8BE+JScrhGpodpIUHQAzLK85iCeUPqi1l QF96ljWATvaZXstQBho5Ou+L0jQ7MjOwjB69NpYdTF/Vxu2YMBirujvnfbi2gJxup42K tkyg== X-Gm-Message-State: AD7BkJJCYwkvnhlXLW85jt209+3IsbQ/wEQQWFDezHAW1Hfo177IQBKJ0o5xDbUQwvTMMMZD X-Received: by 10.194.174.231 with SMTP id bv7mr11934758wjc.17.1458854895646; Thu, 24 Mar 2016 14:28:15 -0700 (PDT) Received: from XPS13.localdomain (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id q139sm318496wmd.2.2016.03.24.14.28.13 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Mar 2016 14:28:15 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 24 Mar 2016 22:26:12 +0100 Message-Id: <1458854772-20704-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] mk: show version as a decimal integer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2016 21:28:16 -0000 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 --- 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