summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-03-04 11:49:46 +0000
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-04 09:54:51 -0600
commit806f4d8e9a5237ee6c70b1f0433bf12601db1260 (patch)
treeab0a95f70681b1de05bad81504bb3bfa16098065 /autogen.sh
parent62a18e8ec17b5ee389a2c82866d69d1130351282 (diff)
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@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh38
1 files changed, 35 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index a2a967512785..f15dd91a534d 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;
}