From c05f1ee5e52cfa8e37e21b381e42681e5edef330 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Wed, 4 May 2016 22:35:23 -0700 Subject: Make run_release.sh handle build directory missing / not empty --- xdelta3/Makefile.am | 4 ++-- xdelta3/configure.ac | 3 ++- xdelta3/install-sh | 2 +- xdelta3/run_release.sh | 15 +++++++++++---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/xdelta3/Makefile.am b/xdelta3/Makefile.am index 2280083..d89584d 100644 --- a/xdelta3/Makefile.am +++ b/xdelta3/Makefile.am @@ -46,7 +46,7 @@ xdelta3checksum_SOURCES = $(common_SOURCES) \ # not automatically built or run. Install Go-1.5.x or later, add # `pwd`/go in $GOPATH, and (cd go/src && go run regtest.go). # TODO(jmacd): replace hard-coded path names in regtest.go w/ flags. -GOLANG_SOURCES = \ +GOLANG_SRCS = \ go/src/xdelta/test.go \ go/src/xdelta/rstream.go \ go/src/xdelta/tgroup.go \ @@ -123,7 +123,7 @@ EXTRA_DIST = \ README.md \ run_release.sh \ draft-korn-vcdiff.txt \ - $(GOLANG_SOURCES) \ + $(GOLANG_SRCS) \ examples/Makefile \ examples/README.md \ examples/compare_test.c \ diff --git a/xdelta3/configure.ac b/xdelta3/configure.ac index a6ba41a..5d81f38 100644 --- a/xdelta3/configure.ac +++ b/xdelta3/configure.ac @@ -3,7 +3,8 @@ AC_INIT([Xdelta3], [3.1.1], [josh.macdonald@gmail.com], AC_PREREQ([2.68]) AC_CONFIG_MACRO_DIR([m4]) LT_INIT -AM_INIT_AUTOMAKE([1.9 no-define foreign tar-ustar subdir-objects]) +AM_INIT_AUTOMAKE([1.15 no-define foreign tar-ustar subdir-objects]) +AC_CONFIG_MACRO_DIRS([m4]) AX_CHECK_ALIGNED_ACCESS_REQUIRED AC_PROG_CC diff --git a/xdelta3/install-sh b/xdelta3/install-sh index 292a426..545f111 120000 --- a/xdelta3/install-sh +++ b/xdelta3/install-sh @@ -1 +1 @@ -/usr/share/automake-1.14/install-sh \ No newline at end of file +/opt/local/share/automake-1.15/install-sh \ No newline at end of file diff --git a/xdelta3/run_release.sh b/xdelta3/run_release.sh index a6933b5..ca1e47e 100755 --- a/xdelta3/run_release.sh +++ b/xdelta3/run_release.sh @@ -5,7 +5,7 @@ SRCDIR=${PWD} # TODO replace w/ wget LZMA="xz-5.2.1" -LZMA_FILE="${SRCDIR}/../${LZMA}.tar.xz" +LZMA_FILE="${SRCDIR}/../${LZMA}.tar.gz" MAKEFLAGS="-j 10" @@ -40,15 +40,22 @@ if [ "${TMPDIR}" != "" ]; then XTMP="${TMPDIR}" fi -find build -type f 2> /dev/null | xargs rm -f +BUILDFILES=`ls -A ${BUILDDIR} 2> /dev/null` +if [ -d "${BUILDDIR}" ]; then + if [ -n "${BUILDFILES}" ]; then + echo "Directory ${BUILDDIR} should be empty" + exit 1 + fi +else + mkdir "${BUILDDIR}" +fi function setup { - libtoolize + libtoolize || glibtoolize automake --add-missing aclocal -I m4 autoheader automake - autoheader autoconf } -- cgit v1.2.3