Only output the options that are used.
git-svn-id: svn://10.0.0.236/trunk@63763 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
924b9331b8
commit
03c607e36e
@ -26,29 +26,36 @@
|
||||
# See mozconfig2configure for more details
|
||||
|
||||
print_header() {
|
||||
if [ "$MOZCONFIG" ]; then
|
||||
_mozconfig="$MOZCONFIG"
|
||||
else
|
||||
_mozconfig="$HOME/.mozconfig"
|
||||
fi
|
||||
echo "# gmake"
|
||||
echo "# This file is automatically generated for client.mk."
|
||||
echo "# Do not edit. Edit $_mozconfig instead."
|
||||
echo "# To create a new .mozconfig file, you can visit,"
|
||||
echo "# http://webtools.mozilla.org/webtools/build/config.cgi"
|
||||
echo
|
||||
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
|
||||
cat >> $tmp_file <<EOF
|
||||
# gmake
|
||||
# This file is automatically generated for client.mk.
|
||||
# Do not edit. Edit $_mozconfig instead.
|
||||
# To create a new .mozconfig file, you can visit,
|
||||
# http://webtools.mozilla.org/webtools/build/config.cgi
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
ac_add_options() {
|
||||
echo "# $* is not used by client.mk"
|
||||
echo "# $* is used by configure (not client.mk)" >> $tmp_file
|
||||
}
|
||||
|
||||
mk_add_options() {
|
||||
for _opt
|
||||
do
|
||||
for _opt; do
|
||||
# Escape shell characters, space, tab, dollar, quote, backslash,
|
||||
# and substitute '@<word>@' with '$(<word>)'.
|
||||
echo " $_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'
|
||||
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
|
||||
echo $_opt;
|
||||
opts="${opts:+$opts^}$_opt";
|
||||
done >> $tmp_file
|
||||
}
|
||||
|
||||
mk_echo_options() {
|
||||
echo "Adding client.mk options from $MOZCONFIG:"
|
||||
IFS=^
|
||||
for _opt in $opts; do
|
||||
echo " $_opt"
|
||||
done
|
||||
}
|
||||
|
||||
@ -59,6 +66,7 @@ scriptdir=`dirname $0`
|
||||
topsrcdir=$1
|
||||
out_file=$2
|
||||
tmp_file="$out_file-tmp$$"
|
||||
opts=""
|
||||
|
||||
trap "rm -f $tmp_file; exit 1" 1 2 15
|
||||
|
||||
@ -71,8 +79,11 @@ echo "# PATH=$PATH" >> $tmp_file
|
||||
|
||||
if [ "$MOZCONFIG" ]
|
||||
then
|
||||
echo "Adding client.mk options from $MOZCONFIG:"
|
||||
. $MOZCONFIG | tee -a $tmp_file
|
||||
. $MOZCONFIG
|
||||
fi
|
||||
|
||||
if [ "$opts" ]; then
|
||||
mk_echo_options
|
||||
fi
|
||||
|
||||
if cmp -s $tmp_file $out_file; then
|
||||
|
||||
@ -89,6 +89,9 @@ done
|
||||
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $_topsrcdir`
|
||||
if [ "$MOZCONFIG" ]; then
|
||||
. $MOZCONFIG
|
||||
fi
|
||||
|
||||
if [ "$mozconfig_ac_options" ]; then
|
||||
ac_echo_options 1>&2
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user