llvm.org GIT mirror llvm / 6530e9d
Add explicit --enable-bindings option to configure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42526 91177308-0d34-0410-b5e6-96231b3b80d8 Gordon Henriksen 11 years ago
4 changed file(s) with 41 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
167167
168168 LIBS := @LIBS@
169169
170 # Targets that we should build
171 TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
172
170173 # Path to location for LLVM C/C++ front-end. You can modify this if you
171174 # want to override the value set by configure.
172175 LLVMGCCDIR := @LLVMGCCDIR@
258261 # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
259262 # on the check.
260263 HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
264
265 # Bindings that we should build
266 BINDINGS_TO_BUILD = @BINDINGS_TO_BUILD@
267 ALL_BINDINGS = @ALL_BINDINGS@
268
431431 esac
432432 AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS)
433433
434 dnl Allow specific bindings to be specified for building (or not)
435 AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings],
436 [Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),,
437 enableval=default)
438 BINDINGS_TO_BUILD=""
439 case "$enableval" in
440 all | yes | default | auto) BINDINGS_TO_BUILD="auto" ;;
441 all ) BINDINGS_TO_BUILD="ocaml" ;;
442 none | no) BINDINGS_TO_BUILD="" ;;
443 *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do
444 case "$a_binding" in
445 ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;;
446 *) AC_MSG_ERROR([Unrecognized binding $a_binding]) ;;
447 esac
448 done
449 ;;
450 esac
451
434452 dnl===-----------------------------------------------------------------------===
435453 dnl===
436454 dnl=== SECTION 4: Check for programs we need and that they are the right version
854872 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
855873 [Time at which LLVM was configured])
856874
875 # Determine which bindings to build.
876 if test "$BINDINGS_TO_BUILD" = auto ; then
877 BINDINGS_TO_BUILD=""
878 if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then
879 BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD"
880 fi
881 fi
882 AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD)
883
884 # This isn't really configurey, but it avoids having to repeat the list in
885 # other files.
886 AC_SUBST(ALL_BINDINGS,ocaml)
887
857888 dnl===-----------------------------------------------------------------------===
858889 dnl===
859890 dnl=== SECTION 10: Specify the output files and generate it
1010
1111 include $(LEVEL)/Makefile.config
1212
13 ifdef OCAMLC
14 PARALLEL_DIRS += ocaml
15 endif
13 PARALLEL_DIRS = $(BINDINGS_TO_BUILD)
1614
1715 include $(LEVEL)/Makefile.common
3333 IGNORE_TESTS += llvm2cpp.exp
3434 endif
3535
36 ifndef OCAMLC
37 IGNORE_TESTS += ocaml.exp
38 endif
36 IGNORE_TESTS += $(filter-out $(BINDINGS_TO_BUILD:=.exp),$(ALL_BINDINGS:=.exp))
3937
4038 ifdef IGNORE_TESTS
4139 RUNTESTFLAGS += --ignore "$(strip $(IGNORE_TESTS))"