Kaydet (Commit) 806f4d8e authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski Kaydeden (comit) Norbert Thiebaud

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/8446Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 62a18e8e
:
#
# 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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment