From 68c314fc80b5dd5be26a7207b3459a2be9625240 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Wed, 3 Apr 2013 18:01:35 +0200 Subject: revert back to usign autogen.sh cmdline arguments if given MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a partial revert of ca0c54d0fe3812cec64e5c7cc83309d4397f5e0a . Ignoring cmdline arguments if autogen.* exists is broken for several reasons: - autogen.sh of every other package passes cmdline arguments to configure - that's because if I was bothered to give them, I want them used - there's no reason to prefer autogen.input now, given that autogen.input cannot be overwritten by autogen.sh, unlike autogen.lastrun , so there's no accidental loss of the switches - running autogen.sh --foo followed by autogen.sh --bar actually runs configure with --foo the second time too, because the first one creates autogen.lastrun and the second one first complains about the cmdline args, then complains about autogen.lastrun, and then uses it Change-Id: I5868610935d0312915be74602b6435eea069f937 Reviewed-on: https://gerrit.libreoffice.org/3190 Reviewed-by: Luboš Luňák Tested-by: Luboš Luňák --- autogen.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'autogen.sh') diff --git a/autogen.sh b/autogen.sh index f5960e375005..2498c5a3313a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -112,14 +112,14 @@ my @cmdline_args = (); my $input = "autogen.input"; my $lastrun = "autogen.lastrun"; -if (-f $input) { - warn "Ignoring command-line arguments, using $input.\n" if (@ARGV); - warn "Ignoring $lastrun, using $input.\n" if (-f $lastrun); - @cmdline_args = read_args ($input); -} elsif (-f $lastrun) { - warn "Ignoring command-line arguments, using $lastrun.\n" if (@ARGV); - print STDERR "Reading $lastrun. Please rename it to $input to avoid this message.\n"; - @cmdline_args = read_args ($lastrun); +if (!@ARGV) { + if (-f $input) { + warn "Ignoring $lastrun, using $input.\n" if (-f $lastrun); + @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 { @cmdline_args = @ARGV; } -- cgit v1.2.3