blob: 20560412c5186d74ad33d4152596189b4523aef0 [file] [log] [blame]
# build script
# This file was developed by Reid Spencer and is distributed under the
# University of Illinois Open Source License. See LICENSE.TXT for details.
# This script allows LLVM modules to be built. Specify the modules you want to
# build on the command line; or leave it blank to specify the currently checked
# out modules. Any dependencies will be checked out and built before the
# specified list. You can also specify build options. See the README.txt file.
# Get the library.
if test ! -z "$LLVM_TOP" ; then
if test -f "$LLVM_TOP/" ; then
. "$LLVM_TOP/"
echo "Your LLVM_TOP variable is not set to an llvm-top directory"
exit 1
elif test -f ./ ; then
. ./
elif test -f ../ ; then
. ../
echo Please run $0 from the llvm-top directory or a module directory.
exit 1
# Process the arguments so that anything starting with - is passed down to the
# configure scripts while anything else is a module name. Collect the arguments
# in appropriate variables for later use.
process_arguments "$@"
# Get (and possibly check out) the set of modules and their dependencies. This
# sets the MODULE_DEPENDENCIES variable to the set of module names that should
# be configured, in the correct order (least dependent first, no duplicates).
get_module_dependencies $MODULES
# Build a list of the static build options we'll pass to the modules
# Now that we have a list of dependent modules, we must configure each of them
# according to the specifications of the module.
for mod in $MODULE_DEPENDENCIES ; do
build_a_module "$mod"
# Just indicate what modules we configured
msg 1 Modules built:"$MODULE_DEPENDENCIES".