diff mbox

[PATCHv3] odp version script

Message ID 1418388237-1282-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit a9b30b54a1f8318ee132be2da3e5d491959eb188
Headers show

Commit Message

Maxim Uvarov Dec. 12, 2014, 12:43 p.m. UTC
Update odp version in one place (C code), and use it for doxygen also.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 configure.ac           | 2 +-
 doc/doxygen.cfg        | 2 +-
 m4/ax_prog_doxygen.m4  | 2 +-
 scripts/odp_version.sh | 9 +++++++++
 4 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100755 scripts/odp_version.sh

Comments

Mike Holmes Dec. 12, 2014, 1:13 p.m. UTC | #1
On 12 December 2014 at 07:43, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>
> Update odp version in one place (C code), and use it for doxygen also.
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>

Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>


> ---
>  configure.ac           | 2 +-
>  doc/doxygen.cfg        | 2 +-
>  m4/ax_prog_doxygen.m4  | 2 +-
>  scripts/odp_version.sh | 9 +++++++++
>  4 files changed, 12 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..72ae404
> --- /dev/null
> +++ b/scripts/odp_version.sh
> @@ -0,0 +1,9 @@
> +#!/bin/bash
> +
> +VFILE="platform/linux-generic/include/api/odp_version.h"
> +
> +GEN=`grep "define ODP_VERSION_API_GENERATION"  ${VFILE} | cut -d ' ' -f 3`
> +MAJ=`grep "define ODP_VERSION_API_MAJOR"       ${VFILE} | cut -d ' ' -f 3`
> +MIN=`grep "define ODP_VERSION_API_MINOR"       ${VFILE} | cut -d ' ' -f 3`
> +
> +echo -n $GEN.$MAJ.$MIN
> --
> 1.8.5.1.163.gd7aced9
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Anders Roxell Dec. 12, 2014, 1:46 p.m. UTC | #2
On 12 December 2014 at 14:13, Mike Holmes <mike.holmes@linaro.org> wrote:
>
>
> On 12 December 2014 at 07:43, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>>
>> Update odp version in one place (C code), and use it for doxygen also.
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>
>
> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

>
>>
>> ---
>>  configure.ac           | 2 +-
>>  doc/doxygen.cfg        | 2 +-
>>  m4/ax_prog_doxygen.m4  | 2 +-
>>  scripts/odp_version.sh | 9 +++++++++
>>  4 files changed, 12 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..72ae404
>> --- /dev/null
>> +++ b/scripts/odp_version.sh
>> @@ -0,0 +1,9 @@
>> +#!/bin/bash
>> +
>> +VFILE="platform/linux-generic/include/api/odp_version.h"
>> +
>> +GEN=`grep "define ODP_VERSION_API_GENERATION"  ${VFILE} | cut -d ' ' -f
>> 3`
>> +MAJ=`grep "define ODP_VERSION_API_MAJOR"       ${VFILE} | cut -d ' ' -f
>> 3`
>> +MIN=`grep "define ODP_VERSION_API_MINOR"       ${VFILE} | cut -d ' ' -f
>> 3`
>> +
>> +echo -n $GEN.$MAJ.$MIN
>> --
>> 1.8.5.1.163.gd7aced9
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
> --
> Mike Holmes
> Linaro  Sr Technical Manager
> LNG - ODP
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

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..72ae404
--- /dev/null
+++ b/scripts/odp_version.sh
@@ -0,0 +1,9 @@ 
+#!/bin/bash
+
+VFILE="platform/linux-generic/include/api/odp_version.h"
+
+GEN=`grep "define ODP_VERSION_API_GENERATION"	${VFILE} | cut -d ' ' -f 3`
+MAJ=`grep "define ODP_VERSION_API_MAJOR"	${VFILE} | cut -d ' ' -f 3`
+MIN=`grep "define ODP_VERSION_API_MINOR"	${VFILE} | cut -d ' ' -f 3`
+
+echo -n $GEN.$MAJ.$MIN