From 5eb18343591f69998099bd424362faa9d5a6a2e1 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 16 Jul 2018 14:12:19 +0200 Subject: Remove undocumented and unused lazy configure --- make/lazy_configure.mk | 82 ---------------------------------- otp_build | 116 ------------------------------------------------- 2 files changed, 198 deletions(-) delete mode 100644 make/lazy_configure.mk diff --git a/make/lazy_configure.mk b/make/lazy_configure.mk deleted file mode 100644 index c74f216de0..0000000000 --- a/make/lazy_configure.mk +++ /dev/null @@ -1,82 +0,0 @@ -# ``Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# The Initial Developer of the Original Code is Ericsson Utvecklings AB. -# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings -# AB. All Rights Reserved.'' -# -# $Id$ -# - -ifndef EXPECTED_AUTOCONF_VERSION -EXPECTED_AUTOCONF_VERSION=2.59 -endif -SAVE_ARGS=$(ERL_TOP)/make/save_args -CONFIG_STATUS=$(CONFIGURE_DIR)/$(TARGET)/config.status -SAVED_CONFIG_FLAGS_FILE=$(CONFIGURE_DIR)/$(TARGET)/lazy.config.flags -SAVED_CONFIG_LOG=$(CONFIGURE_DIR)/$(TARGET)/config.log -CONFIG_CACHE_FILE=$(CONFIGURE_DIR)/$(TARGET)/lazy.config.cache -ALL_CONFIG_FLAGS=$(CONFIGURE_FLAGS) --no-create --no-recursion --cache-file=$(CONFIG_CACHE_FILE) - -lazy_configure: save_config_flags $(CONFIG_STATUS) - rm -f $(CONFIGURE_DIR)/config.log - cd $(CONFIGURE_DIR) && $(CONFIG_STATUS) - cat $(CONFIGURE_DIR)/config.log >> $(SAVED_CONFIG_LOG) - rm -f $(CONFIGURE_DIR)/config.log - -save_config_flags: - $(SAVE_ARGS) $(SAVED_CONFIG_FLAGS_FILE) --- $(ALL_CONFIG_FLAGS) - -$(SAVED_CONFIG_FLAGS_FILE): save_config_flags - -$(CONFIGURE_DIR)/configure: $(CONFIGURE_DIR)/configure.in $(EXTRA_CONFIGURE_DEPENDENCIES) - rm -f $(CONFIG_CACHE_FILE) - @ exp_ac_vsn=$(EXPECTED_AUTOCONF_VERSION) ; \ - ac_vsn_blob=`autoconf --version` ; \ - ac_vsn=`echo x$$ac_vsn_blob | sed "s|[^0-9]*\([0-9][^ \t\n]*\).*|\1|"` ; \ - case "$$ac_vsn" in \ - $$exp_ac_vsn) \ - ;; \ - *) \ - echo "***************************************************" 1>&2 ; \ - echo "***************************************************" 1>&2 ; \ - echo "*** WARNING: System might fail to configure or" 1>&2 ; \ - echo "*** might be erroneously configured" 1>&2 ; \ - echo "*** since autoconf version $$ac_vsn is used" 1>&2 ; \ - echo "*** instead of version $$exp_ac_vsn!" 1>&2 ; \ - echo "***************************************************" 1>&2 ; \ - echo "***************************************************" 1>&2 ; \ - ;; \ - esac - cd $(CONFIGURE_DIR) && autoconf -f - -$(CONFIGURE_DIR)/config.h.in: $(CONFIGURE_DIR)/configure.in $(CONFIGURE_DIR)/aclocal.m4 - cd $(CONFIGURE_DIR) && autoheader ./configure.in > ./config.h.in - -$(CONFIG_STATUS): $(SAVED_CONFIG_FLAGS_FILE) $(CONFIGURE_DIR)/configure $(EXTRA_CONFIG_STATUS_DEPENDENCIES) - rm -f $(CONFIGURE_DIR)/config.log - cd $(CONFIGURE_DIR) && CONFIG_STATUS=$(CONFIG_STATUS) ./configure $(ALL_CONFIG_FLAGS) - rm -f $(SAVED_CONFIG_LOG) - mv $(CONFIGURE_DIR)/config.log $(SAVED_CONFIG_LOG) - -lazy_configure_target_clean: - rm -f $(CONFIG_STATUS) - rm -f $(CONFIG_CACHE_FILE) - rm -f $(SAVED_CONFIG_FLAGS_FILE) - rm -f $(SAVED_CONFIG_LOG) - -lazy_configure_clean: lazy_configure_target_clean - rm -f $(CONFIGURE_DIR)/configure - test ! -f $(CONFIGURE_DIR)/acconfig.h || rm -f $(CONFIGURE_DIR)/config.h.in - -.PHONY: lazy_configure save_config_flags lazy_configure_clean - diff --git a/otp_build b/otp_build index 175c5fbcfe..5c9a649531 100755 --- a/otp_build +++ b/otp_build @@ -21,7 +21,6 @@ # Global configuration variables # -# NOTE: lazy_configure depends on '.' always being last directory if [ -z "$ONLY_ERTS" ]; then AUTOCONF_SUBDIRS="lib lib/* lib/common_test/test_server" fi @@ -526,105 +525,6 @@ do_configure () fi } -do_lazy_configure () -{ - setup_make - if [ "x$OVERRIDE_TARGET" != "x" -a "x$OVERRIDE_TARGET" != "xwin32" ]; then - echo "Not supported for cross compilation" >&2 - exit 1 - fi - maybe_copy_static_cache - CONFIG_FLAGS= - set_config_flags "$@" - CONFIGURE_FLAGS="$@" - [ "$CONFIG_FLAGS" = "" ] || CONFIGURE_FLAGS="$CONFIG_FLAGS $CONFIGURE_FLAGS" - for c_dir in $AUTOCONF_SUBDIRS; do - if test -f $ERL_TOP/$c_dir/configure.in; then - dir=$ERL_TOP/$c_dir - echo "" - echo "=== Begin configuring $dir" - xc_dep= ; - xcs_dep= ; - test -d $dir/$TARGET || mkdir $dir/$TARGET - test -f $dir/aclocal.m4 && xc_dep="$xcs_dep $dir/aclocal.m4" - test -f $dir/acsite.m4 && xc_dep="$xcs_dep $dir/acsite.m4" - test x$c_dir = x"erts" && xcs_dep="$xcs_dep $dir/config.h.in" - $MAKE -f $ERL_TOP/make/lazy_configure.mk \ - MAKE="$MAKE" TARGET=$TARGET \ - ERL_TOP=$ERL_TOP \ - CONFIGURE_FLAGS="$CONFIGURE_FLAGS" \ - CONFIGURE_DIR=$dir \ - EXTRA_CONFIGURE_DEPENDENCIES=$xc_dep \ - EXTRA_CONFIG_STATUS_DEPENDENCIES=$xcs_dep \ - lazy_configure - echo "=== Done configuring $dir" - echo "" - fi - done -} - -do_lazy_configure_clean () -{ - setup_make - if [ "x$OVERRIDE_TARGET" != "x" -a "x$OVERRIDE_TARGET" != "xwin32" ]; then - echo "Not supported for cross compilation" >&2 - exit 1 - fi - for c_dir in $AUTOCONF_SUBDIRS; do - if test -f $ERL_TOP/$c_dir/configure.in; then - dir=$ERL_TOP/$c_dir - echo "" - echo "=== Begin cleaning configure in $dir" - xc_dep= ; - xcs_dep= ; - test -d $dir/$TARGET || mkdir $dir/$TARGET - test -f $dir/aclocal.m4 && xc_dep="$xcs_dep $dir/aclocal.m4" - test -f $dir/acsite.m4 && xc_dep="$xcs_dep $dir/acsite.m4" - test x$c_dir = x"erts" && xcs_dep="$xcs_dep $dir/config.h.in" - $MAKE -f $ERL_TOP/make/lazy_configure.mk \ - MAKE="$MAKE" TARGET=$TARGET \ - ERL_TOP=$ERL_TOP \ - CONFIGURE_DIR=$dir \ - lazy_configure_clean - echo "=== Done cleaning configure in $dir" - echo "" - fi - done - -} - -do_lazy_configure_target_clean () -{ - setup_make - if [ "x$OVERRIDE_TARGET" != "x" -a "x$OVERRIDE_TARGET" != "xwin32" ]; then - echo "Not supported for cross compilation" >&2 - exit 1 - fi - for c_dir in $AUTOCONF_SUBDIRS; do - if test -f $ERL_TOP/$c_dir/configure.in; then - dir=$ERL_TOP/$c_dir - echo "" - echo "=== Begin target cleaning configure in $dir" - xc_dep= ; - xcs_dep= ; - test -d $dir/$TARGET || mkdir $dir/$TARGET - test -f $dir/aclocal.m4 && xc_dep="$xcs_dep $dir/aclocal.m4" - test -f $dir/acsite.m4 && xc_dep="$xcs_dep $dir/acsite.m4" - test x$c_dir = x"erts" && xcs_dep="$xcs_dep $dir/config.h.in" - $MAKE -f $ERL_TOP/make/lazy_configure.mk \ - MAKE="$MAKE" TARGET=$TARGET \ - ERL_TOP=$ERL_TOP \ - CONFIGURE_DIR=$dir \ - lazy_configure_target_clean - echo "=== Done target cleaning configure in $dir" - echo "" - fi - done - -} - - - echo_setenv () { case "$DAILY_BUILD_SCRIPT$SHELL" in @@ -1335,27 +1235,11 @@ case "$1" in do_autoconf; do_configure "$@"; do_boot;; - lazy_setup) - shift; - if [ $minus_a_flag = true ]; then - shift - fi; - do_lazy_configure "$@"; - do_boot;; autoconf) do_autoconf;; configure) shift; do_configure "$@";; - lazy_configure) - shift; - do_lazy_configure "$@";; - lazy_configure_clean) - shift; - do_lazy_configure_clean;; - lazy_configure_target_clean) - shift; - do_lazy_configure_target_clean;; opt) do_boot;; plain|smp) -- cgit v1.2.3 From d4b456742b8bdab6222008ffd20e3d086b646e3f Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 20 Jun 2018 17:43:56 +0200 Subject: Parallel configure --- .gitignore | 7 +- HOWTO/INSTALL.md | 2 + configure.in | 488 ----------------------------------------- configure.src | 435 ++++++++++++++++++++++++++++++++++++ erts/configure.in | 5 - lib/configure.in.src | 62 ------ lib/erl_interface/configure.in | 5 - lib/megaco/configure.in | 4 - lib/odbc/configure.in | 6 - make/configure.in | 421 +++++++++++++++++++++++++++++++++++ otp_build | 91 +++----- 11 files changed, 890 insertions(+), 636 deletions(-) delete mode 100644 configure.in create mode 100644 configure.src delete mode 100644 lib/configure.in.src create mode 100644 make/configure.in diff --git a/.gitignore b/.gitignore index 79b1d5dfad..46db1ffc9b 100644 --- a/.gitignore +++ b/.gitignore @@ -169,9 +169,10 @@ JAVADOC-GENERATED /lib/*/doc/pdf/*.pdf /lib/*/doc/xml/*.xml -/lib/configure /lib/config.log /lib/config.status +/make/config.log +/make/config.status # # Files generated by configure. @@ -184,10 +185,12 @@ JAVADOC-GENERATED # Files generated by "./otp_build autoconf" # +/lib/configure /lib/*/configure /lib/common_test/test_server/configure /lib/configure.in -/aclocal.m4 +/make/aclocal.m4 +/make/configure /lib/common_test/priv/auxdir/config.guess /lib/common_test/priv/auxdir/config.sub /lib/common_test/priv/auxdir/install-sh diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index 2597794496..bafea0350d 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -340,6 +340,8 @@ use the `--prefix` argument like this: `./configure --prefix=`. Some of the available `configure` options are: * `--prefix=PATH` - Specify installation prefix. +* `--disable-parallel-configure` - Disable parallel execution of + `configure` scripts (parallel execution is enabled by default) * `--{enable,disable}-kernel-poll` - Kernel poll support (enabled by default if possible) * `--{enable,disable}-hipe` - HiPE support (enabled by default on supported diff --git a/configure.in b/configure.in deleted file mode 100644 index 559049aca1..0000000000 --- a/configure.in +++ /dev/null @@ -1,488 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -dnl %CopyrightBegin% -dnl -dnl Copyright Ericsson AB 1998-2016. All Rights Reserved. -dnl -dnl Licensed under the Apache License, Version 2.0 (the "License"); -dnl you may not use this file except in compliance with the License. -dnl You may obtain a copy of the License at -dnl -dnl http://www.apache.org/licenses/LICENSE-2.0 -dnl -dnl Unless required by applicable law or agreed to in writing, software -dnl distributed under the License is distributed on an "AS IS" BASIS, -dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -dnl See the License for the specific language governing permissions and -dnl limitations under the License. -dnl -dnl %CopyrightEnd% - -AC_PREREQ(2.8)dnl - -AC_INIT() - -LM_PRECIOUS_VARS - -default_cache_file=./config.cache - -if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then - # The no_recursion variable is not documented, but the only - # action we take on it is disabling caching which is safe! - if test "x$cache_file" != "x$default_cache_file"; then - echo "Ignoring the --cache-file argument since it can cause the system to be erroneously configured" - fi - echo "Disabling caching" - if test -f $cache_file; then - echo "Removing cache file $cache_file" - rm -f $cache_file - fi - cache_file=/dev/null -fi - -case "X$ERL_TOP" in - X) - ;; - X/*) - test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || { - AC_MSG_ERROR([Invalid \$ERL_TOP]) - } - srcdir="$ERL_TOP";; - *) - AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);; -esac - -dnl How to set srcdir absolute is taken from the GNU Emacs distribution -#### Make srcdir absolute, if it isn't already. It's important to -#### avoid running the path through pwd unnecessary, since pwd can -#### give you automounter prefixes, which can go away. -case "${srcdir}" in - /* ) ;; - . ) - ## We may be able to use the $PWD environment variable to make this - ## absolute. But sometimes PWD is inaccurate. - ## Make sure CDPATH doesn't affect cd (in case PWD is relative). - CDPATH= - if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; - then - srcdir="$PWD" - else - srcdir="`(cd ${srcdir}; pwd)`" - fi - ;; - * ) srcdir="`(cd ${srcdir}; pwd)`" ;; -esac - -# -# Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP. -# -test "X$ERL_TOP" != "X" || ERL_TOP="$srcdir" -AC_SUBST(ERL_TOP) - -dnl -dnl Aux programs are found in erts/autoconf -dnl -AC_CONFIG_AUX_DIR(${srcdir}/erts/autoconf) - -dnl -dnl Figure out what we are running on. And in violation of autoconf -dnl style assume that $host is also what we are building for. I would -dnl like to get cross compiling working, since we actually have -dnl systems we cross compile for! -dnl - -if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then - AC_CANONICAL_HOST -fi - -TARGET=$host -AC_SUBST(TARGET) - -if test "$cross_compiling" = "yes"; then - CROSS_COMPILING=yes -else - CROSS_COMPILING=no -fi -AC_SUBST(CROSS_COMPILING) - -AC_ARG_ENABLE(bootstrap-only, -AS_HELP_STRING([--enable-bootstrap-only], - [enable bootstrap only configuration]), -[ if test "X$enableval" = "Xyes"; then - BOOTSTRAP_ONLY=yes - else - BOOTSTRAP_ONLY=no - fi -], -BOOTSTRAP_ONLY=no) - -AC_SUBST(BOOTSTRAP_ONLY) - -if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then - AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system]) -fi - -dnl Checks for programs. - -AC_PROG_CC -AC_PROG_CXX -AC_CHECK_TOOL(LD, [ld]) - -_search_path=/bin:/usr/bin:/usr/local/bin:$PATH - -AC_PATH_PROG(ENV, [env], false, $_search_path) -if test "$ac_cv_path_ENV" = false; then - AC_MSG_ERROR([No 'env' command found]) -fi - -# -# We need GNU make, complain if we can't find it -# -AC_MSG_CHECKING(for GNU make) -# If there is a Makefile created we don't want make to start making, run -# in a subdirectory and -f /dev/null -MAKE_PROG=x -if test X"$CLEARCASE_MAKE_COMPAT" = X"gnu" -a X"$CLEARCASE_ROOT" != X"" ; then - eval clearmake -version 2>&1 | grep clearmake > /dev/null 2>&1 - case $? in - 0) MAKE_PROG="clearmake -V";; - *);; - esac -fi -if test X"$MAKE_PROG" = X"x"; then - mkdir conftestmake - if test -d conftestmake; then - cd conftestmake - for m in make gmake ggmake; do - eval $m --version -f /dev/null 2>&1 | grep GNU > /dev/null 2>&1 - case $? in - 0) MAKE_PROG=$m ; break ;; - *) ;; - esac - done - cd .. - else - AC_MSG_ERROR(could not create subdirectory) - fi -fi -rm -rf conftestmake -case $MAKE_PROG in - x) AC_MSG_RESULT(no) - AC_MSG_ERROR(GNU make is required!) - ;; - *) AC_MSG_RESULT(yes ($MAKE_PROG)) - AC_SUBST(MAKE_PROG) - ;; -esac - -AC_PROG_INSTALL -if test X"${INSTALL}" = "X${ac_aux_dir}/install-sh -c" && test -f /usr/ucb/install ; then - case $host_os in - osf*) ;; - *) INSTALL="/usr/ucb/install -c" ;; - esac -fi - -AC_PROG_LN_S -AC_PROG_RANLIB - -# -# Get erts version from erts/vsn.mk -# -AC_MSG_CHECKING([ERTS version]) -[ERTS_VSN=`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] -AC_MSG_RESULT([$ERTS_VSN]) -AC_SUBST(ERTS_VSN) - -# -# Get OTP release and OTP version from $ERL_TOP/OTP_VERSION -# -AC_MSG_CHECKING([OTP release]) -[OTP_REL=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`] -AC_MSG_RESULT([$OTP_REL]) -AC_SUBST(OTP_REL) - -AC_MSG_CHECKING([OTP version]) -[OTP_VSN=`cat $ERL_TOP/OTP_VERSION`] -AC_MSG_RESULT([$OTP_VSN]) -AC_SUBST(OTP_VSN) - -AC_ARG_ENABLE(dirty-schedulers, -AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support])) - -AC_ARG_ENABLE(plain-emulator, -AS_HELP_STRING([--enable-plain-emulator], [enable threaded non-smp emulator]) -AS_HELP_STRING([--disable-plain-emulator], [disable threaded non-smp emulator])) - -AC_ARG_WITH(termcap, -AS_HELP_STRING([--with-termcap], [use termcap (default)]) -AS_HELP_STRING([--without-termcap], - [do not use any termcap libraries (ncurses,curses,termcap,termlib)])) - -AC_ARG_ENABLE(kernel-poll, -AS_HELP_STRING([--enable-kernel-poll], [enable kernel poll support]) -AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support])) - -AC_ARG_ENABLE(sctp, -AS_HELP_STRING([--enable-sctp], [enable sctp support (default) -to on demand load the SCTP library in runtime]) -AS_HELP_STRING([--enable-sctp=lib], [enable sctp support -to link against the SCTP library]) -AS_HELP_STRING([--disable-sctp], [disable sctp support])) - -AC_ARG_ENABLE(hipe, -AS_HELP_STRING([--enable-hipe], [enable hipe support]) -AS_HELP_STRING([--disable-hipe], [disable hipe support])) - -AC_ARG_ENABLE(native-libs, -AS_HELP_STRING([--enable-native-libs], - [compile Erlang libraries to native code])) - -AC_ARG_WITH(dynamic-trace, -AS_HELP_STRING([--with-dynamic-trace={dtrace|lttng|systemtap}], - [specify use of dynamic trace framework, dtrace, lttng or systemtap]) -AS_HELP_STRING([--without-dynamic-trace], - [don't enable any dynamic tracing (default)])) -AC_ARG_ENABLE(vm-probes, -AS_HELP_STRING([--enable-vm-probes], - [add dynamic trace probes to the Beam VM (only possible if --with-dynamic-trace is enabled, and then default)])) -AC_ARG_WITH(javac, -AS_HELP_STRING([--with-javac=JAVAC], [specify Java compiler to use]) -AS_HELP_STRING([--with-javac], [use a Java compiler if found (default)]) -AS_HELP_STRING([--without-javac], [don't use any Java compiler])) - -AC_ARG_ENABLE(megaco_flex_scanner_lineno, -AS_HELP_STRING([--disable-megaco-flex-scanner-lineno], - [disable megaco flex scanner lineno])) - -AC_ARG_ENABLE(megaco_reentrant_flex_scanner, -AS_HELP_STRING([--disable-megaco-reentrant-flex-scanner], - [disable reentrant megaco flex scanner])) - -AC_ARG_WITH(ssl, -AS_HELP_STRING([--with-ssl=PATH], [specify location of OpenSSL include and lib]) -AS_HELP_STRING([--with-ssl], [use SSL (default)]) -AS_HELP_STRING([--without-ssl], [don't use SSL])) - -AC_ARG_WITH(ssl-incl, -AS_HELP_STRING([--with-ssl-incl=PATH], - [location of OpenSSL include dir, if different than specified by --with-ssl=PATH])) - -AC_ARG_WITH(ssl-rpath, -AS_HELP_STRING([--with-ssl-rpath=yes|no|PATHS], - [runtime library path for OpenSSL. Default is 'yes', which equates to a - number of standard locations. If 'no', then no runtime - library paths will be used. Anything else should be a - comma separated list of paths.])) - -AC_ARG_ENABLE(dynamic-ssl-lib, -AS_HELP_STRING([--disable-dynamic-ssl-lib], - [disable using dynamic openssl libraries])) - -AC_ARG_ENABLE(fips, -AS_HELP_STRING([--enable-fips], [enable OpenSSL FIPS mode support]) -AS_HELP_STRING([--disable-fips], [disable OpenSSL FIPS mode support (default)])) - -AC_ARG_ENABLE(builtin-zlib, -AS_HELP_STRING([--enable-builtin-zlib], - [force use of our own built-in zlib])) - -AC_ARG_ENABLE(sharing-preserving, -AS_HELP_STRING([--enable-sharing-preserving], - [enable copying of terms without destroying sharing])) - -dnl This functionality has been lost along the way... :( -dnl It could perhaps be nice to reintroduce some day; therefore, -dnl it is not removed just commented out. -dnl -dnl # -dnl # Set Erlang man page directory -dnl # -dnl AC_ARG_ENABLE(erlang-mandir, -dnl [ --disable-erlang-mandir do not install Erlang man pages in a private directory], -dnl [ case "$enableval" in -dnl no) erl_mandir=$mandir ;; -dnl *) erl_mandir='$(erlang_libdir)/man' ;; -dnl esac ], erl_mandir='$(erlang_libdir)/man') -dnl AC_SUBST(erl_mandir) - -AC_ARG_ENABLE(m64-build, -AS_HELP_STRING([--enable-m64-build], - [build 64bit binaries using the -m64 flag to (g)cc]), -[ case "$enableval" in - no) enable_m64_build=no ;; - *) enable_m64_build=yes ;; - esac -],enable_m64_build=no) - -AC_ARG_ENABLE(m32-build, -AS_HELP_STRING([--enable-m32-build], - [build 32bit binaries using the -m32 flag to (g)cc]), -[ case "$enableval" in - no) enable_m32_build=no ;; - *) enable_m32_build=yes ;; - esac -],enable_m32_build=no) - -AC_ARG_WITH(libatomic_ops, - AS_HELP_STRING([--with-libatomic_ops=PATH], - [specify and prefer usage of libatomic_ops in the ethread library])) - -m4_define(DEFAULT_SANITIZERS, [address,undefined]) -AC_ARG_ENABLE(sanitizers, - AS_HELP_STRING( - [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@], - [Default=DEFAULT_SANITIZERS])) - -AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) - -DEFAULT_VERBOSITY=0 -if test X${enable_silent_rules} = Xno; then - DEFAULT_VERBOSITY=1 -fi -AC_SUBST(DEFAULT_VERBOSITY) - -if test X${enable_m64_build} = Xyes; then - CFLAGS="-m64 $CFLAGS" - export CFLAGS - LDFLAGS="-m64 $LDFLAGS" - export LDFLAGS -fi -if test X${enable_m32_build} = Xyes; then - CFLAGS="-m32 $CFLAGS" - export CFLAGS - LDFLAGS="-m32 $LDFLAGS" - export LDFLAGS -fi - -NATIVE_LIBS_ENABLED= -if test X${enable_native_libs} = Xyes -a X${enable_hipe} != Xno; then - NATIVE_LIBS_ENABLED=yes -fi -AC_SUBST(NATIVE_LIBS_ENABLED) - -if test $CROSS_COMPILING = no; then - case $host_os in - darwin*) - macosx_version=`sw_vers -productVersion` - test $? -eq 0 || { - AC_MSG_ERROR([Failed to execute 'sw_vers'; please provide it in PATH]) - } - [case "$macosx_version" in - [1-9][0-9].[0-9]) - int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\2|'`;; - [1-9][0-9].[0-9].[0-9]) - int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; - [1-9][0-9].[1-9][0-9]) - int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\200|'`;; - [1-9][0-9].[1-9][0-9].[0-9]) - int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\20\3|'`;; - [1-9][0-9].[1-9][0-9].[1-9][0-9]) - int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; - *) - int_macosx_version=unexpected;; - esac] - test $int_macosx_version != unexpected || { - AC_MSG_ERROR([Unexpected MacOSX version ($macosx_version) returned by 'sw_vers -productVersion'; this configure script probably needs to be updated]) - } - AC_TRY_COMPILE([ -#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > $int_macosx_version -#error Compiling for a newer MacOSX version... -#endif - ], [;], - [], - [AC_MSG_ERROR([ - - You are natively building Erlang/OTP for a later version of MacOSX - than current version ($macosx_version). You either need to - cross-build Erlang/OTP, or set the environment variable - MACOSX_DEPLOYMENT_TARGET to $macosx_version (or a lower version). - -])]) - ;; - *) - ;; - esac -fi - -rm -f $ERL_TOP/lib/SKIP-APPLICATIONS -for app in `cd lib && ls -d *`; do - var=`eval echo \\$with_$app` - if test X${var} = Xno; then - echo "$app" >> $ERL_TOP/lib/SKIP-APPLICATIONS - fi -done - -export ERL_TOP -AC_CONFIG_SUBDIRS(lib erts) - -AC_CONFIG_FILES([Makefile make/output.mk]) -AC_CONFIG_FILES([make/emd2exml], [chmod +x make/emd2exml]) - -AC_OUTPUT - -pattern="lib/*/SKIP" -files=`echo $pattern` -if test "$files" != "$pattern" || test -f $ERL_TOP/lib/SKIP-APPLICATIONS; then - echo '*********************************************************************' - echo '********************** APPLICATIONS DISABLED **********************' - echo '*********************************************************************' - echo - if test "$files" != "$pattern"; then - for skipfile in $files; do - app=`dirname $skipfile`; app=`basename $app` - printf "%-15s: " $app; cat $skipfile - done - fi - if test -f $ERL_TOP/lib/SKIP-APPLICATIONS; then - for skipapp in `cat $ERL_TOP/lib/SKIP-APPLICATIONS`; do - printf "%-15s: User gave --without-%s option\n" $skipapp $skipapp - done - fi - echo - echo '*********************************************************************' -fi -pattern="lib/*/CONF_INFO" -files=`echo $pattern` -if test "$files" != "$pattern" || test -f erts/CONF_INFO; then - echo '*********************************************************************' - echo '********************** APPLICATIONS INFORMATION *******************' - echo '*********************************************************************' - echo - test "$files" != "$pattern" || files="" - test ! -f erts/CONF_INFO || files="$files erts/CONF_INFO" - for infofile in $files; do - app=`dirname $infofile`; app=`basename $app` - printf "%-15s: " $app; cat $infofile - done - echo - echo '*********************************************************************' -fi -if test -f "erts/doc/CONF_INFO"; then - echo '*********************************************************************' - echo '********************** DOCUMENTATION INFORMATION ******************' - echo '*********************************************************************' - echo - printf "%-15s: \n" documentation; - havexsltproc="yes" - for cmd in `cat erts/doc/CONF_INFO`; do - echo " $cmd is missing." - if test $cmd = "xsltproc"; then - havexsltproc="no" - fi - done - if test $havexsltproc = "no"; then - echo ' The documentation can not be built.' - else - echo ' Using fakefop to generate placeholder PDF files.' - fi - echo - echo '*********************************************************************' -fi diff --git a/configure.src b/configure.src new file mode 100644 index 0000000000..8dee8491f0 --- /dev/null +++ b/configure.src @@ -0,0 +1,435 @@ +#!/bin/sh +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2018. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# %CopyrightEnd% +# +# +# This is a handcrafted wrapper script which runs the actual (autoconf) +# 'configure' scripts in different parts of OTP. +# +# The true (autoconf) configure scripts are run in parallel unless +# --disable-parallel-configure is passed as argument to this script. +# +# The config cache feature is disabled since it mostly causes problems +# and especially when executing multiple configure scripts in parallel. +# On windows a static cache for each configure is used since it +# otherwise takes forever to run configure... +# + +OTP_VERSION=@OTP_VERSION@ + +unset CDPATH + +default_cflags="-g -O2" + +mXY_build= +static_cache= + +bootstrap_only=no +parallel_otp_configure=yes +help=no +user_srcdir= +config_arguments= +while test $# != 0; do + case $1 in + -srcdir=* | --srcdir=*) + user_srcdir=`expr "$1" : '[^=]*=\(.*\)'` + if test "$ERL_TOP" != ""; then + echo "WARNING: Overriding ERL_TOP with $user_srcdir" 1>&2 + echo "" 1>&2 + fi + ERL_TOP="$user_srcdir" + ;; + -srcdir | --srcdir) + shift + test $# != 0 || { + echo "ERROR: Missing source dir" 1>&2 + exit 1 + } + user_srcdir="$1" + if test "$ERL_TOP" != ""; then + echo "WARNING: Overriding ERL_TOP with $user_srcdir" 1>&2 + echo "" 1>&2 + fi + ERL_TOP="$user_srcdir" + ;; + --enable-bootstrap-only) + bootstrap_only=yes;; + --disable-bootstrap-only) + bootstrap_only=no;; + --enable-option-checking) + echo "ERROR: Cannot enable option checking" 1>&2 + exit 1;; + --disable-option-checking) + # Got it... + ;; + --disable-parallel-configure) + parallel_otp_configure=no + ;; + --config-cache | -C) + echo "WARNING: Ignoring config cache file since it will mess up the configuration" 1>&2 + echo "" 1>&2 + ;; + -cache-file=* | --cache-file=* ) + static_cache=`expr "$1" : '[^=]*=\(.*\)'` + if test "$static_cache" != "/dev/null"; then + echo "WARNING: Only using config cache file '$static_cache' as static cache" 1>&2 + echo "" 1>&2 + else + static_cache= + fi + ;; + -cache-file | --cache-file) + shift + test $# != 0 || { + echo "ERROR: Missing cache file" 1>&2 + exit 1 + } + static_cache=$1 + if test "$static_cache" != "/dev/null"; then + echo "WARNING: Only using config cache file '$static_cache' as static cache" 1>&2 + echo "" 1>&2 + else + static_cache= + fi + ;; + --enable-m64-build) + mXY_build="-m64" + ;; + --enable-m32-build) + mXY_build="-m32" + ;; + --disable-m64-build) + if test "$mXY_build" = "-m64"; then + mXY_build= + fi;; + --disable-m32-build) + if test "$mXY_build" = "-m32"; then + mXY_build= + fi;; + CFLAGS=* | LDFLAGS=*) + flgs_var=`expr "$1" : '\([^=]*\)=.*'` + flgs_val=`expr "$1" : '[^=]*=\(.*\)'` + eval $flgs_var=\$flgs_val + ;; + --help=r* | -help=r*) + help=all;; + --help* | -help* | -h) + help=$1;; + *) + case $1 in + --without-*) + skip_app=`expr "$1" : '--without-\(.*\)'` + if test -d "lib/$skip_app"; then + echo "$skip_app" >> "$ERL_TOP/lib/SKIP-APPLICATIONS" + fi;; + *) + ;; + esac + case $1 in + *\'*) + 1=`echo "$1" | sed "s/'/'\\\\\\\\''/g"` ;; + *) + ;; + esac + config_arguments="$config_arguments '$1'";; + esac + shift +done + +if test $parallel_otp_configure = yes; then + case `uname -s` in + MSYS* | msys* | CYGWIN* | cygwin ) + ;; + *) + trap 'kill -KILL -$$' 1 2 3 6 15 + ;; + esac +fi + +# +# Figure ERL_TOP out... +# + +root_dir= +dir_chk_data="$OTP_VERSION" + +if root_dir=`dirname "$0" 2>/dev/null` \ + && test "$root_dir" != "" \ + && cd "$root_dir" 2>/dev/null; then + root_dir=`pwd 2>/dev/null` + if test $? -ne 0; then + root_dir= + else + case "$root_dir" in + /*) + echo $dir_chk_data > "$root_dir"/config.dir.check.$$ 2>/dev/null + ;; + *) + root_dir= + esac + fi +else + root_dir= +fi + +if test "$root_dir" = ""; then + case X"$ERL_TOP" in + X) + echo "ERROR: Cannot figure out the root directory of" 1>&2 + echo " the OTP source. Please set the ERL_TOP" 1>&2 + echo " environment variable." 1>&2 + exit 1 + ;; + X/*) + cd "$ERL_TOP" 2>/dev/null || { + echo "ERROR: Cannot change directory to ERL_TOP " 1>&2 + echo " '$ERL_TOP'" 1>&2 + exit 1 + } + ;; + X*) + echo "ERROR: ERL_TOP '$ERL_TOP' is not an absolute path" 1>&2 + exit 1 + ;; + esac +else + case X"$ERL_TOP" in + X) + ERL_TOP="$root_dir" + rm -f "$root_dir"/config.dir.check.$$ + ;; + X/*) + cd "$ERL_TOP" 2>/dev/null || { + rm -f "$root_dir"/config.dir.check.$$ + echo "ERROR: Cannot change directory into ERL_TOP " 1>&2 + echo " '$ERL_TOP'" 1>&2 + exit 1 + } + dir_chk=`cat ./config.dir.check.$$ 2>/dev/null` || dir_chk=error + rm -f "$root_dir"/config.dir.check.$$ + test "$dir_chk" = "$dir_chk_data" || { + echo "ERROR: ERL_TOP '$ERL_TOP' is not the same" 1>&2 + echo " as 'configure' location '$root_dir'" 1>&2 + exit 1 + } + ;; + X*) + rm -f "$root_dir"/config.dir.check.$$ + echo "ERROR: ERL_TOP '$ERL_TOP' is not an absolute path" 1>&2 + exit 1 + ;; + esac +fi + +export ERL_TOP + +rm -f "$ERL_TOP/lib/SKIP-APPLICATIONS" + +case "$help" in + no) + ;; + all) + (cd "$ERL_TOP/make" && ./configure --help) + app_dirs= + for app_dir in erts lib/*; do + if test -f "$app_dir/configure"; then + echo "" + echo "=== $app_dir ===" + (cd "$ERL_TOP/$app_dir" && ./configure --help=short) + fi + done + exit 0;; + *) + (cd "$ERL_TOP/make" && ./configure "$help") + exit 0;; +esac + +if test "$mXY_build" = ""; then + if test "$CFLAGS" != ""; then + config_arguments="$config_arguments CFLAGS='$CFLAGS'" + unset CFLAGS + fi + + if test "$LDFLAGS" != ""; then + config_arguments="$config_arguments LDFLAGS='$LDFLAGS'" + unset LDFLAGS + fi +else + if test "$CFLAGS" = ""; then + CFLAGS=$default_cflags + fi + config_arguments="$config_arguments CFLAGS='$mXY_build $CFLAGS'" + unset CFLAGS + config_arguments="$config_arguments LDFLAGS='$mXY_build $LDFLAGS'" + unset LDFLAGS + case $mXY_build in + -m32) + config_arguments="$config_arguments --enable-m32-build" + ;; + -m64) + config_arguments="$config_arguments --enable-m64-build" + ;; + esac +fi + +config_arguments="$config_arguments --disable-option-checking" + +if test $bootstrap_only = no; then + check_conf_dirs=`echo lib/*` +else + check_conf_dirs="@BOOTSTRAP_LIB_APP_DIRS@" +fi + +# 'erts' *needs* to be last in app_dirs! Any apps +# after it wont be able to run in parallel with +# erts... + +app_dirs= +for app_dir in make $check_conf_dirs erts; do + if test -f "$app_dir/configure"; then + if test "$static_cache" != ""; then + cp -f "$static_cache" "$ERL_TOP/$app_dir/local.static.config.cache" + fi + rm -f $app_dir/configure.result.failed + rm -f $app_dir/configure.result.command + rm -f $app_dir/configure.result.stdout + rm -f $app_dir/configure.result.stderr + app_dirs="$app_dirs $app_dir" + fi +done + +if test "$static_cache" = ""; then + local_cache_file=/dev/null +else + local_cache_file=./local.static.config.cache +fi + +for app_dir in $app_dirs; do + cd "$ERL_TOP/$app_dir" + cmd_str="./configure $config_arguments --cache-file=$local_cache_file --srcdir=\"$ERL_TOP/$app_dir\"" + if test $parallel_otp_configure = no; then + echo "=== Running configure in $ERL_TOP/$app_dir ===" + eval $cmd_str + echo "" + elif test $app_dir != erts; then + echo $cmd_str >./configure.result.command + eval $cmd_str 1>./configure.result.stdout 2>./configure.result.stderr || echo "fatal" > "./configure.result.failed" & + else + # ERTS configure gets to use stdout/stderr; the others are printed when done... + echo "=== Running configure in $ERL_TOP/erts ===" + echo $cmd_str + eval $cmd_str || { + rm -f erts/configure.result.* lib/*/configure.result.* + echo "ERROR: $ERL_TOP/$app_dir/configure failed!" 1>&2 + kill -KILL -$$ + exit 1 + } + fi +done + +cd "$ERL_TOP" + +if test $parallel_otp_configure = yes; then + # Wait for all sub-configures to finish... + wait + + for app_dir in $app_dirs; do + if test -f "$app_dir/configure.result.command"; then + echo "" + echo "=== Running configure in $ERL_TOP/$app_dir ===" + cat "$app_dir/configure.result.command" + rm -f "$app_dir/configure.result.command" + fi + if test -f "$app_dir/configure.result.stdout"; then + cat "$app_dir/configure.result.stdout" + rm -f "$app_dir/configure.result.stdout" + fi + if test -f "$app_dir/configure.result.stderr"; then + cat "$app_dir/configure.result.stderr" 1>&2 + rm -f "$app_dir/configure.result.stderr" + fi + if test -f "$app_dir/configure.result.failed"; then + rm -f erts/configure.result.* lib/*/configure.result.* + echo "ERROR: $ERL_TOP/$app_dir/configure failed!" 1>&2 + exit 1 + fi + done +fi + + +echo "" + +pattern="lib/*/SKIP" +files=`echo $pattern` +if test "$files" != "$pattern" || test -f "$ERL_TOP/lib/SKIP-APPLICATIONS"; then + echo '*********************************************************************' + echo '********************** APPLICATIONS DISABLED **********************' + echo '*********************************************************************' + echo + if test "$files" != "$pattern"; then + for skipfile in $files; do + app=`dirname $skipfile`; app=`basename $app` + printf "%-15s: " $app; cat $skipfile + done + fi + if test -f "$ERL_TOP/lib/SKIP-APPLICATIONS"; then + for skipapp in `cat "$ERL_TOP/lib/SKIP-APPLICATIONS"`; do + printf "%-15s: User gave --without-%s option\n" $skipapp $skipapp + done + fi + echo + echo '*********************************************************************' +fi +pattern="lib/*/CONF_INFO" +files=`echo $pattern` +if test "$files" != "$pattern" || test -f erts/CONF_INFO; then + echo '*********************************************************************' + echo '********************** APPLICATIONS INFORMATION *******************' + echo '*********************************************************************' + echo + test "$files" != "$pattern" || files="" + test ! -f erts/CONF_INFO || files="$files erts/CONF_INFO" + for infofile in $files; do + app=`dirname $infofile`; app=`basename $app` + printf "%-15s: " $app; cat $infofile + done + echo + echo '*********************************************************************' +fi +if test -f "erts/doc/CONF_INFO"; then + echo '*********************************************************************' + echo '********************** DOCUMENTATION INFORMATION ******************' + echo '*********************************************************************' + echo + printf "%-15s: \n" documentation; + havexsltproc="yes" + for cmd in `cat erts/doc/CONF_INFO`; do + echo " $cmd is missing." + if test $cmd = "xsltproc"; then + havexsltproc="no" + fi + done + if test $havexsltproc = "no"; then + echo ' The documentation can not be built.' + else + echo ' Using fakefop to generate placeholder PDF files.' + fi + echo + echo '*********************************************************************' +fi diff --git a/erts/configure.in b/erts/configure.in index 9e8ffd5ec5..5b604b18e8 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -26,11 +26,6 @@ AC_PREREQ(2.59) LM_PRECIOUS_VARS -if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then - # We do not want to use a common cache! - cache_file=/dev/null -fi - dnl How to set srcdir absolute is taken from the GNU Emacs distribution #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the path through pwd unnecessary, since pwd can diff --git a/lib/configure.in.src b/lib/configure.in.src deleted file mode 100644 index d507a5c0dd..0000000000 --- a/lib/configure.in.src +++ /dev/null @@ -1,62 +0,0 @@ -dnl -dnl %CopyrightBegin% -dnl -dnl Copyright Ericsson AB 1999-2016. All Rights Reserved. -dnl -dnl Licensed under the Apache License, Version 2.0 (the "License"); -dnl you may not use this file except in compliance with the License. -dnl You may obtain a copy of the License at -dnl -dnl http://www.apache.org/licenses/LICENSE-2.0 -dnl -dnl Unless required by applicable law or agreed to in writing, software -dnl distributed under the License is distributed on an "AS IS" BASIS, -dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -dnl See the License for the specific language governing permissions and -dnl limitations under the License. -dnl -dnl %CopyrightEnd% -dnl - -dnl Turn off caching -define([AC_CACHE_LOAD], )dnl -define([AC_CACHE_SAVE], )dnl - -dnl Process this file with autoconf to produce a configure script. -AC_INIT - -dnl -dnl This is just to run configure in all applications that need it. -dnl - -if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then - AC_MSG_ERROR(You need to set the environment variable ERL_TOP!) -fi -erl_top=${ERL_TOP} -AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf) - -AC_ARG_ENABLE(bootstrap-only, -[ --enable-bootstrap-only enable bootstrap only configuration], -[ if test "X$enableval" = "Xyes"; then - bootstrap_only=yes - else - bootstrap_only=no - fi -], -bootstrap_only=no) - -# Multiple versions of autoconf generates code that -# don't work on all platforms (e.g. SunOS 5.8) if -# sub directories are soft links. Internally at Ericsson -# some OTP application directories are soft links. -# An added "/." solves this problem. - -@BOOTSTRAP_CONFIGURE_APPS@ - -if test $bootstrap_only = no; then - -@NON_BOOTSTRAP_CONFIGURE_APPS@ - -fi - -AC_OUTPUT diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in index a155ceef7e..46dd995289 100644 --- a/lib/erl_interface/configure.in +++ b/lib/erl_interface/configure.in @@ -29,11 +29,6 @@ dnl m4_define(EI_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)] AC_INIT() -if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then - # We do not want to use a common cache! - cache_file=/dev/null -fi - dnl How to set srcdir absolute is taken from the GNU Emacs distribution #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the path through pwd unnecessary, since pwd can diff --git a/lib/megaco/configure.in b/lib/megaco/configure.in index eaa875d0a3..97314a6ba2 100644 --- a/lib/megaco/configure.in +++ b/lib/megaco/configure.in @@ -22,10 +22,6 @@ dnl dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl -if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then - # We do not want to use a common cache! - cache_file=/dev/null -fi AC_INIT(vsn.mk) diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in index 2dec6e5abf..c5cf2786ca 100644 --- a/lib/odbc/configure.in +++ b/lib/odbc/configure.in @@ -21,12 +21,6 @@ dnl dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl -if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then - # We do not want to use a common cache! - cache_file=/dev/null -fi - - dnl Process this file with autoconf to produce a configure script. AC_INIT(c_src/odbcserver.c) diff --git a/make/configure.in b/make/configure.in new file mode 100644 index 0000000000..c390e1ca31 --- /dev/null +++ b/make/configure.in @@ -0,0 +1,421 @@ +dnl Process this file with autoconf to produce a configure script. + +dnl %CopyrightBegin% +dnl +dnl Copyright Ericsson AB 1998-2016. All Rights Reserved. +dnl +dnl Licensed under the Apache License, Version 2.0 (the "License"); +dnl you may not use this file except in compliance with the License. +dnl You may obtain a copy of the License at +dnl +dnl http://www.apache.org/licenses/LICENSE-2.0 +dnl +dnl Unless required by applicable law or agreed to in writing, software +dnl distributed under the License is distributed on an "AS IS" BASIS, +dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +dnl See the License for the specific language governing permissions and +dnl limitations under the License. +dnl +dnl %CopyrightEnd% + +AC_PREREQ(2.8)dnl + +AC_INIT() + +LM_PRECIOUS_VARS + +default_cache_file=./config.cache + +if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then + # The no_recursion variable is not documented, but the only + # action we take on it is disabling caching which is safe! + if test "x$cache_file" != "x$default_cache_file"; then + echo "Ignoring the --cache-file argument since it can cause the system to be erroneously configured" + fi + echo "Disabling caching" + if test -f $cache_file; then + echo "Removing cache file $cache_file" + rm -f $cache_file + fi + cache_file=/dev/null +fi + +case "X$ERL_TOP" in + X) + ;; + X/*) + test -f "$ERL_TOP/erts/emulator/beam/beam_emu.c" || { + AC_MSG_ERROR([Invalid \$ERL_TOP]) + } + srcdir="$ERL_TOP";; + *) + AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);; +esac + +dnl How to set srcdir absolute is taken from the GNU Emacs distribution +#### Make srcdir absolute, if it isn't already. It's important to +#### avoid running the path through pwd unnecessary, since pwd can +#### give you automounter prefixes, which can go away. +case "${srcdir}" in + /* ) ;; + . ) + ## We may be able to use the $PWD environment variable to make this + ## absolute. But sometimes PWD is inaccurate. + ## Make sure CDPATH doesn't affect cd (in case PWD is relative). + CDPATH= + if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; + then + srcdir="$PWD" + else + srcdir="`(cd ${srcdir}; pwd)`" + fi + ;; + * ) srcdir="`(cd ${srcdir}; pwd)`" ;; +esac + +# +# Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP. +# +test "X$ERL_TOP" != "X" || ERL_TOP="$srcdir" +AC_SUBST(ERL_TOP) + +dnl +dnl Aux programs are found in erts/autoconf +dnl +AC_CONFIG_AUX_DIR(${srcdir}/erts/autoconf) + +dnl +dnl Figure out what we are running on. And in violation of autoconf +dnl style assume that $host is also what we are building for. I would +dnl like to get cross compiling working, since we actually have +dnl systems we cross compile for! +dnl + +if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then + AC_CANONICAL_HOST +fi + +TARGET=$host +AC_SUBST(TARGET) + +if test "$cross_compiling" = "yes"; then + CROSS_COMPILING=yes +else + CROSS_COMPILING=no +fi +AC_SUBST(CROSS_COMPILING) + +AC_ARG_ENABLE(bootstrap-only, +AS_HELP_STRING([--enable-bootstrap-only], + [enable bootstrap only configuration]), +[ if test "X$enableval" = "Xyes"; then + BOOTSTRAP_ONLY=yes + else + BOOTSTRAP_ONLY=no + fi +], +BOOTSTRAP_ONLY=no) + +AC_SUBST(BOOTSTRAP_ONLY) + +if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then + AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system]) +fi + +dnl Checks for programs. + +AC_PROG_CC +AC_PROG_CXX +AC_CHECK_TOOL(LD, [ld]) + +_search_path=/bin:/usr/bin:/usr/local/bin:$PATH + +AC_PATH_PROG(ENV, [env], false, $_search_path) +if test "$ac_cv_path_ENV" = false; then + AC_MSG_ERROR([No 'env' command found]) +fi + +# +# We need GNU make, complain if we can't find it +# +AC_MSG_CHECKING(for GNU make) +# If there is a Makefile created we don't want make to start making, run +# in a subdirectory and -f /dev/null +MAKE_PROG=x +if test X"$CLEARCASE_MAKE_COMPAT" = X"gnu" -a X"$CLEARCASE_ROOT" != X"" ; then + eval clearmake -version 2>&1 | grep clearmake > /dev/null 2>&1 + case $? in + 0) MAKE_PROG="clearmake -V";; + *);; + esac +fi +if test X"$MAKE_PROG" = X"x"; then + mkdir conftestmake + if test -d conftestmake; then + cd conftestmake + for m in make gmake ggmake; do + eval $m --version -f /dev/null 2>&1 | grep GNU > /dev/null 2>&1 + case $? in + 0) MAKE_PROG=$m ; break ;; + *) ;; + esac + done + cd .. + else + AC_MSG_ERROR(could not create subdirectory) + fi +fi +rm -rf conftestmake +case $MAKE_PROG in + x) AC_MSG_RESULT(no) + AC_MSG_ERROR(GNU make is required!) + ;; + *) AC_MSG_RESULT(yes ($MAKE_PROG)) + AC_SUBST(MAKE_PROG) + ;; +esac + +AC_PROG_INSTALL +if test X"${INSTALL}" = "X${ac_aux_dir}/install-sh -c" && test -f /usr/ucb/install ; then + case $host_os in + osf*) ;; + *) INSTALL="/usr/ucb/install -c" ;; + esac +fi + +AC_PROG_LN_S +AC_PROG_RANLIB + +# +# Get erts version from erts/vsn.mk +# +AC_MSG_CHECKING([ERTS version]) +[ERTS_VSN=`sed -n "s/^VSN[ ]*=[ ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`] +AC_MSG_RESULT([$ERTS_VSN]) +AC_SUBST(ERTS_VSN) + +# +# Get OTP release and OTP version from $ERL_TOP/OTP_VERSION +# +AC_MSG_CHECKING([OTP release]) +[OTP_REL=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`] +AC_MSG_RESULT([$OTP_REL]) +AC_SUBST(OTP_REL) + +AC_MSG_CHECKING([OTP version]) +[OTP_VSN=`cat $ERL_TOP/OTP_VERSION`] +AC_MSG_RESULT([$OTP_VSN]) +AC_SUBST(OTP_VSN) + +AC_ARG_ENABLE(parallel-configure, +AS_HELP_STRING([--disable-parallel-configure], [disable parallel execution of configure scripts])) + +AC_ARG_ENABLE(dirty-schedulers, +AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support])) + +AC_ARG_ENABLE(plain-emulator, +AS_HELP_STRING([--enable-plain-emulator], [enable threaded non-smp emulator]) +AS_HELP_STRING([--disable-plain-emulator], [disable threaded non-smp emulator])) + +AC_ARG_WITH(termcap, +AS_HELP_STRING([--with-termcap], [use termcap (default)]) +AS_HELP_STRING([--without-termcap], + [do not use any termcap libraries (ncurses,curses,termcap,termlib)])) + +AC_ARG_ENABLE(kernel-poll, +AS_HELP_STRING([--enable-kernel-poll], [enable kernel poll support]) +AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support])) + +AC_ARG_ENABLE(sctp, +AS_HELP_STRING([--enable-sctp], [enable sctp support (default) +to on demand load the SCTP library in runtime]) +AS_HELP_STRING([--enable-sctp=lib], [enable sctp support +to link against the SCTP library]) +AS_HELP_STRING([--disable-sctp], [disable sctp support])) + +AC_ARG_ENABLE(hipe, +AS_HELP_STRING([--enable-hipe], [enable hipe support]) +AS_HELP_STRING([--disable-hipe], [disable hipe support])) + +AC_ARG_ENABLE(native-libs, +AS_HELP_STRING([--enable-native-libs], + [compile Erlang libraries to native code])) + +AC_ARG_WITH(dynamic-trace, +AS_HELP_STRING([--with-dynamic-trace={dtrace|lttng|systemtap}], + [specify use of dynamic trace framework, dtrace, lttng or systemtap]) +AS_HELP_STRING([--without-dynamic-trace], + [don't enable any dynamic tracing (default)])) +AC_ARG_ENABLE(vm-probes, +AS_HELP_STRING([--enable-vm-probes], + [add dynamic trace probes to the Beam VM (only possible if --with-dynamic-trace is enabled, and then default)])) +AC_ARG_WITH(javac, +AS_HELP_STRING([--with-javac=JAVAC], [specify Java compiler to use]) +AS_HELP_STRING([--with-javac], [use a Java compiler if found (default)]) +AS_HELP_STRING([--without-javac], [don't use any Java compiler])) + +AC_ARG_ENABLE(megaco_flex_scanner_lineno, +AS_HELP_STRING([--disable-megaco-flex-scanner-lineno], + [disable megaco flex scanner lineno])) + +AC_ARG_ENABLE(megaco_reentrant_flex_scanner, +AS_HELP_STRING([--disable-megaco-reentrant-flex-scanner], + [disable reentrant megaco flex scanner])) + +AC_ARG_WITH(ssl, +AS_HELP_STRING([--with-ssl=PATH], [specify location of OpenSSL include and lib]) +AS_HELP_STRING([--with-ssl], [use SSL (default)]) +AS_HELP_STRING([--without-ssl], [don't use SSL])) + +AC_ARG_WITH(ssl-incl, +AS_HELP_STRING([--with-ssl-incl=PATH], + [location of OpenSSL include dir, if different than specified by --with-ssl=PATH])) + +AC_ARG_WITH(ssl-rpath, +AS_HELP_STRING([--with-ssl-rpath=yes|no|PATHS], + [runtime library path for OpenSSL. Default is 'yes', which equates to a + number of standard locations. If 'no', then no runtime + library paths will be used. Anything else should be a + comma separated list of paths.])) + +AC_ARG_ENABLE(dynamic-ssl-lib, +AS_HELP_STRING([--disable-dynamic-ssl-lib], + [disable using dynamic openssl libraries])) + +AC_ARG_ENABLE(fips, +AS_HELP_STRING([--enable-fips], [enable OpenSSL FIPS mode support]) +AS_HELP_STRING([--disable-fips], [disable OpenSSL FIPS mode support (default)])) + +AC_ARG_ENABLE(builtin-zlib, +AS_HELP_STRING([--enable-builtin-zlib], + [force use of our own built-in zlib])) + +AC_ARG_ENABLE(sharing-preserving, +AS_HELP_STRING([--enable-sharing-preserving], + [enable copying of terms without destroying sharing])) + +dnl This functionality has been lost along the way... :( +dnl It could perhaps be nice to reintroduce some day; therefore, +dnl it is not removed just commented out. +dnl +dnl # +dnl # Set Erlang man page directory +dnl # +dnl AC_ARG_ENABLE(erlang-mandir, +dnl [ --disable-erlang-mandir do not install Erlang man pages in a private directory], +dnl [ case "$enableval" in +dnl no) erl_mandir=$mandir ;; +dnl *) erl_mandir='$(erlang_libdir)/man' ;; +dnl esac ], erl_mandir='$(erlang_libdir)/man') +dnl AC_SUBST(erl_mandir) + +AC_ARG_ENABLE(m64-build, +AS_HELP_STRING([--enable-m64-build], + [build 64bit binaries using the -m64 flag to (g)cc]), +[ case "$enableval" in + no) enable_m64_build=no ;; + *) enable_m64_build=yes ;; + esac +],enable_m64_build=no) + +AC_ARG_ENABLE(m32-build, +AS_HELP_STRING([--enable-m32-build], + [build 32bit binaries using the -m32 flag to (g)cc]), +[ case "$enableval" in + no) enable_m32_build=no ;; + *) enable_m32_build=yes ;; + esac +],enable_m32_build=no) + +AC_ARG_WITH(libatomic_ops, + AS_HELP_STRING([--with-libatomic_ops=PATH], + [specify and prefer usage of libatomic_ops in the ethread library])) + +m4_define(DEFAULT_SANITIZERS, [address,undefined]) +AC_ARG_ENABLE(sanitizers, + AS_HELP_STRING( + [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@], + [Default=DEFAULT_SANITIZERS])) + +AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) + +DEFAULT_VERBOSITY=0 +if test X${enable_silent_rules} = Xno; then + DEFAULT_VERBOSITY=1 +fi +AC_SUBST(DEFAULT_VERBOSITY) + +if test X${enable_m64_build} = Xyes; then + CFLAGS="-m64 $CFLAGS" + export CFLAGS + LDFLAGS="-m64 $LDFLAGS" + export LDFLAGS +fi +if test X${enable_m32_build} = Xyes; then + CFLAGS="-m32 $CFLAGS" + export CFLAGS + LDFLAGS="-m32 $LDFLAGS" + export LDFLAGS +fi + +NATIVE_LIBS_ENABLED= +if test X${enable_native_libs} = Xyes -a X${enable_hipe} != Xno; then + NATIVE_LIBS_ENABLED=yes +fi +AC_SUBST(NATIVE_LIBS_ENABLED) + +if test $CROSS_COMPILING = no; then + case $host_os in + darwin*) + macosx_version=`sw_vers -productVersion` + test $? -eq 0 || { + AC_MSG_ERROR([Failed to execute 'sw_vers'; please provide it in PATH]) + } + [case "$macosx_version" in + [1-9][0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\2|'`;; + [1-9][0-9].[0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; + [1-9][0-9].[1-9][0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\200|'`;; + [1-9][0-9].[1-9][0-9].[0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\20\3|'`;; + [1-9][0-9].[1-9][0-9].[1-9][0-9]) + int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;; + *) + int_macosx_version=unexpected;; + esac] + test $int_macosx_version != unexpected || { + AC_MSG_ERROR([Unexpected MacOSX version ($macosx_version) returned by 'sw_vers -productVersion'; this configure script probably needs to be updated]) + } + AC_TRY_COMPILE([ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > $int_macosx_version +#error Compiling for a newer MacOSX version... +#endif + ], [;], + [], + [AC_MSG_ERROR([ + + You are natively building Erlang/OTP for a later version of MacOSX + than current version ($macosx_version). You either need to + cross-build Erlang/OTP, or set the environment variable + MACOSX_DEPLOYMENT_TARGET to $macosx_version (or a lower version). + +])]) + ;; + *) + ;; + esac +fi + +AC_CONFIG_FILES([../Makefile output.mk]) +AC_CONFIG_FILES([emd2exml], [chmod +x emd2exml]) + +AC_OUTPUT diff --git a/otp_build b/otp_build index 5c9a649531..bea5773e15 100755 --- a/otp_build +++ b/otp_build @@ -24,7 +24,7 @@ if [ -z "$ONLY_ERTS" ]; then AUTOCONF_SUBDIRS="lib lib/* lib/common_test/test_server" fi -AUTOCONF_SUBDIRS="$AUTOCONF_SUBDIRS erts ." +AUTOCONF_SUBDIRS="$AUTOCONF_SUBDIRS make erts" # `bootstrap_apps' should include application that are built, or # partly built in one of the bootstrap phases. Applications that @@ -211,55 +211,10 @@ set_config_flags () NL="\ " -create_lib_configure_in() -{ - cd $ERL_TOP - - # Multiple versions of autoconf generates code that - # don't work on all platforms (e.g. SunOS 5.8) if - # sub directories are soft links. Internally at Ericsson - # some OTP application directories are soft links. - # An added "/." solves this problem. - - sdirs= - for lib_app in $bootstrap_apps; do - case $lib_app in - lib/*) - if [ -f "$lib_app/configure.in" ]; then - app=`echo "$lib_app" | sed "s|lib/\(.*\)|\1|"` - sdirs="${sdirs}test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}" - fi;; - *) - ;; - esac - done - - sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" - - sdirs= - for lib_app in lib/*; do - is_bapp=false - for bapp in $bootstrap_apps; do - test $bapp != $lib_app || { is_bapp=true; break; } - done - if [ $is_bapp = false ] && [ -f "$lib_app/configure.in" ]; then - app=`echo "$lib_app" | sed "s|lib/\(.*\)|\1|"` - sdirs="${sdirs} test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}" - fi - done - - sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g" - - rm -f lib/configure.in - sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.in < lib/configure.in.src || { - echo "Failed to create lib/configure.in" - exit 1 - } -} distribute_config_helpers () { - aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco" + aclocal_dirs="make ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco" autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf" aclocal_master="./erts/aclocal.m4" @@ -281,7 +236,6 @@ distribute_config_helpers () do_autoconf () { - create_lib_configure_in distribute_config_helpers if [ ! -z "$OVERRIDE_CONFIGURE" ]; then @@ -322,6 +276,15 @@ do_autoconf () ( cd "$d" && autoheader ) || exit 1 done + echo "" + echo "=== creating ./configure" + otp_version=`cat "$ERL_TOP/OTP_VERSION"` + bootstrap_lib_apps=`echo $bootstrap_apps | sed "s|erts||g"` + cat "$ERL_TOP/configure.src" \ + | sed "s|@OTP_VERSION@|$otp_version|g;s|@BOOTSTRAP_LIB_APP_DIRS@|$bootstrap_lib_apps|" \ + > "$ERL_TOP/configure" + chmod +x "$ERL_TOP/configure" + restore_vars OVERRIDE_TARGET TARGET } @@ -384,8 +347,8 @@ try_cross_configure () test "X$build_value" != "X" || build_value="$BUILDSYS" - build_sys=`$ERL_TOP/erts/autoconf/config.sub "$build_value"` || exit 1 - host_sys=`$ERL_TOP/erts/autoconf/config.sub "$host_value"` || exit 1 + build_sys=`"$ERL_TOP/erts/autoconf/config.sub" "$build_value"` || exit 1 + host_sys=`"$ERL_TOP/erts/autoconf/config.sub" "$host_value"` || exit 1 test "$host_sys" = "$build_sys" || cross_configure=yes @@ -499,7 +462,7 @@ do_configure () case $TARGET in vxworks_*) ( cd erts/autoconf && \ - $ERL_TOP/erts/autoconf/configure.vxworks $TARGET ) + "$ERL_TOP/erts/autoconf/configure.vxworks" $TARGET ) echo "Configuring for build system too..." >&2 hide_vars OVERRIDE_TARGET TARGET TARGET=$BUILDSYS @@ -975,11 +938,11 @@ do_update_prel_git () { get_do_commit $1 setup_make - (cd $ERL_TOP/erts/preloaded/src && $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET clean) + (cd "$ERL_TOP/erts/preloaded/src" && $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET clean) $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET preloaded || exit 1 - (cd $ERL_TOP/erts/preloaded/src && $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET copy) + (cd "$ERL_TOP/erts/preloaded/src" && $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET copy) if [ $do_commit = true ]; then - git add -A $ERL_TOP/erts/preloaded/ebin/*.beam + git add -A "$ERL_TOP/erts/preloaded/ebin/*.beam" git commit -m 'Update preloaded modules' echo "Preloaded updated and commited." else @@ -1049,11 +1012,11 @@ do_debuginfo_win32 () (cd erts/emulator && $MAKE MAKE="$MAKE" TARGET=$TARGET FLAVOR=smp debug &&\ $MAKE MAKE="$MAKE" TARGET=$TARGET FLAVOR=plain debug) || exit 1 if [ -z "$1" ]; then - RELDIR=$ERL_TOP/release/$TARGET + RELDIR="$ERL_TOP/release/$TARGET" else RELDIR="$1" fi - BINDIR=$ERL_TOP/bin/$TARGET + BINDIR="$ERL_TOP/bin/$TARGET" EVSN=`grep '^VSN' erts/vsn.mk | sed 's,^VSN.*=[^0-9]*\([0-9].*\)$,@\1,g;s,^[^@].*,,g;s,^@,,g'` for f in beam.debug.dll beam.debug.smp.dll beam.pdb beam.smp.pdb erl.pdb werl.pdb erlexec.pdb; do if [ -f $BINDIR/$f ]; then @@ -1066,7 +1029,7 @@ do_debuginfo_win32 () do_installer_win32 () { setup_make - installer_dir=$ERL_TOP/erts/etc/win32/nsis + installer_dir="$ERL_TOP/erts/etc/win32/nsis" (cd $installer_dir; $MAKE MAKE="$MAKE" TARGET=$TARGET TESTROOT=$1 release) || exit 1 } @@ -1110,7 +1073,7 @@ do_copy_primary_bootstrap () cp -f $lib_src/compiler/ebin/*.beam $bootstrap/lib/compiler/ebin # bootstrap bin - if [ $bootstrap_src_top != $ERL_TOP ]; then + if [ $bootstrap_src_top != "$ERL_TOP" ]; then test -d $bootstrap/bin || mkdir -p $bootstrap/bin cp -f $bootstrap_src_top/bin/* $bootstrap/bin fi @@ -1119,22 +1082,22 @@ do_copy_primary_bootstrap () do_save_bootstrap () { - if [ ! -f $ERL_TOP/prebuilt.files ]; then + if [ ! -f "$ERL_TOP/prebuilt.files" ]; then echo "This is not a pre-built source distribution" 1>&2 exit 1 fi - if [ -d $ERL_TOP/bootstrap/lib ]; then + if [ -d "$ERL_TOP/bootstrap/lib" ]; then echo "Bootstrap already exist" 1>&2 exit 1 fi - do_copy_primary_bootstrap $ERL_TOP $ERL_TOP + do_copy_primary_bootstrap "$ERL_TOP" "$ERL_TOP" } do_remove_prebuilt_files () { do_save_bootstrap - for file in $ERL_TOP/`cat $ERL_TOP/prebuilt.files` ; do + for file in "$ERL_TOP"/`cat "$ERL_TOP/prebuilt.files"` ; do rm -f $file done } @@ -1143,7 +1106,7 @@ do_remove_prebuilt_files () check_erltop -cd $ERL_TOP +cd "$ERL_TOP" determine_version_controller @@ -1157,7 +1120,7 @@ unset ${erl_otp_flags} # Target first guess, won't necessarily hold, may be changed for # certain parameters. if [ X"$TARGET" = X"" ]; then - TARGET=`$ERL_TOP/erts/autoconf/config.guess` + TARGET=`"$ERL_TOP/erts/autoconf/config.guess"` fi BUILDSYS=$TARGET -- cgit v1.2.3