3 # This includes the Bourne shell library from llvm-top. Since this file is
4 # generally only used when building from llvm-top, it is safe to assume that
5 # llvm is checked out into llvm-top in which case .. just works.
8 # Process the options passed in to us by the build script into standard
10 process_arguments
"$@"
12 # First, see if the build directory is there. If not, create it.
13 build_dir
="$LLVM_TOP/build.llvm"
14 if test ! -d "$build_dir" ; then
18 # See if we have previously been configured by sensing the presence
19 # of the config.status scripts
20 config_status
="$build_dir/config.status"
21 if test ! -f "$config_status" -o "$config_status" -ot "$0" ; then
22 # We must configure so build a list of configure options
23 config_options
="--prefix=$PREFIX --with-llvmgccdir=$PREFIX"
24 if test "$OPTIMIZED" -eq 1 ; then
25 config_options
="$config_options --enable-optimized"
27 config_options
="$config_options --disable-optimized"
29 if test "$DEBUG" -eq 1 ; then
30 config_options
="$config_options --enable-debug"
32 config_options
="$config_options --disable-debug"
34 if test "$ASSERTIONS" -eq 1 ; then
35 config_options
="$config_options --enable-assertions"
37 config_options
="$config_options --disable-assertions"
39 if test "$CHECKING" -eq 1 ; then
40 config_options
="$config_options --enable-expensive-checks"
42 config_options
="$config_options --disable-expensive-checks"
44 if test "$DOXYGEN" -eq 1 ; then
45 config_options
="$config_options --enable-doxygen"
47 config_options
="$config_options --disable-doxygen"
49 if test "$THREADS" -eq 1 ; then
50 config_options
="$config_options --enable-threads"
52 config_options
="$config_options --disable-threads"
54 config_options
="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH"
57 msg
0 Configuring
$module with
:
58 msg
0 " $src_dir/configure" $config_options
59 $src_dir/configure
$config_options || \
60 die $?
"Configuring $module module failed"
62 msg
0 Module
$module already configured
, ignoring configure options.
66 msg
0 Building
$module with
:
67 msg
0 " make" $OPTIONS_ASSIGN tools-only
68 make $OPTIONS_ASSIGN tools-only