[llvm-commits] [llvm] r42526 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac bindings/Makefile test/Makefile

Gordon Henriksen gordonhenriksen at mac.com
Tue Oct 2 02:50:18 PDT 2007


Author: gordon
Date: Tue Oct  2 04:50:18 2007
New Revision: 42526

URL: http://llvm.org/viewvc/llvm-project?rev=42526&view=rev
Log:
Add explicit --enable-bindings option to configure.

Modified:
    llvm/trunk/Makefile.config.in
    llvm/trunk/autoconf/configure.ac
    llvm/trunk/bindings/Makefile
    llvm/trunk/test/Makefile

Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=42526&r1=42525&r2=42526&view=diff

==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Tue Oct  2 04:50:18 2007
@@ -168,6 +168,9 @@
 
 LIBS       := @LIBS@
 
+# Targets that we should build
+TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
+
 # Path to location for LLVM C/C++ front-end. You can modify this if you
 # want to override the value set by configure.
 LLVMGCCDIR := @LLVMGCCDIR@
@@ -259,3 +262,8 @@
 # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
 # on the check.
 HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
+
+# Bindings that we should build
+BINDINGS_TO_BUILD = @BINDINGS_TO_BUILD@
+ALL_BINDINGS = @ALL_BINDINGS@
+

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=42526&r1=42525&r2=42526&view=diff

==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Oct  2 04:50:18 2007
@@ -432,6 +432,24 @@
 esac
 AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS)
 
+dnl Allow specific bindings to be specified for building (or not)
+AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings],
+    [Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),,
+    enableval=default)
+BINDINGS_TO_BUILD=""
+case "$enableval" in
+  all | yes | default | auto) BINDINGS_TO_BUILD="auto" ;;
+  all ) BINDINGS_TO_BUILD="ocaml" ;;
+  none | no) BINDINGS_TO_BUILD="" ;;
+  *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do
+      case "$a_binding" in
+        ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;;
+        *) AC_MSG_ERROR([Unrecognized binding $a_binding]) ;;
+      esac
+  done 
+  ;;
+esac
+
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 4: Check for programs we need and that they are the right version
@@ -855,6 +873,19 @@
 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", 
                    [Time at which LLVM was configured])
 
+# Determine which bindings to build.
+if test "$BINDINGS_TO_BUILD" = auto ; then
+  BINDINGS_TO_BUILD=""
+  if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then
+    BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD"
+  fi
+fi
+AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD)
+
+# This isn't really configurey, but it avoids having to repeat the list in
+# other files.
+AC_SUBST(ALL_BINDINGS,ocaml)
+
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 10: Specify the output files and generate it

Modified: llvm/trunk/bindings/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/Makefile?rev=42526&r1=42525&r2=42526&view=diff

==============================================================================
--- llvm/trunk/bindings/Makefile (original)
+++ llvm/trunk/bindings/Makefile Tue Oct  2 04:50:18 2007
@@ -11,8 +11,6 @@
 
 include $(LEVEL)/Makefile.config
 
-ifdef OCAMLC
-PARALLEL_DIRS += ocaml
-endif
+PARALLEL_DIRS = $(BINDINGS_TO_BUILD)
 
 include $(LEVEL)/Makefile.common

Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=42526&r1=42525&r2=42526&view=diff

==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Tue Oct  2 04:50:18 2007
@@ -34,9 +34,7 @@
 IGNORE_TESTS += llvm2cpp.exp
 endif
 
-ifndef OCAMLC
-IGNORE_TESTS += ocaml.exp
-endif
+IGNORE_TESTS += $(filter-out $(BINDINGS_TO_BUILD:=.exp),$(ALL_BINDINGS:=.exp))
 
 ifdef IGNORE_TESTS
 RUNTESTFLAGS += --ignore "$(strip $(IGNORE_TESTS))"





More information about the llvm-commits mailing list