Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 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. |
| 6 | . ../library.sh |
| 7 | |
| 8 | # Process the options passed in to us by the build script into standard |
| 9 | # variables. |
Reid Spencer | 22b0b94 | 2007-07-21 09:33:41 +0000 | [diff] [blame^] | 10 | process_arguments "$@" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 11 | |
| 12 | # See if we have previously been configured by sensing the presense |
| 13 | # of the config.status scripts |
| 14 | if test ! -x "config.status" ; then |
| 15 | # We must configure so build a list of configure options |
| 16 | config_options="--prefix=$PREFIX --with-llvmgccdir=$PREFIX" |
| 17 | config_options="$config_options $OPTIONS_DASH $OPTIONS_DASH_DASH" |
| 18 | msg 0 Configuring $module with: |
| 19 | msg 0 " ./configure" $config_options |
| 20 | ./configure $config_options || (echo "Can't configure llvm" ; exit 1) |
| 21 | fi |
| 22 | |
| 23 | msg 0 Building $module with: |
| 24 | msg 0 " make" $OPTIONS_ASSIGN tools-only |
| 25 | make $OPTIONS_ASSIGN tools-only |