From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by dpdk.org (Postfix) with ESMTP id 8BB1558C4 for ; Mon, 12 May 2014 15:32:02 +0200 (CEST) Received: by mail-we0-f179.google.com with SMTP id q59so6981835wes.10 for ; Mon, 12 May 2014 06:32:09 -0700 (PDT) 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=A/Y8D5M5Kc9IkU6JLLIPuxAUUA0DFrDD2Np77RrJ7ho=; b=Xtoy9e9+m+/1LYWmiyerShWVjSDdfOQGTl08qESKtZglcXAi9EDb3ak0Y0q4X29wVd M7D4N/DUPifm+pYequP783FN5ogYmQLPXFuBgyS+UDg9wNFjRm6dtvXeZQIqlmGJHKRb bxtTwWR/ze0Fdc5vGygeaYRrZt/zR3Do33qEroUORxM+fVEFIp8NlHibCge+Ps6kOTob Td8pSs6aBB2B1AT0nnvtxR/3fp9FzfgpYWjHNMbS0BEWtIrtGl8KuDX4Q32CdrWkyAFi /5aifPR2/L7xEQ5X1MfwTYtquoBuubGxcN7Ig0AVjjqzG/9+5KK7pZlclnpSP1gSMRr9 iHPQ== X-Gm-Message-State: ALoCoQk/Pe2Dl30HOeQabThpy4+9nt3oXrGb7c0vVQVxrYqaTnpq2m+XHieLQEhJENsBQRTC1LbL X-Received: by 10.194.48.100 with SMTP id k4mr2282842wjn.49.1399901529502; Mon, 12 May 2014 06:32:09 -0700 (PDT) Received: from XPS13.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id gx5sm16141203wib.23.2014.05.12.06.32.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 May 2014 06:32:08 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 12 May 2014 15:31:49 +0200 Message-Id: <1399901509-9804-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.9.2 Subject: [dpdk-dev] [PATCH] version: 1.7.0-rc0 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: Mon, 12 May 2014 13:32:02 -0000 Start development cycle for version 1.7.0. This new development workflow introduces a new versioning scheme. Instead of having releases r0, r1, r2, etc, there will be release candidates. Last number has special meanings: < 16 numbers are reserved for release candidates (RTE_VER_SUFFIX is -rc) 16 is reserved for the release (RTE_VER_SUFFIX must be unset) > 16 numbers can be used locally (RTE_VER_SUFFIX must be set) Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/include/rte_version.h | 55 +++++++++++++++++------------ mk/rte.sdkconfig.mk | 13 +++++-- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/lib/librte_eal/common/include/rte_version.h b/lib/librte_eal/common/include/rte_version.h index 419de24..e64cccc 100644 --- a/lib/librte_eal/common/include/rte_version.h +++ b/lib/librte_eal/common/include/rte_version.h @@ -59,7 +59,7 @@ extern "C" { /** * Minor version number i.e. the y in x.y.z */ -#define RTE_VER_MINOR 6 +#define RTE_VER_MINOR 7 /** * Patch level number i.e. the z in x.y.z @@ -67,9 +67,16 @@ extern "C" { #define RTE_VER_PATCH_LEVEL 0 /** - * Patch release number i.e. the w in x.y.zrw + * Extra string to be appended to version number */ -#define RTE_VER_PATCH_RELEASE 2 +#define RTE_VER_SUFFIX "-rc" + +/** + * Patch release number + * 0-15 = release candidates + * 16 = release + */ +#define RTE_VER_PATCH_RELEASE 0 /** * Macro to compute a version number usable for comparisons @@ -86,31 +93,33 @@ extern "C" { RTE_VER_PATCH_RELEASE) /** - * Extra string to be appended to version number, - * for example: pre1, EAR, final etc. - */ -#define RTE_VER_SUFFIX "" - -/** - * Function returning string of version number: "RTE x.y.zrw" + * Function returning version string * @return * string */ static inline const char * -rte_version(void) { - if (sizeof(RTE_VER_SUFFIX) > sizeof("")) - return RTE_VER_PREFIX" " - RTE_STR(RTE_VER_MAJOR)"." - RTE_STR(RTE_VER_MINOR)"." - RTE_STR(RTE_VER_PATCH_LEVEL)"r" - RTE_STR(RTE_VER_PATCH_RELEASE) - "-"RTE_VER_SUFFIX; +rte_version(void) +{ + static char version[32]; + if (version[0] != 0) + return version; + if (strlen(RTE_VER_SUFFIX) == 0) + sprintf(version, "%s %d.%d.%d", + RTE_VER_PREFIX, + RTE_VER_MAJOR, + RTE_VER_MINOR, + RTE_VER_PATCH_LEVEL); else - return RTE_VER_PREFIX" " - RTE_STR(RTE_VER_MAJOR)"." - RTE_STR(RTE_VER_MINOR)"." - RTE_STR(RTE_VER_PATCH_LEVEL)"r" - RTE_STR(RTE_VER_PATCH_RELEASE); + sprintf(version, "%s %d.%d.%d%s%d", + RTE_VER_PREFIX, + RTE_VER_MAJOR, + RTE_VER_MINOR, + RTE_VER_PATCH_LEVEL, + RTE_VER_SUFFIX, + RTE_VER_PATCH_RELEASE < 16 ? + RTE_VER_PATCH_RELEASE : + RTE_VER_PATCH_RELEASE - 16); + return version; } #ifdef __cplusplus diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index a96beeb..d0692e7 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -31,9 +31,16 @@ .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,' + @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.%d.%d' "$$1" "$$2" "$$3"; \ + if [ -z "$$4" ]; then echo; \ + else printf '%s' "$$4"; \ + if [ $$5 -lt 16 ] ; then echo $$5; \ + else echo $$(($$5 - 16)); fi; \ + fi INSTALL_CONFIGS := $(sort $(filter-out %~,\ $(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\ -- 1.9.2