EXTRA_DIST= \
CMakeLists.txt \
build/autogen.sh \
- build/release.sh \
+ build/bump-version.sh \
+ build/clean.sh \
build/cmake \
build/version \
build/windows \
#!/bin/sh
+PATH=/usr/local/gnu-autotools/bin/:$PATH
+export PATH
# Start from one level above the build directory
if [ -f version ]; then
exit 1
fi
+# 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'`
+# Bump the number
+VN=`cat version | sed 's/[^0-9.]//g'`
+# Build out the string.
+VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
+
+cd ..
+
+# Clean up the source dir as much as we can.
+/bin/sh build/clean.sh
+
+# 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
+# Substitute versions into configure.ac as well
+perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_S\]),.*\)/$1,['"$VS"'])/' configure.ac
+perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' configure.ac
+
set -xe
aclocal -I build/autoconf
autoconf
autoheader
automake -a -c
+
+./configure
+make distcheck
--- /dev/null
+#!/bin/sh +v
+
+# 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'`
+# Bump the number
+VN=`cat version | sed 's/[^0-9.]//g'`
+# Reassemble and write back out
+VN=$(($VN + 1))
+rm -f version.old
+mv version version.old
+chmod +w version.old
+echo $VN$MARKER > version
+VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
+cd ..
+
+ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"
+
+echo $ANNOUNCE
+
+# Add a version notice to NEWS
+mv NEWS NEWS.bak
+chmod +w NEWS.bak
+echo > NEWS
+echo $ANNOUNCE >> NEWS
+cat NEWS.bak >> NEWS
--- /dev/null
+#!/bin/sh
+
+if [ \! -f build/version ]; then
+ echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
+ exit 1
+fi
+
+#
+# The automake-generated 'maintainer-clean' target does clean up a
+# lot. If that fails, try plain 'clean' in case we're using the cmake
+# or other makefile. But don't worry if we can't...
+#
+make maintainer-clean || make clean || true
+
+# If we're on BSD, blow away the build dir under /usr/obj
+rm -rf /usr/obj`pwd`
+
+#
+# Try to clean up a bit more...
+#
+find . -name '*~' | xargs rm
+find . -name '*.rej' | xargs rm
+find . -name '*.orig' | xargs rm
+find . -name '*.o' | xargs rm
+find . -name '*.po' | xargs rm
+find . -name '*.lo' | xargs rm
+find . -name '*.So' | xargs rm
+find . -name '*.a' | xargs rm
+find . -name '*.la' | xargs rm
+find . -name '.depend' | xargs rm
+find . -name '.dirstamp' | xargs rm
+find . -name '.deps' | xargs rm -rf
+find . -name '.libs' | xargs rm -rf
+rm -rf autom4te.cache
+rm -f bsdcpio bsdcpio_test bsdtar bsdtar_test libarchive_test
+rm -f libtool aclocal.m4 config.h config.h.in
+rm -f doc/man/* doc/pdf/* doc/wiki/* doc/html/* doc/text/*
+rm -f config.log Makefile.in configure config.status stamp-h1
+rm -f libarchive/*.[35].gz libarchive/libarchive.so*
+rm -f libarchive/test/libarchive_test libarchive/test/list.h
+rm -f tar/*.1.gz tar/bsdtar tar/test/bsdtar_test tar/test/list.h
+rm -f cpio/*.1.gz cpio/bsdcpio cpio/test/bsdcpio_test cpio/test/list.h
+rm -f build/autoconf/compile build/autoconf/config.* build/autoconf/ltmain.sh
+rm -f build/autoconf/install-sh build/autoconf/depcomp build/autoconf/missing
+rm -f build/pkgconfig/libarchive.pc
+++ /dev/null
-#!/bin/sh +v
-
-PATH=/usr/local/gnu-autotools/bin/:$PATH
-export PATH
-
-# 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'`
-# Bump the number
-VN=`cat version | sed 's/[^0-9.]//g'`
-# Reassemble and write back out
-VN=$(($VN + 1))
-rm -f version.old
-mv version version.old
-chmod +w version.old
-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
-# Substitute the string version into tar and cpio Makefiles
-perl -p -i -e "s/^(BSDTAR_VERSION_STRING)=.*/\$1=$VS/" tar/Makefile
-perl -p -i -e "s/^(BSDCPIO_VERSION_STRING)=.*/\$1=$VS/" cpio/Makefile
-# Substitute versions into configure.ac as well
-perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_S\]),.*\)/$1,['"$VS"'])/' configure.ac
-perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' configure.ac
-
-# Add a version notice to NEWS
-mv NEWS NEWS.bak
-chmod +w NEWS.bak
-echo > NEWS
-echo `date +"%b %d, %Y:"` libarchive $VS released >> NEWS
-cat NEWS.bak >> NEWS
-
-# Clean up first
-rm -rf /usr/obj`pwd`
-(cd examples/minitar && make cleandir && make clean)
-(cd libarchive && make cleandir && make clean)
-(cd libarchive/test && make cleandir && make clean && make list.h)
-(cd tar && make cleandir && make clean)
-
-# Build the libarchive distfile
-/bin/sh build/autogen.sh
-./configure
-make distcheck