From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 29FD21B3D2 for ; Wed, 27 Mar 2019 01:27:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 114C2469A; Tue, 26 Mar 2019 20:27:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 26 Mar 2019 20:27:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=w+89xD0esYw7sxU1huDuaCmTlQFUkbkj3LnYUYXy2Ww=; b=htnRbHsgNUKa b4iw9rH4kTU4t0hc8YaLzRUdgKziA6N86ixLXEYyeIVNhRM1UinwEfzGSs+uFKmR x0FZmN5b35ZZ0u/fMn6BR5IJTPeNB6vAFnTLU0zljyq9FnYsmTlMzw98DSFE5f4k IVFdzUxIBZM/c3m7YkaZJkiEyEPuJ9U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=w+89xD0esYw7sxU1huDuaCmTlQFUkbkj3LnYUYXy2 Ww=; b=bx9OqQf4TJAeud85WEp2t67wS3iP51E4f6g7LgqgH3bcA88GNfyme2tjA qh1gd/YMXiH9cIkCgvq9W3JGq93CrnTF2aPWOEaoycyk/5Yy8RxzipBDTMOQfwKH 2yvnysjyMjDsWhinrdziOfc0oxsx+g2gGw+7wNyoZXb87Wfewyfs92vbwaLpa/Ow Me8ciJrAH592lFEAuO0Yd/FfX1yYeSt2iaWiUt8fQoo3R3fmmqvPgvDEW3JhO54e 4lcf4LDcoqkICPKK/7yAwSRWzJ+cTf8eJKEIK3jEHXocyJf++WyrRXDmqlf0g6DD 5drITe++6G97YX4b4NldgX6jiYxZQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BD7CC10316; Tue, 26 Mar 2019 20:27:23 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, David Marchand , Luca Boccassi Date: Wed, 27 Mar 2019 01:27:22 +0100 Message-ID: <1749617.k167B8UOoZ@xps> In-Reply-To: <20190315182022.39976-4-bruce.richardson@intel.com> References: <20190307115448.54041-1-bruce.richardson@intel.com> <20190315182022.39976-1-bruce.richardson@intel.com> <20190315182022.39976-4-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 3/4] build: use version number from config file 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: Wed, 27 Mar 2019 00:27:27 -0000 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 > 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. > > 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 > Acked-by: Luca Boccassi > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A66D3A05D3 for ; Wed, 27 Mar 2019 01:27:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A1EE61B3E0; Wed, 27 Mar 2019 01:27:28 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 29FD21B3D2 for ; Wed, 27 Mar 2019 01:27:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 114C2469A; Tue, 26 Mar 2019 20:27:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 26 Mar 2019 20:27:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=w+89xD0esYw7sxU1huDuaCmTlQFUkbkj3LnYUYXy2Ww=; b=htnRbHsgNUKa b4iw9rH4kTU4t0hc8YaLzRUdgKziA6N86ixLXEYyeIVNhRM1UinwEfzGSs+uFKmR x0FZmN5b35ZZ0u/fMn6BR5IJTPeNB6vAFnTLU0zljyq9FnYsmTlMzw98DSFE5f4k IVFdzUxIBZM/c3m7YkaZJkiEyEPuJ9U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=w+89xD0esYw7sxU1huDuaCmTlQFUkbkj3LnYUYXy2 Ww=; b=bx9OqQf4TJAeud85WEp2t67wS3iP51E4f6g7LgqgH3bcA88GNfyme2tjA qh1gd/YMXiH9cIkCgvq9W3JGq93CrnTF2aPWOEaoycyk/5Yy8RxzipBDTMOQfwKH 2yvnysjyMjDsWhinrdziOfc0oxsx+g2gGw+7wNyoZXb87Wfewyfs92vbwaLpa/Ow Me8ciJrAH592lFEAuO0Yd/FfX1yYeSt2iaWiUt8fQoo3R3fmmqvPgvDEW3JhO54e 4lcf4LDcoqkICPKK/7yAwSRWzJ+cTf8eJKEIK3jEHXocyJf++WyrRXDmqlf0g6DD 5drITe++6G97YX4b4NldgX6jiYxZQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BD7CC10316; Tue, 26 Mar 2019 20:27:23 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, David Marchand , Luca Boccassi Date: Wed, 27 Mar 2019 01:27:22 +0100 Message-ID: <1749617.k167B8UOoZ@xps> In-Reply-To: <20190315182022.39976-4-bruce.richardson@intel.com> References: <20190307115448.54041-1-bruce.richardson@intel.com> <20190315182022.39976-1-bruce.richardson@intel.com> <20190315182022.39976-4-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 3/4] build: use version number from config file 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190327002722.PY7I9jcDbHF2cP39AgY0e5a6IGoEA-BkNrFgaGEpV6Y@z> 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 > 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. > > 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 > Acked-by: Luca Boccassi > --- > 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