aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-06-20 17:43:56 +0200
committerRickard Green <[email protected]>2018-08-21 17:24:38 +0200
commitd4b456742b8bdab6222008ffd20e3d086b646e3f (patch)
tree8651371448b705351cff2e44dfe02f6bf2a7b04d
parent5eb18343591f69998099bd424362faa9d5a6a2e1 (diff)
downloadotp-d4b456742b8bdab6222008ffd20e3d086b646e3f.tar.gz
otp-d4b456742b8bdab6222008ffd20e3d086b646e3f.tar.bz2
otp-d4b456742b8bdab6222008ffd20e3d086b646e3f.zip
Parallel 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
-rwxr-xr-xotp_build91
10 files changed, 475 insertions, 221 deletions
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=<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..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/configure.in b/make/configure.in
index 559049aca1..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 can not be built.'
- else
- echo ' Using fakefop to generate placeholder PDF files.'
- fi
- echo
- echo '*********************************************************************'
-fi
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