aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-08-21 17:51:52 +0200
committerRickard Green <[email protected]>2018-08-21 17:51:52 +0200
commit1b9aae1a5dd812933543615c3c25bd3321ec4061 (patch)
treee952aa3178dc721300d6d1dc2a7db563c24b7f68
parent9672921fb8afd82cbb449b3a57f2c2f0b4b0e975 (diff)
parentd4b456742b8bdab6222008ffd20e3d086b646e3f (diff)
downloadotp-1b9aae1a5dd812933543615c3c25bd3321ec4061.tar.gz
otp-1b9aae1a5dd812933543615c3c25bd3321ec4061.tar.bz2
otp-1b9aae1a5dd812933543615c3c25bd3321ec4061.zip
Merge branch 'rickard/parallel-configure/OTP-14625'
* rickard/parallel-configure/OTP-14625: Parallel configure Remove undocumented and unused lazy configure
-rw-r--r--.gitignore7
-rw-r--r--HOWTO/INSTALL.md2
-rw-r--r--configure.src435
-rw-r--r--erts/configure.in5
-rw-r--r--lib/configure.in.src62
-rw-r--r--lib/erl_interface/configure.in5
-rw-r--r--lib/megaco/configure.in4
-rw-r--r--lib/odbc/configure.in6
-rw-r--r--make/configure.in (renamed from configure.in)79
-rw-r--r--make/lazy_configure.mk82
-rwxr-xr-xotp_build207
11 files changed, 475 insertions, 419 deletions
diff --git a/.gitignore b/.gitignore
index 0e9d07757f..cf0da64a43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,9 +171,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.
@@ -186,10 +187,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 456dafeba5..674454bc8e 100644
--- a/HOWTO/INSTALL.md
+++ b/HOWTO/INSTALL.md
@@ -338,6 +338,8 @@ use the `--prefix` argument like this: `./configure --prefix=<Dir>`.
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.src b/configure.src
new file mode 100644
index 0000000000..3849908388
--- /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 cannot 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 2b3d97cfdd..c6033187e6 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/configure.in b/make/configure.in
index c3a7e5018d..c390e1ca31 100644
--- a/configure.in
+++ b/make/configure.in
@@ -44,7 +44,7 @@ case "X$ERL_TOP" in
X)
;;
X/*)
- test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || {
+ test -f "$ERL_TOP/erts/emulator/beam/beam_emu.c" || {
AC_MSG_ERROR([Invalid \$ERL_TOP])
}
srcdir="$ERL_TOP";;
@@ -207,6 +207,9 @@ AC_MSG_CHECKING([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]))
@@ -412,77 +415,7 @@ if test $CROSS_COMPILING = no; then
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_CONFIG_FILES([../Makefile output.mk])
+AC_CONFIG_FILES([emd2exml], [chmod +x 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 cannot be built.'
- else
- echo ' Using fakefop to generate placeholder PDF files.'
- fi
- echo
- echo '*********************************************************************'
-fi
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..bea5773e15 100755
--- a/otp_build
+++ b/otp_build
@@ -21,11 +21,10 @@
# 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
-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
@@ -212,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"
@@ -282,7 +236,6 @@ distribute_config_helpers ()
do_autoconf ()
{
- create_lib_configure_in
distribute_config_helpers
if [ ! -z "$OVERRIDE_CONFIGURE" ]; then
@@ -323,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
}
@@ -385,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
@@ -500,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
@@ -526,105 +488,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
@@ -1075,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
@@ -1149,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
@@ -1166,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
}
@@ -1210,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
@@ -1219,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
}
@@ -1243,7 +1106,7 @@ do_remove_prebuilt_files ()
check_erltop
-cd $ERL_TOP
+cd "$ERL_TOP"
determine_version_controller
@@ -1257,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
@@ -1335,27 +1198,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)