[dpdk-dev] [PATCH v3 3/4] build: use version number from config file
thomas at monjalon.net
Wed Mar 27 01:27:22 CET 2019
15/03/2019 19:20, Bruce Richardson:
> 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
> 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.
> In both cases, we need to append a large number - in this case "99",
> previously 16 in original code - to the version number when we want to do
> version number comparisons. Without this, the release version e.g. 19.05.0
> will compare as less than it's RC's e.g. 19.05.0-rc4. With it, the
> comparison is correct as "19.05.0.99 > 19.05.0-rc4.99".
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Acked-by: Luca Boccassi <bluca at debian.org>
> V3: following Thomas review, include appending .99 to version numbers to
> ensure correct comparison. Make sure the reason for this is properly
> documented in the code for future reference. Add in "int" casts for
> numeric values to strip leading zeros e.g. in "05" month.
Acked-by: Thomas Monjalon <thomas at monjalon.net>
More information about the dev