diff options
author | David Allsopp <david.allsopp@metastack.com> | 2020-04-17 14:11:22 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2020-04-17 14:11:22 +0100 |
commit | ac2a9dd188f0738a87018f5ee6e6b0b301bb1b63 (patch) | |
tree | ef3b5d03c80540cc5995a864f90cc95226ac93d8 /configure | |
parent | be6eb2ccdabb957c4817b8a24280b2f4249ac87f (diff) | |
download | ocaml-ac2a9dd188f0738a87018f5ee6e6b0b301bb1b63.tar.gz |
Cease committing C dependendency information
When building for the first time, the only requirement is that generated
header files have been built (jumptbl.h, version.h and opnames.h).
Detailed dependency information is only required when headers have been
edited.
COMPUTE_DEPS in Makefile.config controls whether C dependency
information should be generated on a per-file basis. This variable is
controlled by a new --disable-dependency-generation in configure which
is enabled for Git checkouts and disabled for tarballs (i.e. releases).
The Microsoft C compiler (cl) cannot generate dependencies in a
consistent way which we can consume, so for a Git checkout configure
searches for an additional C compiler in order to compute dependencies.
This is obviously not required for a user-build.
As a result, the MSVC port can now safely run make alldepend, since only
OCaml dependency information is committed to the repo after this change.
CI does not need to waste time testing the dependency information,
because it only tests a single build. A single Travis job has been added
which tests the build system code to generate the dependency information
(and provides a single `make -j` run in CI, although Inria's CI also
tests parallel building continuously).
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 142 |
1 files changed, 142 insertions, 0 deletions
@@ -698,6 +698,8 @@ DIRECT_LD INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +ac_ct_DEP_CC +DEP_CC CPP LT_SYS_LIBRARY_PATH OTOOL64 @@ -747,6 +749,7 @@ build_os build_vendor build_cpu build +compute_deps stdlib_manpages PACKLD flexlink_flags @@ -885,6 +888,7 @@ ac_user_opts=' enable_option_checking enable_debug_runtime enable_debugger +enable_dependency_generation enable_instrumented_runtime enable_vmthreads enable_systhreads @@ -1558,6 +1562,8 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-debug-runtime do not build runtime with debugging support --enable-debugger build the debugger [default=auto] + --disable-dependency-generation + do not compute dependency information for C sources --enable-instrumented-runtime build the instrumented runtime [default=auto] @@ -2898,6 +2904,7 @@ VERSION=4.12.0+dev0-2020-04-22 + ## Generated files ac_config_files="$ac_config_files Makefile.build_config" @@ -3062,6 +3069,14 @@ else fi +# Check whether --enable-dependency-generation was given. +if test "${enable_dependency_generation+set}" = set; then : + enableval=$enable_dependency_generation; +else + enable_dependency_generation=auto +fi + + # Check whether --enable-instrumented-runtime was given. @@ -12269,6 +12284,133 @@ CC=$lt_save_CC host_os=$old_host_os +case $host in #( + *-pc-windows) : + if test -n "$ac_tool_prefix"; then + for ac_prog in $DEP_CC gcc cc x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DEP_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DEP_CC"; then + ac_cv_prog_DEP_CC="$DEP_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DEP_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DEP_CC=$ac_cv_prog_DEP_CC +if test -n "$DEP_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEP_CC" >&5 +$as_echo "$DEP_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DEP_CC" && break + done +fi +if test -z "$DEP_CC"; then + ac_ct_DEP_CC=$DEP_CC + for ac_prog in $DEP_CC gcc cc x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DEP_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DEP_CC"; then + ac_cv_prog_ac_ct_DEP_CC="$ac_ct_DEP_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DEP_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DEP_CC=$ac_cv_prog_ac_ct_DEP_CC +if test -n "$ac_ct_DEP_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DEP_CC" >&5 +$as_echo "$ac_ct_DEP_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DEP_CC" && break +done + + if test "x$ac_ct_DEP_CC" = x; then + DEP_CC="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DEP_CC=$ac_ct_DEP_CC + fi +fi + ;; #( + *) : + DEP_CC="$CC" ;; +esac + +case $enable_dependency_generation in #( + yes) : + if test "$DEP_CC" = "false"; then : + as_fn_error $? "The MSVC ports cannot generate dependency information. Install gcc (or another CC-like compiler)" "$LINENO" 5 +else + compute_deps=true +fi ;; #( + no) : + compute_deps=false ;; #( + *) : + if test -e .git; then : + if test "$DEP_CC" = "false"; then : + compute_deps=false +else + compute_deps=true +fi +else + compute_deps=false +fi ;; +esac + # Extracting information from libtool's configuration if test -n "$RANLIB" ; then : RANLIBCMD="$RANLIB" |