llvm.org GIT mirror llvm / 2603580
Patch to build llvm with srcdir != objdir from llvm-top. By Michael Schuerig, with some small tweaks to make the "don't configure if already configured" logic work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62842 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 10 years ago
2 changed file(s) with 16 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
0 DepModule:
11 BuildCmd: ./build-for-llvm-top.sh
2 CleanCmd: make clean
3 InstallCmd: make install
2 CleanCmd: make clean -C ../build.llvm
3 InstallCmd: make install -C ../build.llvm
88 # variables.
99 process_arguments "$@"
1010
11 # First, see if the build directory is there. If not, create it.
12 build_dir="$LLVM_TOP/build.llvm"
13 if test ! -d "$build_dir" ; then
14 mkdir -p "$build_dir"
15 fi
16
1117 # See if we have previously been configured by sensing the presence
1218 # of the config.status scripts
13 if test ! -x "config.status" ; then
19 config_status="$build_dir/config.status"
20 if test ! -f "$config_status" -o "$config_status" -ot "$0" ; then
1421 # We must configure so build a list of configure options
1522 config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
1623 if test "$OPTIMIZED" -eq 1 ; then
4451 config_options="$config_options --disable-threads"
4552 fi
4653 config_options="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH"
54 src_dir=`pwd`
55 cd "$build_dir"
4756 msg 0 Configuring $module with:
48 msg 0 " ./configure" $config_options
49 $LLVM_TOP/llvm/configure $config_options || \
50 die $? "Configuring llvm module failed"
57 msg 0 " $src_dir/configure" $config_options
58 $src_dir/configure $config_options || \
59 die $? "Configuring $module module failed"
5160 else
5261 msg 0 Module $module already configured, ignoring configure options.
62 cd "$build_dir"
5363 fi
5464
5565 msg 0 Building $module with: