From patchwork Fri Dec 12 10:30:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 42178 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7010426C6D for ; Fri, 12 Dec 2014 10:30:42 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf5004176eek.11 for ; Fri, 12 Dec 2014 02:30:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=tOEWx5ETYm1XytRP+OXKbf923O0aI4lrUKu5hyTc+NI=; b=nDJr4c9XiAtgvwJz+MfhYomrKr/eMopecgiiKMwVctPe4DaClrx4bmyTObn16oLKTB e5i+cS4DeTO+qUqaXRr462Vd7isbNV4TS9dZOKuKt0bcSgbTEMKWLSq/i8O9kp1y1Qel yFQkY8AWdKs9WoohFRrMcr28PrSZ+Q4Jr1rhD6ie+NeCFxupWKUKIT6TyQflNxpJGaFC 4iJvWYMkx4c0NAeCMQKAcMZ0dLilRSwmPF3j5gh8yfZ/rOmqBmPShnH0Yp4JA2MR3fk+ QsRfOlkUWYB21iPeLG5qfOqUPsIqpw4lR/SshLD5QKWpxdEYMi4AN+VfK7E/ZMrJETSl Vhew== X-Gm-Message-State: ALoCoQk5+jZ0hLAhmSgvxxQGQaH4+y3H2I5O1EMtZFq/Oog3HZ4GDzv0GVJ9gQBVSJd6woauLVz0 X-Received: by 10.194.133.39 with SMTP id oz7mr252558wjb.3.1418380241673; Fri, 12 Dec 2014 02:30:41 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.132 with SMTP id n4ls229682lae.57.gmail; Fri, 12 Dec 2014 02:30:41 -0800 (PST) X-Received: by 10.112.204.193 with SMTP id la1mr14799784lbc.43.1418380241313; Fri, 12 Dec 2014 02:30:41 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id kl4si881539lbc.134.2014.12.12.02.30.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Dec 2014 02:30:41 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hs14so5742688lab.25 for ; Fri, 12 Dec 2014 02:30:41 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr14688150laz.71.1418380241132; Fri, 12 Dec 2014 02:30:41 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp806245lbb; Fri, 12 Dec 2014 02:30:40 -0800 (PST) X-Received: by 10.224.74.132 with SMTP id u4mr29047360qaj.61.1418380239604; Fri, 12 Dec 2014 02:30:39 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id r8si890054qac.110.2014.12.12.02.30.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Dec 2014 02:30:39 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XzNUa-0002Ub-Bq; Fri, 12 Dec 2014 10:30:36 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XzNUU-0002UW-06 for lng-odp@lists.linaro.org; Fri, 12 Dec 2014 10:30:30 +0000 Received: by mail-la0-f48.google.com with SMTP id gf13so5734892lab.21 for ; Fri, 12 Dec 2014 02:30:24 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr14452908lbc.23.1418380224191; Fri, 12 Dec 2014 02:30:24 -0800 (PST) Received: from localhost.localdomain (broadband-46-188-125-142.2com.net. [46.188.125.142]) by mx.google.com with ESMTPSA id c5sm276119laa.34.2014.12.12.02.30.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Dec 2014 02:30:23 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 12 Dec 2014 13:30:17 +0300 Message-Id: <1418380217-24085-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCHv2] odp version script X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Update odp version in one place (C code), and use it for doxygen also. Signed-off-by: Maxim Uvarov --- v2: changed DOC_VERSION to VERSION. Anders also talked that it will be worth to put script to variable. I have not idea how to do that in configure.ac. Actually there is no big reason for that due to it's used only once. BR, Maxim. configure.ac | 2 +- doc/doxygen.cfg | 2 +- m4/ax_prog_doxygen.m4 | 2 +- scripts/odp_version.sh | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 scripts/odp_version.sh diff --git a/configure.ac b/configure.ac index 2f27261..8dbad4b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.5]) -AC_INIT([OpenDataPlane], [0.4.0], [lng-odp@lists.linaro.org]) +AC_INIT([OpenDataPlane], m4_esyscmd(./scripts/odp_version.sh), [lng-odp@lists.linaro.org]) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) AM_CONFIG_HEADER([helper/config.h]) diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 03bcc20..050c94a 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -1,5 +1,5 @@ PROJECT_NAME = "API Reference Manual" -PROJECT_NUMBER = 0.4.0 +PROJECT_NUMBER = $(VERSION) PROJECT_LOGO = $(SRCDIR)/doc/images/ODP-Logo-HQ.png QUIET = YES OUTPUT_DIRECTORY = $(DOCDIR) diff --git a/m4/ax_prog_doxygen.m4 b/m4/ax_prog_doxygen.m4 index aa4acc2..0f58b3e 100644 --- a/m4/ax_prog_doxygen.m4 +++ b/m4/ax_prog_doxygen.m4 @@ -407,7 +407,7 @@ AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) -DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) +DX_ENV_APPEND(VERSION, $VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], diff --git a/scripts/odp_version.sh b/scripts/odp_version.sh new file mode 100755 index 0000000..357f017 --- /dev/null +++ b/scripts/odp_version.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +GEN=`grep "define ODP_VERSION_API_GENERATION" platform/linux-generic/include/api/odp_version.h| cut -d ' ' -f 3` +MAJ=`grep "define ODP_VERSION_API_MAJOR" platform/linux-generic/include/api/odp_version.h| cut -d ' ' -f 3` +MIN=`grep "define ODP_VERSION_API_MINOR" platform/linux-generic/include/api/odp_version.h| cut -d ' ' -f 3` + +echo -n $GEN.$MAJ.$MIN