[Libreoffice-commits] core.git: autogen.sh
Jan-Marek Glogowski
glogow at fbihome.de
Tue Mar 4 07:55:19 PST 2014
autogen.sh | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
New commits:
commit 806f4d8e9a5237ee6c70b1f0433bf12601db1260
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Tue Mar 4 11:49:46 2014 +0000
Clarify autogen.sh messages
Actually warn the user, if we ignore provided configuration files.
Also add an extended header to explain the expected behaviour.
Change-Id: I630d858c2d24aa0341d04359b45029c7faa54675
Reviewed-on: https://gerrit.libreoffice.org/8446
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/autogen.sh b/autogen.sh
index a2a9675..f15dd91a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,18 @@
:
+#
+# This script checks various configure parameters and uses three files:
+# * autogen.input (ro)
+# * autogen.lastrun (rw)
+# * autogen.lastrun.bak (rw)
+#
+# If _no_ parmeters:
+# Read args from autogen.input or autogen.lastrun
+# Else
+# Backup autogen.lastrun as autogen.lastrun.bak
+# Write autogen.lastrun with new commandline args
+#
+# Run configure with checked args
+#
eval 'exec perl -S $0 ${1+"$@"}'
if 0;
@@ -65,13 +79,13 @@ sub read_args($)
chomp();
# migrate from the old system
if ( substr($_, 0, 1) eq "'" ) {
- print "Migrating options from the old autogen.lastrun format, using:\n";
+ print STDERR "Migrating options from the old autogen.lastrun format, using:\n";
my @opts;
@opts = split(/'/);
foreach my $opt (@opts) {
if ( substr($opt, 0, 1) eq "-" ) {
push @lst, $opt;
- print " $opt\n";
+ print STDERR " $opt\n";
}
}
} elsif ( substr($_, 0, 1) eq "#" ) {
@@ -142,13 +156,31 @@ my $lastrun = "autogen.lastrun";
if (!@ARGV) {
if (-f $input) {
- warn "Ignoring $lastrun, using $input.\n" if (-f $lastrun);
+ if (-f $lastrun) {
+ print STDERR <<WARNING;
+********************************************************************
+*
+* Reading $input and ignoring $lastrun!
+* Consider removing $lastrun to get rid of this warning.
+*
+********************************************************************
+WARNING
+ }
@cmdline_args = read_args ($input);
} elsif (-f $lastrun) {
print STDERR "Reading $lastrun. Please rename it to $input to avoid this message.\n";
@cmdline_args = read_args ($lastrun);
}
} else {
+ if (-f $input) {
+ print STDERR <<WARNING;
+********************************************************************
+*
+* Using commandline arguments and ignoring $input!
+*
+********************************************************************
+WARNING
+ }
@cmdline_args = @ARGV;
}
More information about the Libreoffice-commits
mailing list