From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by dpdk.org (Postfix) with ESMTP id F1BA94C9D for ; Thu, 7 Mar 2019 13:33:19 +0100 (CET) Received: by mail-vs1-f68.google.com with SMTP id h7so4339525vsl.1 for ; Thu, 07 Mar 2019 04:33:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yzdJH5KB37Ft6GWtwSCYb3NhNZPe8Ml7IRkzWiN7pSo=; b=glBFUnKORbm+pYLsSDtC/lNprldAsLjvZaiHV5UtfeTMPVuAFxZMKHT4YjZxS9oZyE RBtyBa6hJYuHsURr/7IZzhNOXJa4vX4d4fNeiC0v1FsNg6Chh+YdEp8g11UTSTe9ogfK fGps3B+SVM4vmChh1yajCBf0sKFJUX5rN3bAZZom9XWUg2dB0n39riF6qpUT3sdbBLtR S1e3j/EBLcY7X2JChQ+ipLtljrMrLjbXSmT9zmN1k4n24e2r7JzMOeKyJexa6ykbdx8H Udrpy+q4LOy5rJYwoQ2eftwEW6nSxe3gzg0Ixddkqn7lrRSUwTvKccYqie1YBCh2WnOj pLaw== X-Gm-Message-State: APjAAAVvlGpQypJPMKvoCbjJ7kgC/f1xE9lvPIzMMUi2O/iOXn0mcJZH vHiqgg/MO6tdOuqmG8u4ZxAtS4OjZqSGOPAh/q+HWQ== X-Google-Smtp-Source: APXvYqxy7UICsYo+1d1tX5QRURhKp1n/RZCVQlAGqUL7KHPnGCARWdCecYU6+DGaiJQt/MTypRo4OuULVtR9ik2VJjw= X-Received: by 2002:a67:f69a:: with SMTP id n26mr6900450vso.105.1551961998238; Thu, 07 Mar 2019 04:33:18 -0800 (PST) MIME-Version: 1.0 References: <20190307115448.54041-1-bruce.richardson@intel.com> <20190307115448.54041-2-bruce.richardson@intel.com> In-Reply-To: <20190307115448.54041-2-bruce.richardson@intel.com> From: David Marchand Date: Thu, 7 Mar 2019 13:33:07 +0100 Message-ID: To: Bruce Richardson Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 1/4] build: add single source of DPDK version number X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 12:33:20 -0000 On Thu, Mar 7, 2019 at 12:55 PM Bruce Richardson wrote: > Add a new file DPDK_VERSION to hold the current DPDK version number. > Have meson use this file for it's project version, and have make use > it for reporting out "showversion" and "showversionum". > > Signed-off-by: Bruce Richardson > --- > DPDK_VERSION | 1 + > meson.build | 2 +- > mk/rte.sdkconfig.mk | 16 ++-------------- > 3 files changed, 4 insertions(+), 15 deletions(-) > create mode 100644 DPDK_VERSION > > diff --git a/DPDK_VERSION b/DPDK_VERSION > new file mode 100644 > index 000000000..c4a4cd00b > --- /dev/null > +++ b/DPDK_VERSION > @@ -0,0 +1 @@ > +19.05.0-rc0 > diff --git a/meson.build b/meson.build > index 69833de82..757618144 100644 > --- a/meson.build > +++ b/meson.build > @@ -2,7 +2,9 @@ > # Copyright(c) 2017 Intel Corporation > > project('DPDK', 'C', > - version: '19.05.0-rc0', > + # get version number from file > + # use "more" rather than "cat" for windows compatiblity > compatibility + version: run_command('more', > files('DPDK_VERSION')).stdout().strip(), > license: 'BSD', > default_options: ['buildtype=release', 'default_library=static'], > meson_version: '>= 0.47.1' > diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk > index fa77331cb..8dc31d7cf 100644 > --- a/mk/rte.sdkconfig.mk > +++ b/mk/rte.sdkconfig.mk > @@ -3,23 +3,11 @@ > > .PHONY: showversion > showversion: > - @set -- \ > - $$(sed -rne 's,^#define > RTE_VER_[A-Z_]*[[:space:]]+([0-9]+).*,\1,p' \ > - -e 's,^#define > RTE_VER_SUFFIX[[:space:]]+"(.*)",\1,p' \ > - > $(RTE_SRCDIR)/lib/librte_eal/common/include/rte_version.h) ;\ > - printf '%d.%02d.%d' "$$1" "$$2" "$$3"; \ > - if [ -z "$$5" ]; then echo; \ > - else printf '%s' "$$4"; \ > - if [ $$5 -lt 16 ] ; then echo $$5; \ > - else echo $$(($$5 - 16)); fi; \ > - fi > + @cat $(RTE_SRCDIR)/DPDK_VERSION > > .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" > + @cat ${RTE_SRCDIR}/DPDK_VERSION | awk -F '.' '{print $$1$$2}' > s/{RTE_SRCDIR}/(RTE_SRCDIR)/ > INSTALL_CONFIGS := $(sort $(filter-out %~,\ > $(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\ > > -- David Marchand