blob: 0f87faef78965dff6607151cf0442300e5530ebb [file] [log] [blame]
Reid Spencerf8031b92007-07-16 08:05:18 +00001#!/bin/sh
2
3is_debug=1
4for arg in "$@" ; do
5 case "$arg" in
6 LLVM_TOP=*)
7 LLVM_TOP=`echo "$arg" | sed -e 's/LLVM_TOP=//'`
8 ;;
9 PREFIX=*)
10 PREFIX=`echo "$arg" | sed -e 's/PREFIX=//'`
11 ;;
12 *=*)
13 build_opts="$build_opts $arg"
14 ;;
15 --*)
16 config_opts="$config_opts $arg"
17 ;;
18 esac
19done
20
21# See if we have previously been configured by sensing the presense
22# of the config.status scripts
Reid Spencer19dc0de2007-07-16 22:54:42 +000023if test ! -x "config.status" ; then
Reid Spencerf8031b92007-07-16 08:05:18 +000024 # We must configure so build a list of configure options
25 config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
Reid Spencerb7b081d2007-07-16 22:25:13 +000026 config_options="$config_options $config_opts"
27 echo ./configure $config_options
28 ./configure $config_options || (echo "Can't configure llvm" ; exit 1)
Reid Spencerf8031b92007-07-16 08:05:18 +000029fi
30
31echo make $build_opts '&&' make install $build_opts
32make $build_opts && make install $build_opts