From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by dpdk.org (Postfix) with ESMTP id 4A16D58F5 for ; Fri, 19 Jul 2013 16:19:39 +0200 (CEST) Received: by mail-we0-f177.google.com with SMTP id m19so4025523wev.22 for ; Fri, 19 Jul 2013 07:19:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=x6Di/p4kBS2dPUOSO3QegubdePFug7BCELdM5NG7gLM=; b=Mt+5zzmpMgbwqPh/BkrRIOnzvWGoNr/uc2BkoYzSv/P/Pz5hSYWLiz0/QfLL0mftB5 c8Xm12SLxBItWwhMhPo4AunVALcaLJvSq2n/uGr4kWI+8kEQWXbXflhQDRRLiXkiVsOt M9BFXdRBdSbL2noOiOS0GL9CMsFAlzKAmy/3O6EZ3yQxV4RYXTdBwfh+r0/Uj6noj2YE r3bLt2AA8PiroSwPLJkYVadASvObRCUJ64fuk74yCMYubRvE/Gpv36B1V/UU1aja7VR2 xILBX9CczZAFeRTGkpux3AQvx/mo9cNPFRyq+4LP1I73GCTcBRK0m/WyMUaFirqNG2X7 enKQ== X-Received: by 10.180.74.146 with SMTP id t18mr11823549wiv.3.1374243599833; Fri, 19 Jul 2013 07:19:59 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id a6sm23366115wib.10.2013.07.19.07.19.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 19 Jul 2013 07:19:59 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Fri, 19 Jul 2013 16:19:56 +0200 From: Thomas Monjalon To: dev@dpdk.org Date: Fri, 19 Jul 2013 16:19:51 +0200 Message-Id: <3bd9ee985e2d0ce0d2780ba0160ecd31bb502878.1374243470.git.thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQn3TDzu5zHw9+P8Q9J9/wuW+UpA9KM5yDjPJ4e176qZzOGlSVOD0hbYnMH6EDZ2i82C0uPQ Subject: [dpdk-dev] [PATCH 1/2] mk: add rule to print version number 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: Fri, 19 Jul 2013 14:19:39 -0000 The version string is extracted from rte_version.h. RTE_VER_* macros are concatenated and separators " . . r " are inserted. Signed-off-by: Thomas Monjalon --- mk/rte.sdkconfig.mk | 6 ++++++ mk/rte.sdkroot.mk | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 2c071a2..6eb389c 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -31,6 +31,12 @@ # # version: DPDK.L.1.2.3-3 +.PHONY: showversion +showversion: + @sed -rn 's,^#define RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \ + $(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h | \ + tr '\n' '.' | sed -r 's,\.([0-9]+)\.$$,r\1\n,' + INSTALL_CONFIGS := $(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 905b678..b5126c0 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -87,8 +87,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n .PHONY: default default: all -.PHONY: config showconfigs -config showconfigs: +.PHONY: config showconfigs showversion +config showconfigs showversion: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ .PHONY: test fast_test ring_test mempool_test -- 1.7.10.4