[llvm-commits] CVS: llvm/autoconf/configure.ac
Reid Spencer
reid at x10sys.com
Fri Apr 22 10:02:29 PDT 2005
Changes in directory llvm/autoconf:
configure.ac updated: 1.172 -> 1.173
---
Log message:
Consolidate the target selection options into a single option,
--enable-target which can take values "all", "host-only" or a comma
separated list of target names (alpha,ia64,powerpc,skeleton,sparc,x86)
---
Diffs of the changes: (+30 -43)
configure.ac | 73 ++++++++++++++++++++++++-----------------------------------
1 files changed, 30 insertions(+), 43 deletions(-)
Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.172 llvm/autoconf/configure.ac:1.173
--- llvm/autoconf/configure.ac:1.172 Fri Apr 22 02:27:28 2005
+++ llvm/autoconf/configure.ac Fri Apr 22 12:02:18 2005
@@ -238,49 +238,36 @@
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
-AC_ARG_ENABLE([target-this],AS_HELP_STRING([--enable-target-this],
-[Build only the current host's target (default is NO)]),,enable_target_this=no)
-AC_ARG_ENABLE([target-x86],AS_HELP_STRING([--enable-target-x86],
-[Build the x86 target (default is YES)]),,enable_target_x86=yes)
-AC_ARG_ENABLE([target-x86-64],AS_HELP_STRING([--enable-target-x86-64],
-[Build the x86_64 target (default is YES)]),,enable_target_x86_64=yes)
-AC_ARG_ENABLE([target-sparc],AS_HELP_STRING([--enable-target-sparc],
-[Build the Sparc target (default is YES)]),,enable_target_sparc=yes)
-AC_ARG_ENABLE([target-powerpc],AS_HELP_STRING([--enable-target-powerpc],
-[Build the PowerPC target (default is YES)]),,enable_target_powerpc=yes)
-AC_ARG_ENABLE([target-alpha],AS_HELP_STRING([--enable-target-alpha],
-[Build the Alpha target (default is YES)]),,enable_target_alpha=yes)
-AC_ARG_ENABLE(]target-ia64],AS_HELP_STRING([--enable-target-ia64],
-[Build the IA64 target (default is YES)]),,enable_target_ia64=yes)
-
-if test "$enable_target_this" = "yes" ; then
- case "$llvm_cv_target_arch" in
- x86) TARGETS_TO_BUILD="X86" ;;
- x86_64) TARGETS_TO_BUILD="X86" ;;
- Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
- PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
- Alpha) TARGETS_TO_BUILD="Alpha" ;;
- IA64) TARGETS_TO_BUILD="IA64" ;;
- *) AC_MSG_ERROR([Can not set target to build]) ;;
- esac
-else
- if test "$enable_target_x86" = "yes" -o "$enable_target_x86_64" = "yes" ; then
- TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD"
- fi
- if test "$enable_target_sparc" = "yes" ; then
- TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD"
- fi
- if test "$enable_target_powerpc" = "yes" ; then
- TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD"
- fi
- if test "$enable_target_alpha" = "yes" ; then
- TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD"
- fi
- if test "$enable_target_ia64" = "yes" ; then
- TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD"
- fi
-fi
-
+AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-target],
+ [Build specific host targets: all,host-only,{target-name} (default=all)]),,
+ enableval=all)
+case "$enableval" in
+ all) TARGETS_TO_BUILD="X86 SparcV8 SparcV9 PowerPC Alpha IA64" ;;
+ host-only)
+ case "$llvm_cv_target_arch" in
+ x86) TARGETS_TO_BUILD="X86" ;;
+ x86_64) TARGETS_TO_BUILD="X86" ;;
+ Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
+ PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
+ Alpha) TARGETS_TO_BUILD="Alpha" ;;
+ IA64) TARGETS_TO_BUILD="IA64" ;;
+ *) AC_MSG_ERROR([Can not set target to build]) ;;
+ esac
+ ;;
+ *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
+ case "$a_target" in
+ x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
+ x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
+ sparc) TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD" ;;
+ powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
+ alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
+ ia64) TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD" ;;
+ skeleton)TARGETS_TO_BUILD="Skeleton $TARGETS_TO_BUILD";;
+ *) AC_MSG_ERROR([Unrecognized target $a_target]) ;;
+ esac
+ done
+ ;;
+esac
AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)
dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.
More information about the llvm-commits
mailing list