aboutsummaryrefslogtreecommitdiffstats
path: root/otp_build
diff options
context:
space:
mode:
Diffstat (limited to 'otp_build')
-rwxr-xr-xotp_build24
1 files changed, 15 insertions, 9 deletions
diff --git a/otp_build b/otp_build
index 3e8c60ef52..ad9d38ebca 100755
--- a/otp_build
+++ b/otp_build
@@ -1,20 +1,20 @@
#! /bin/sh
#
# %CopyrightBegin%
-#
+#
# Copyright Ericsson AB 2002-2010. All Rights Reserved.
-#
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -40,7 +40,7 @@ bootstrap_apps="erts lib/asn1 lib/compiler lib/hipe lib/ic lib/kernel lib/parset
# We will quote a bit more than needed, but the important thing is that
# all that needs quoting will be quoted...
-DONT_QUOTE="A-Za-z0-9/=_+-"
+DONT_QUOTE="A-Za-z0-9~/=_+-"
# Utility functions
usage ()
@@ -225,6 +225,8 @@ set_config_flags ()
export CONFIG_FLAGS;
}
+NL="\
+"
create_lib_configure_in()
{
cd $ERL_TOP
@@ -241,7 +243,7 @@ create_lib_configure_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/.)\n"
+ sdirs="${sdirs}test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}"
fi;;
*)
;;
@@ -258,7 +260,7 @@ create_lib_configure_in()
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/.)\n"
+ sdirs="${sdirs} test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}"
fi
done
@@ -431,7 +433,11 @@ try_cross_configure ()
--build=*)
build_value=`echo $x | sed "s|^--build=\(.*\)|\1|"`;;
--xcomp-conf=*)
- xcomp_conf=`echo "X$arg" | sed "s|^X--xcomp-conf=\(.*\)\$|\1|g"`
+ # tilde expansion is not handled by the `configure' script,
+ # but we do it for this argument. This argument is however not
+ # a `configure' argument.
+ xcomp_conf=`echo "X$arg" | sed "s|^X--xcomp-conf=\(.*\)\$|\1|g;s|\([^$DONT_QUOTE]\)|\\\\\\\\\1|g"`
+ eval "xcomp_conf=$xcomp_conf"
test "X$xcomp_conf" != "X" || {
echo "$0: Missing xcomp-conf file name"
exit 1
@@ -442,7 +448,7 @@ try_cross_configure ()
}
. "$xcomp_conf"
test $? -eq 0 || {
- echo "$0: Failed to read xcomp-conf file: $conf"
+ echo "$0: Failed to read xcomp-conf file: $xcomp_conf"
exit 1
}
test "X$erl_xcomp_build" = "X" || build_value="$erl_xcomp_build"