From: Tim Kientzle Date: Sat, 14 Feb 2009 08:13:15 +0000 (-0500) Subject: Move the version number stamp file and the release.sh/autogen.sh scripts X-Git-Tag: v2.7.0~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee50ecdf2014485046456fcac0e9f728c278c034;p=thirdparty%2Flibarchive.git Move the version number stamp file and the release.sh/autogen.sh scripts out of the root directory and into the 'build' directory. SVN-Revision: 613 --- diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 1e1ee1656..000000000 --- a/autogen.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -xe -mkdir -p config.aux -aclocal -autoheader -autoconf -case `uname` in -Darwin) glibtoolize --automake -c;; -*) libtoolize --automake -c;; -esac -automake -a -c diff --git a/build/autogen.sh b/build/autogen.sh new file mode 100755 index 000000000..1266b3e2c --- /dev/null +++ b/build/autogen.sh @@ -0,0 +1,22 @@ +#!/bin/sh + + +# Start from one level above the build directory +if [ -f version ]; then + cd .. +fi + +if [ \! -f build/version ]; then + echo "Can't find source directory" + exit 1 +fi + +set -xe +aclocal +autoheader +autoconf +case `uname` in +Darwin) glibtoolize --automake -c;; +*) libtoolize --automake -c;; +esac +automake -a -c diff --git a/release.sh b/build/release.sh similarity index 86% rename from release.sh rename to build/release.sh index ef4a0f5b2..d66c90363 100755 --- a/release.sh +++ b/build/release.sh @@ -1,13 +1,22 @@ -#!/bin/sh -x +#!/bin/sh +v PATH=/usr/local/gnu-autotools/bin/:$PATH export PATH -dt=`date` # BSD make's "OBJDIR" support freaks out the automake-generated # Makefile. Effectively disable it. export MAKEOBJDIRPREFIX=/junk +# Start from the build directory, where the version file is located +if [ -f build/version ]; then + cd build +fi + +if [ \! -f version ]; then + echo "Can't find version file" + exit 1 +fi + # Update the build number in the 'version' file. # Separate number from additional alpha/beta/etc marker MARKER=`cat version | sed 's/[0-9.]//g'` @@ -22,6 +31,8 @@ echo $VN$MARKER > version # Build out the string. VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER" +cd .. + # Substitute the integer version into Libarchive's archive.h perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive.h perl -p -i -e "s/^(#define\tARCHIVE_VERSION_STRING).*/\$1 \"libarchive $VS\"/" libarchive/archive.h @@ -46,9 +57,7 @@ rm -rf /usr/obj`pwd` (cd libarchive/test && make cleandir && make clean && make list.h) (cd tar && make cleandir && make clean) -# Build the libarchive distfile and drop it in the right place. -autoreconf -f -v -i +# Build the libarchive distfile +/bin/sh build/autogen.sh ./configure make distcheck -fa=libarchive-$VS.tar.gz -chmod 644 $fa diff --git a/version b/build/version similarity index 100% rename from version rename to build/version