[Libreoffice-commits] .: Branch 'feature/bootstrap-build' - autogen.sh
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Sun Nov 28 21:07:33 PST 2010
autogen.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 676eb1d7f5fbf5e2d69a1f22cf226555b862c30f
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Nov 28 23:07:09 2010 -0600
make autogen ability to remember the last command line work on MacOS
futhermore: the conf.log extraction method is no reliable. autoconf
has changed and newer version don't put it there.
furthermore, because of the post_download generation,
the conf.log get crowded by a second autoconf...
diff --git a/autogen.sh b/autogen.sh
index c2572eb..27ea62a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,14 +9,19 @@ if test "z$1" = "z--clean"; then
exit 1;
fi
-requote_args ()
+function requote
{
- sed -r -e 's/.*configure //' -e 's/(["'"'"'])/\\\1/g' -e 's/=(([^"'"'"'-]|-[^-]| )*)( |$)/="\1" /g'
+ local q=\'
+ set -- "${@//\'/$q\'$q}" # quote inner instances of '
+ set -- "${@/#/$q}" # add ' to start of each param
+ set -- "${@/%/$q}" # add ' to end of each param
+ echo "$*"
}
+
old_args=""
-if test $# -eq 0 && test -f config.log; then
- old_args=`grep '\$ ./configure' config.log | requote_args`
+if test $# -eq 0 && test -f autogen.lastrun; then
+ old_args=$(cat autogen.lastrun)
echo "re-using arguments from last configure: $old_args";
fi
@@ -37,6 +42,7 @@ if test "x$NOCONFIGURE" = "x"; then
if test -n "$old_args" ; then
eval `echo ./configure $old_args`
else
+ echo "$(requote "$@")" > autogen.lastrun
./configure "$@"
fi
else
More information about the Libreoffice-commits
mailing list