[Libreoffice-commits] core.git: autogen.sh
Michael Meeks
michael.meeks at collabora.com
Thu Nov 13 08:29:12 PST 2014
autogen.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 1e03a686a386314be25520dc70e7be01d0f7193b
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Nov 13 16:27:30 2014 +0000
autogen: add --best-effort to help automation bridge option changes.
When we add or deprecate configure --with / --enable options lots
of scripts can break. Instead just add --best-effort to your autogen.sh
command line to get warnings but not a failure in this case.
Change-Id: I73d6ba53ee179384c2e34bf6780d074b04f70c06
diff --git a/autogen.sh b/autogen.sh
index 1a1a2d4..cdf4e76 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -161,6 +161,10 @@ die "Failed to generate the configure script" if (! -f "configure");
# Handle help arguments first, so we don't clobber autogen.lastrun
for my $arg (@ARGV) {
if ($arg =~ /^(--help|-h|-\?)$/) {
+ print STDERR "autogen.sh - libreoffice configuration helper\n";
+ print STDERR " --clean forcibly re-generate configuration\n";
+ print STDERR " --best-effort don't fail on un-known configure with/enable options\n";
+ print STDERR "\nOther arguments passed directly to configure:\n\n";
system ("./configure --help");
exit;
}
@@ -203,6 +207,8 @@ WARNING
my @args;
my $default_config = "$src_path/distro-configs/default.conf";
+my $option_checking = 'fatal';
+
if (-f $default_config) {
print STDERR "Reading default config file: $default_config.\n";
push @args, read_args ($default_config);
@@ -217,6 +223,8 @@ for my $arg (@cmdline_args) {
} else {
push @args, read_args ($config);
}
+ } elsif ($arg =~ m/--best-effort$/) {
+ $option_checking = 'warn';
} else {
push @args, $arg;
}
@@ -252,7 +260,7 @@ if (defined $ENV{NOCONFIGURE}) {
}
}
push @args, "--srcdir=$src_path";
- push @args, "--enable-option-checking=fatal";
+ push @args, "--enable-option-checking=$option_checking";
print "Running ./configure with '" . join ("' '", @args), "'\n";
system ("./configure", @args) && die "Error running configure";
More information about the Libreoffice-commits
mailing list