[dpdk-dev] [PATCH 2/4] build: use version number from config file

Bruce Richardson bruce.richardson at intel.com
Thu Mar 7 14:01:59 CET 2019


On Thu, Mar 07, 2019 at 01:37:08PM +0100, David Marchand wrote:
>    On Thu, Mar 7, 2019 at 12:55 PM Bruce Richardson
>    <[1]bruce.richardson at intel.com> wrote:
> 
>      Since we have the version number in a separate file at the root
>      level,
>      we should not need to duplicate this in rte_version.h too. Best
>      approach here is to move the macros for specifying the
>      year/month/etc.
>      parts from the version header file to the build config file -
>      leaving
>      the other utility macros for e.g. printing the version string, where
>      they
>      are.
>      For make this is done by having a little bit of awk parse the
>      version
>      file and pass the results through to the preprocessor for the config
>      generation stage.
>      For meson, this is done by parsing the version and adding it to the
>      standard dpdk_conf object.
>      Signed-off-by: Bruce Richardson <[2]bruce.richardson at intel.com>
>      ---
>       DPDK_VERSION                                |  2 +-
>       config/common_base                          | 14 +++++++++
>       config/rte_config.h                         |  5 ++++
>       lib/librte_eal/common/include/rte_version.h | 32
>      ---------------------
>       meson.build                                 | 14 +++++++++
>       mk/[3]rte.sdkconfig.mk                         |  2 ++
>       6 files changed, 36 insertions(+), 33 deletions(-)
>      diff --git a/DPDK_VERSION b/DPDK_VERSION
>      index c4a4cd00b..e013b54dd 100644
>      --- a/DPDK_VERSION
>      +++ b/DPDK_VERSION
>      @@ -1 +1 @@
>      -19.05.0-rc0
>      +19.05.1
> 
>    Might be a bit early for the stable while the 19.05 is still being
>    cooked :-)
> 
Oops, didn't realise that testing change had crept in.

>      diff --git a/config/common_base b/config/common_base
>      index 0b09a9348..6292bc4af 100644
>      --- a/config/common_base
>      +++ b/config/common_base
>      @@ -1,6 +1,20 @@
>       # SPDX-License-Identifier: BSD-3-Clause
>       # Copyright(c) 2010-2017 Intel Corporation
>      +#
>      +# String that appears before the version number
>      +#
>      +CONFIG_RTE_VER_PREFIX="DPDK"
>      +
>      +#
>      +# Version information completed when this file is processed for a
>      build
>      +#
>      +CONFIG_RTE_VER_YEAR=__YEAR
>      +CONFIG_RTE_VER_MONTH=__MONTH
>      +CONFIG_RTE_VER_MINOR=__MINOR
>      +CONFIG_RTE_VER_SUFFIX=__SUFFIX
>      +CONFIG_RTE_VER_RELEASE=__RELEASE
>      +
> 
>    ?
>    I think you broke make support.

Well, yes and no. It should be fine if you remove the build directory and
recreate it, as the code for generating the build config has changed.

/Bruce



More information about the dev mailing list