mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
2532fa21a9
- This currently just moves over all of the behavior from LLVM. Eventually all of the configure checks that are directly needed by the LLVM build setup should probably go away, and the project should manage their own configuration checks if necessary. - This is the 1st half of this work, the actual Makefile.common hasn't moved over yet. I've tried to stage this in such a way that incremental builds will properly reconfigure for most active developers (the Makefiles don't handle reconfiguring in a perfectly reliable way, and I haven't found an easy way to make them do so). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142456 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/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\.[56][0-9]' > /dev/null
|
|
if test $? -ne 0 ; then
|
|
die "Your autoconf was not detected as being 2.5x or 2.6x"
|
|
fi
|
|
cwd=`pwd`
|
|
if test -d ../../../autoconf/m4 ; then
|
|
cd ../../../autoconf/m4
|
|
llvm_src_root=../..
|
|
llvm_obj_root=../..
|
|
cd $cwd
|
|
elif test -d ../../llvm/autoconf/m4 ; then
|
|
cd ../../llvm/autoconf/m4
|
|
llvm_src_root=../..
|
|
llvm_obj_root=../..
|
|
cd $cwd
|
|
else
|
|
while true ; do
|
|
echo "LLVM source root not found."
|
|
read -p "Enter full path to LLVM source:" REPLY
|
|
if test -d "$REPLY/autoconf/m4" ; then
|
|
llvm_src_root="$REPLY"
|
|
read -p "Enter full path to LLVM objects (empty for same as source):" REPLY
|
|
if test -d "$REPLY" ; then
|
|
llvm_obj_root="$REPLY"
|
|
else
|
|
llvm_obj_root="$llvm_src_root"
|
|
fi
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
echo "Regenerating aclocal.m4 with aclocal"
|
|
rm -f aclocal.m4
|
|
aclocal -I $cwd/m4 || die "aclocal failed"
|
|
echo "Regenerating configure with autoconf"
|
|
autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed"
|
|
cd ..
|
|
exit 0
|