From 17d3c61edd35de8fa884944fc70d1db86daa5dd8 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 28 Sep 2010 10:59:53 +0300 Subject: Move version.sh to build-aux. --- Makefile.am | 4 ++-- build-aux/version.sh | 24 ++++++++++++++++++++++++ configure.ac | 2 +- version.sh | 24 ------------------------ windows/build.bash | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 build-aux/version.sh delete mode 100644 version.sh diff --git a/Makefile.am b/Makefile.am index 9d6cf1ec..34b49fa7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,13 +32,13 @@ EXTRA_DIST = \ dos \ windows \ autogen.sh \ - version.sh \ Doxyfile.in \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ INSTALL.generic \ - PACKAGERS + PACKAGERS \ + build-aux/version.sh ACLOCAL_AMFLAGS = -I m4 diff --git a/build-aux/version.sh b/build-aux/version.sh new file mode 100644 index 00000000..40d04936 --- /dev/null +++ b/build-aux/version.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +############################################################################# +# +# Get the version string from version.h and print it out without +# trailing newline. This makes it suitable for use in configure.ac. +# +############################################################################# +# +# Author: Lasse Collin +# +# This file has been put into the public domain. +# You can do whatever you want with this file. +# +############################################################################# + +sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/ + s/LZMA_VERSION_STABILITY_BETA/beta/ + s/LZMA_VERSION_STABILITY_STABLE// + s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \ + src/liblzma/api/lzma/version.h \ + | tr '\n' '|' \ + | sed 's/|/./; s/|/./; s/|//g' \ + | tr -d '\n' diff --git a/configure.ac b/configure.ac index 8c61b5da..d616e7b8 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PREREQ([2.64]) -AC_INIT([XZ Utils], m4_esyscmd([/bin/sh version.sh]), +AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]), [lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/]) AC_CONFIG_SRCDIR([src/liblzma/common/common.h]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/version.sh b/version.sh deleted file mode 100644 index 40d04936..00000000 --- a/version.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -############################################################################# -# -# Get the version string from version.h and print it out without -# trailing newline. This makes it suitable for use in configure.ac. -# -############################################################################# -# -# Author: Lasse Collin -# -# This file has been put into the public domain. -# You can do whatever you want with this file. -# -############################################################################# - -sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/ - s/LZMA_VERSION_STABILITY_BETA/beta/ - s/LZMA_VERSION_STABILITY_STABLE// - s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \ - src/liblzma/api/lzma/version.h \ - | tr '\n' '|' \ - | sed 's/|/./; s/|/./; s/|//g' \ - | tr -d '\n' diff --git a/windows/build.bash b/windows/build.bash index e6754358..7119cf6c 100644 --- a/windows/build.bash +++ b/windows/build.bash @@ -172,7 +172,7 @@ txtcp pkg "" windows/README-Windows.txt # Create the package. This requires 7z.exe from 7-Zip. If it wasn't found, # this step is skipped and you have to zip it yourself. -VER=$(sh version.sh) +VER=$(sh build-aux/version.sh) cd pkg if [ -x "$SEVENZ_EXE" ]; then "$SEVENZ_EXE" a -tzip ../xz-$VER-windows.zip * -- cgit v1.2.3