diff mbox

[PATCHv2] configure: remove separate so_version file

Message ID 1459542700-25447-1-git-send-email-anders.roxell@linaro.org
State Accepted
Commit ebf0bad7aaf6396c316eb28117f6c228eb527fd6
Headers show

Commit Message

Anders Roxell April 1, 2016, 8:31 p.m. UTC
Set versioning in configure.ac directly, folks familiar with autotools
will expect it to be set there.

Suggested-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 .so_version      |  1 -
 Makefile.am      |  2 +-
 configure.ac     | 10 +++++++---
 scripts/builddeb |  3 ++-
 4 files changed, 10 insertions(+), 6 deletions(-)
 delete mode 100644 .so_version

Comments

Ricardo Salveti April 4, 2016, 10:03 p.m. UTC | #1
On Fri, Apr 1, 2016 at 5:31 PM, Anders Roxell <anders.roxell@linaro.org> wrote:
> Set versioning in configure.ac directly, folks familiar with autotools
> will expect it to be set there.
>
> Suggested-by: Fathi Boudra <fathi.boudra@linaro.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  .so_version      |  1 -
>  Makefile.am      |  2 +-
>  configure.ac     | 10 +++++++---
>  scripts/builddeb |  3 ++-
>  4 files changed, 10 insertions(+), 6 deletions(-)
>  delete mode 100644 .so_version
>
> diff --git a/.so_version b/.so_version
> deleted file mode 100644
> index dfa6588..0000000
> --- a/.so_version
> +++ /dev/null
> @@ -1 +0,0 @@
> -108:0:0
> diff --git a/Makefile.am b/Makefile.am
> index a90eb91..2129472 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
>
>  @DX_RULES@
>
> -EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion .so_version
> +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
> diff --git a/configure.ac b/configure.ac
> index 4d86817..5d274c7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -9,6 +9,12 @@ AC_SYS_LARGEFILE
>  AC_CONFIG_MACRO_DIR([m4])
>  AM_SILENT_RULES([yes])
>
> +##########################################################################
> +# Set correct platform library version
> +##########################################################################
> +ODP_LIBSO_VERSION=108:0:0
> +AC_SUBST(ODP_LIBSO_VERSION)
> +
>  # Checks for programs.
>  AC_PROG_CC
>  AM_PROG_CC_C_O
> @@ -61,10 +67,8 @@ AS_CASE([$host],
>  AC_SUBST([ARCH])
>
>  ##########################################################################
> -# Set correct platform library version
> +# Set correct pkgconfig version
>  ##########################################################################
> -ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
> -AC_SUBST(ODP_LIBSO_VERSION)
>  PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
>  AC_SUBST(PKGCONFIG_VERSION)
>
> diff --git a/scripts/builddeb b/scripts/builddeb
> index b832df6..f28ee02 100755
> --- a/scripts/builddeb
> +++ b/scripts/builddeb
> @@ -20,7 +20,8 @@ fi
>  pushd ${ROOT_DIR}/${package}-${version}
>  cp -r ${ROOT_DIR}/pkg/debian .
>
> -current=$(cat .so_version |awk -F : '{print $1}')
> +current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
> +       awk -F'=' '{print $2}' |awk -F : '{print $1}')
>  rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
>
>  sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" debian/control
> --
> 2.1.4

Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Maxim Uvarov April 7, 2016, 7:16 a.m. UTC | #2
Merged,
Maxim.

On 04/05/16 01:03, Ricardo Salveti wrote:
> On Fri, Apr 1, 2016 at 5:31 PM, Anders Roxell <anders.roxell@linaro.org> wrote:
>> Set versioning in configure.ac directly, folks familiar with autotools
>> will expect it to be set there.
>>
>> Suggested-by: Fathi Boudra <fathi.boudra@linaro.org>
>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>> ---
>>   .so_version      |  1 -
>>   Makefile.am      |  2 +-
>>   configure.ac     | 10 +++++++---
>>   scripts/builddeb |  3 ++-
>>   4 files changed, 10 insertions(+), 6 deletions(-)
>>   delete mode 100644 .so_version
>>
>> diff --git a/.so_version b/.so_version
>> deleted file mode 100644
>> index dfa6588..0000000
>> --- a/.so_version
>> +++ /dev/null
>> @@ -1 +0,0 @@
>> -108:0:0
>> diff --git a/Makefile.am b/Makefile.am
>> index a90eb91..2129472 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
>>
>>   @DX_RULES@
>>
>> -EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion .so_version
>> +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
>> diff --git a/configure.ac b/configure.ac
>> index 4d86817..5d274c7 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -9,6 +9,12 @@ AC_SYS_LARGEFILE
>>   AC_CONFIG_MACRO_DIR([m4])
>>   AM_SILENT_RULES([yes])
>>
>> +##########################################################################
>> +# Set correct platform library version
>> +##########################################################################
>> +ODP_LIBSO_VERSION=108:0:0
>> +AC_SUBST(ODP_LIBSO_VERSION)
>> +
>>   # Checks for programs.
>>   AC_PROG_CC
>>   AM_PROG_CC_C_O
>> @@ -61,10 +67,8 @@ AS_CASE([$host],
>>   AC_SUBST([ARCH])
>>
>>   ##########################################################################
>> -# Set correct platform library version
>> +# Set correct pkgconfig version
>>   ##########################################################################
>> -ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
>> -AC_SUBST(ODP_LIBSO_VERSION)
>>   PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
>>   AC_SUBST(PKGCONFIG_VERSION)
>>
>> diff --git a/scripts/builddeb b/scripts/builddeb
>> index b832df6..f28ee02 100755
>> --- a/scripts/builddeb
>> +++ b/scripts/builddeb
>> @@ -20,7 +20,8 @@ fi
>>   pushd ${ROOT_DIR}/${package}-${version}
>>   cp -r ${ROOT_DIR}/pkg/debian .
>>
>> -current=$(cat .so_version |awk -F : '{print $1}')
>> +current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
>> +       awk -F'=' '{print $2}' |awk -F : '{print $1}')
>>   rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
>>
>>   sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" debian/control
>> --
>> 2.1.4
> Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
>
Maxim Uvarov April 7, 2016, 8:41 a.m. UTC | #3
Merged,
Maxim.

On 04/05/16 01:03, Ricardo Salveti wrote:
> On Fri, Apr 1, 2016 at 5:31 PM, Anders Roxell <anders.roxell@linaro.org> wrote:
>> Set versioning in configure.ac directly, folks familiar with autotools
>> will expect it to be set there.
>>
>> Suggested-by: Fathi Boudra <fathi.boudra@linaro.org>
>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>> ---
>>   .so_version      |  1 -
>>   Makefile.am      |  2 +-
>>   configure.ac     | 10 +++++++---
>>   scripts/builddeb |  3 ++-
>>   4 files changed, 10 insertions(+), 6 deletions(-)
>>   delete mode 100644 .so_version
>>
>> diff --git a/.so_version b/.so_version
>> deleted file mode 100644
>> index dfa6588..0000000
>> --- a/.so_version
>> +++ /dev/null
>> @@ -1 +0,0 @@
>> -108:0:0
>> diff --git a/Makefile.am b/Makefile.am
>> index a90eb91..2129472 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
>>
>>   @DX_RULES@
>>
>> -EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion .so_version
>> +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
>> diff --git a/configure.ac b/configure.ac
>> index 4d86817..5d274c7 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -9,6 +9,12 @@ AC_SYS_LARGEFILE
>>   AC_CONFIG_MACRO_DIR([m4])
>>   AM_SILENT_RULES([yes])
>>
>> +##########################################################################
>> +# Set correct platform library version
>> +##########################################################################
>> +ODP_LIBSO_VERSION=108:0:0
>> +AC_SUBST(ODP_LIBSO_VERSION)
>> +
>>   # Checks for programs.
>>   AC_PROG_CC
>>   AM_PROG_CC_C_O
>> @@ -61,10 +67,8 @@ AS_CASE([$host],
>>   AC_SUBST([ARCH])
>>
>>   ##########################################################################
>> -# Set correct platform library version
>> +# Set correct pkgconfig version
>>   ##########################################################################
>> -ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
>> -AC_SUBST(ODP_LIBSO_VERSION)
>>   PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
>>   AC_SUBST(PKGCONFIG_VERSION)
>>
>> diff --git a/scripts/builddeb b/scripts/builddeb
>> index b832df6..f28ee02 100755
>> --- a/scripts/builddeb
>> +++ b/scripts/builddeb
>> @@ -20,7 +20,8 @@ fi
>>   pushd ${ROOT_DIR}/${package}-${version}
>>   cp -r ${ROOT_DIR}/pkg/debian .
>>
>> -current=$(cat .so_version |awk -F : '{print $1}')
>> +current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
>> +       awk -F'=' '{print $2}' |awk -F : '{print $1}')
>>   rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
>>
>>   sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" debian/control
>> --
>> 2.1.4
> Reviewed-by: Ricardo Salveti <ricardo.salveti@linaro.org>
>
diff mbox

Patch

diff --git a/.so_version b/.so_version
deleted file mode 100644
index dfa6588..0000000
--- a/.so_version
+++ /dev/null
@@ -1 +0,0 @@ 
-108:0:0
diff --git a/Makefile.am b/Makefile.am
index a90eb91..2129472 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,4 +17,4 @@  SUBDIRS = @platform_with_platform@ \
 
 @DX_RULES@
 
-EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion .so_version
+EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
diff --git a/configure.ac b/configure.ac
index 4d86817..5d274c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,12 @@  AC_SYS_LARGEFILE
 AC_CONFIG_MACRO_DIR([m4])
 AM_SILENT_RULES([yes])
 
+##########################################################################
+# Set correct platform library version
+##########################################################################
+ODP_LIBSO_VERSION=108:0:0
+AC_SUBST(ODP_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -61,10 +67,8 @@  AS_CASE([$host],
 AC_SUBST([ARCH])
 
 ##########################################################################
-# Set correct platform library version
+# Set correct pkgconfig version
 ##########################################################################
-ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
-AC_SUBST(ODP_LIBSO_VERSION)
 PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
 AC_SUBST(PKGCONFIG_VERSION)
 
diff --git a/scripts/builddeb b/scripts/builddeb
index b832df6..f28ee02 100755
--- a/scripts/builddeb
+++ b/scripts/builddeb
@@ -20,7 +20,8 @@  fi
 pushd ${ROOT_DIR}/${package}-${version}
 cp -r ${ROOT_DIR}/pkg/debian .
 
-current=$(cat .so_version |awk -F : '{print $1}')
+current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
+	awk -F'=' '{print $2}' |awk -F : '{print $1}')
 rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
 
 sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" debian/control