From patchwork Fri Jul 14 10:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107758 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp683660qge; Fri, 14 Jul 2017 03:03:38 -0700 (PDT) X-Received: by 10.55.19.152 with SMTP id 24mr9888988qkt.78.1500026617988; Fri, 14 Jul 2017 03:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500026617; cv=none; d=google.com; s=arc-20160816; b=y8vl+NxED061tfB11N/O1FjoMXKqntdaQsbbrLCEcY/w5VemQhNc9ptHHHy0EmbSEM CcmAhv9mPdYnbolAvMGiIlUGeldNiT0o8nSLKZTp4ovIVx5kuGYWt6MkKVua9h1j0Nu0 WQsGgGteuvpdPK9lSmgjfEjBEp5CMScmNSSPC4RGACwWV9IK8E3FxqF3wH3KWQDklggf Du7rlkgBCwF+QdhmFVne7GV0SFkcgCAdSZBCNba8VJMH2f+bb6WC1S8GSPWRoFzYLHRt f2lv+GfcZvHprNFkzmU4Gl7y0/gDRw+zXaSlil2+nsuCi787vwKGbdkEKJ5s9u/rVXDr KRuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=sewthqITlriHXyAnQu5+A/kfbzQF72Y3hBIYfKvV/B8=; b=cxsEi04huplAu88zrU+9XnCsw8/W5LLHB3Adh9Qw7ZAacuMWWZYQh8UxohwxL9e9WR kIGiQnFe5Jj4JXglxVw/IVBRmGvHcCaP9opwF7/2UCoOXYzrKEqZc3tx7U4wZm/VXf53 oyCiDUjPDuidOgSNJFtwE4Qsq732AoccpdlW9xk3/o8fPgNjLz8K2kagQHfm/eg/4c7U 9XuA1JoSqQTL4d5MVI0nlLvR4bLozGFE/OG6Y1Dy+iijcMIjLZsD1dDXoASeiQjUvLFG LqbBGOyswNq11slbyMxpNYYk+fXHkwvfzjAPzZ5Ln05qZvEB8TBbIfNyfCsg38tFQ92T lDWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t12si7607085qti.95.2017.07.14.03.03.37; Fri, 14 Jul 2017 03:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id AC8806072E; Fri, 14 Jul 2017 10:03:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 1357060B05; Fri, 14 Jul 2017 10:00:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CAEF3609FF; Fri, 14 Jul 2017 10:00:37 +0000 (UTC) Received: from forward4j.cmail.yandex.net (forward4j.cmail.yandex.net [5.255.227.22]) by lists.linaro.org (Postfix) with ESMTPS id 9B06360663 for ; Fri, 14 Jul 2017 10:00:27 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::27]) by forward4j.cmail.yandex.net (Yandex) with ESMTP id 9AC3E21017 for ; Fri, 14 Jul 2017 13:00:26 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 2A61C2940F05 for ; Fri, 14 Jul 2017 13:00:24 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eQMe5PKgI5-0NoaVYpk; Fri, 14 Jul 2017 13:00:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 13:00:00 +0300 Message-Id: <1500026405-14155-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> References: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 77 Subject: [lng-odp] [PATCH v1 4/9] configure: the version cannot use a script X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Mike Holmes Use of a script in the autotools breaks github CI Define the API version in configure and reuse it in the code Benefits: removes dependence on scripts to build removes scripts and the make file from odp/scripts removes generated .scmversion file places api versioning right next to lib versioning in the configure.ac allows github to auto build odp repos Signed-off-by: Mike Holmes Reviewed-by: Brian Brooks Signed-off-by: Maxim Uvarov --- /** Email created from pull request 77 (muvarov:monarch_lts) ** https://github.com/Linaro/odp/pull/77 ** Patch: https://github.com/Linaro/odp/pull/77.patch ** Base sha: 0c15c40db40834f1df217191c4b6a06303ab0872 ** Merge commit sha: f06a7319a03ad565ced026ddc76a66164aa93782 **/ .gitignore | 1 - .scmversion | 1 + Makefile.am | 5 ++--- configure.ac | 21 +++++++++++++++++++-- include/odp/api/spec/.gitignore | 1 + include/odp/api/spec/{version.h => version.h.in} | 6 +++--- platform/Makefile.inc | 3 +-- scripts/Makefile.am | 1 - scripts/get_impl_str.sh | 11 ----------- 9 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 .scmversion create mode 100644 include/odp/api/spec/.gitignore rename include/odp/api/spec/{version.h => version.h.in} (93%) delete mode 100644 scripts/Makefile.am delete mode 100755 scripts/get_impl_str.sh diff --git a/.gitignore b/.gitignore index d4e7d02e..fbc0eab9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ .deps/ .dirstamp .libs/ -.scmversion CUnit-Memory-Dump.xml ID Makefile diff --git a/.scmversion b/.scmversion new file mode 100644 index 00000000..dc7bf3df --- /dev/null +++ b/.scmversion @@ -0,0 +1 @@ +1.11.0.1_monarch.git10.g7106d8b0 \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 625748af..2a9a658d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,9 +11,8 @@ SUBDIRS = @platform_with_platform@ \ test \ helper/test \ doc \ - example \ - scripts + example @DX_RULES@ -EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README diff --git a/configure.ac b/configure.ac index 08cc375d..efb9f7ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,23 @@ AC_PREREQ([2.5]) -AC_INIT([OpenDataPlane], m4_esyscmd_s(./scripts/git_hash.sh .), [lng-odp@lists.linaro.org]) +########################################################################## +# Set correct API version +########################################################################## +m4_define([odpapi_generation_version], [1]) +m4_define([odpapi_major_version], [11]) +m4_define([odpapi_minor_version], [0]) +m4_define([odpapi_point_version], [1]) +m4_define([odpapi_version], + [odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version]) +AC_INIT([OpenDataPlane],[odpapi_version],[lng-odp@lists.linaro.org]) + +ODP_VERSION_API_GENERATION=odpapi_generation_version +AC_SUBST(ODP_VERSION_API_GENERATION) +ODP_VERSION_API_MAJOR=odpapi_major_version +AC_SUBST(ODP_VERSION_API_MAJOR) +ODP_VERSION_API_MINOR=odpapi_minor_version +AC_SUBST(ODP_VERSION_API_MINOR) +AC_CONFIG_FILES([include/odp/api/spec/version.h]) + AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) AM_CONFIG_HEADER([helper/config.h]) @@ -267,7 +285,6 @@ AC_CONFIG_FILES([Makefile helper/test/Makefile pkgconfig/libodp-linux.pc pkgconfig/libodphelper-linux.pc - scripts/Makefile ]) AC_SEARCH_LIBS([timer_create],[rt posix4]) diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore new file mode 100644 index 00000000..67020331 --- /dev/null +++ b/include/odp/api/spec/.gitignore @@ -0,0 +1 @@ +version.h diff --git a/include/odp/api/spec/version.h b/include/odp/api/spec/version.h.in similarity index 93% rename from include/odp/api/spec/version.h rename to include/odp/api/spec/version.h.in index 1ddb9cea..4b16dcc5 100644 --- a/include/odp/api/spec/version.h +++ b/include/odp/api/spec/version.h.in @@ -37,7 +37,7 @@ extern "C" { * very significant changes to the API. APIs with different * versions are likely not backward compatible. */ -#define ODP_VERSION_API_GENERATION 1 +#define ODP_VERSION_API_GENERATION @ODP_VERSION_API_GENERATION@ /** * ODP API major version @@ -45,7 +45,7 @@ extern "C" { * Introduction of major new features or changes. APIs with different major * versions are likely not backward compatible. */ -#define ODP_VERSION_API_MAJOR 11 +#define ODP_VERSION_API_MAJOR @ODP_VERSION_API_MAJOR@ /** * ODP API minor version @@ -54,7 +54,7 @@ extern "C" { * to the API. For an API with common generation and major version, but with * different minor numbers the two versions are backward compatible. */ -#define ODP_VERSION_API_MINOR 0 +#define ODP_VERSION_API_MINOR @ODP_VERSION_API_MINOR@ /** * ODP API version string diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 053bd121..4a0e68b7 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -10,8 +10,7 @@ lib_LTLIBRARIES = $(LIB)/libodp-linux.la AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' -GIT_DESC = `$(top_srcdir)/scripts/get_impl_str.sh $(top_srcdir)` -AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" +AM_CFLAGS += "-DGIT_HASH=$(VERSION)" AM_CFLAGS += $(VISIBILITY_CFLAGS) #The implementation will need to retain the deprecated implementation diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 189b3efc..00000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = get_impl_str.sh git_hash.sh diff --git a/scripts/get_impl_str.sh b/scripts/get_impl_str.sh deleted file mode 100755 index d765a531..00000000 --- a/scripts/get_impl_str.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ -z ${1} ]; then - echo "should be called with a path" - exit -fi -ROOTDIR=${1} - -CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git} - -echo -n "'${CUSTOM_STR}' ($(cat ${ROOTDIR}/.scmversion))"