summaryrefslogtreecommitdiff
path: root/projects/sample/autoconf/AutoRegen.sh
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-01-05 06:41:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-01-05 06:41:10 +0000
commit38fd88a820154f3d3229e4b42c58e9938e9161e5 (patch)
tree749599acb57c7c6c8a6c151f69687c641d0b08ff /projects/sample/autoconf/AutoRegen.sh
parent2f654ba6271ded431a4295814417aa940bfb9d27 (diff)
downloadllvm-38fd88a820154f3d3229e4b42c58e9938e9161e5.tar.gz
llvm-38fd88a820154f3d3229e4b42c58e9938e9161e5.tar.bz2
llvm-38fd88a820154f3d3229e4b42c58e9938e9161e5.tar.xz
Cleanup configuration for Cygwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects/sample/autoconf/AutoRegen.sh')
-rwxr-xr-xprojects/sample/autoconf/AutoRegen.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/projects/sample/autoconf/AutoRegen.sh b/projects/sample/autoconf/AutoRegen.sh
new file mode 100755
index 0000000000..2655f21dc0
--- /dev/null
+++ b/projects/sample/autoconf/AutoRegen.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+die () {
+ echo "$@" 1>&2
+ exit 1
+}
+test -d autoconf && test -f autoconf/configure.ac && cd autoconf
+test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first"
+autoconf --version | egrep '2\.5[0-9]' > /dev/null
+if test $? -ne 0 ; then
+ die "Your autoconf was not detected as being 2.5x"
+fi
+cwd=`pwd`
+if test -d ../../../autoconf/m4 ; then
+ cd ../../../autoconf/m4
+ llvm_m4=`pwd`
+ cd $cwd
+elif test -d ../../llvm/autoconf/m4 ; then
+ cd ../../llvm/autoconf/m4
+ llvm_m4=`pwd`
+ cd $cwd
+else
+ die "Can't find the LLVM autoconf/m4 directory. llvm-test should be checked out to projects directory"
+fi
+echo "Regenerating aclocal.m4 with aclocal"
+rm -f aclocal.m4
+aclocal -I $cwd/m4 -I $llvm_m4 || die "aclocal failed"
+echo "Regenerating configure with autoconf 2.5x"
+autoconf --force --warnings=all -o ../configure configure.ac || die "autoconf failed"
+cd ..
+exit 0