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
This commit is contained in:
10
autogen.sh
10
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
|
# Handle help arguments first, so we don't clobber autogen.lastrun
|
||||||
for my $arg (@ARGV) {
|
for my $arg (@ARGV) {
|
||||||
if ($arg =~ /^(--help|-h|-\?)$/) {
|
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");
|
system ("./configure --help");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -203,6 +207,8 @@ WARNING
|
|||||||
|
|
||||||
my @args;
|
my @args;
|
||||||
my $default_config = "$src_path/distro-configs/default.conf";
|
my $default_config = "$src_path/distro-configs/default.conf";
|
||||||
|
my $option_checking = 'fatal';
|
||||||
|
|
||||||
if (-f $default_config) {
|
if (-f $default_config) {
|
||||||
print STDERR "Reading default config file: $default_config.\n";
|
print STDERR "Reading default config file: $default_config.\n";
|
||||||
push @args, read_args ($default_config);
|
push @args, read_args ($default_config);
|
||||||
@@ -217,6 +223,8 @@ for my $arg (@cmdline_args) {
|
|||||||
} else {
|
} else {
|
||||||
push @args, read_args ($config);
|
push @args, read_args ($config);
|
||||||
}
|
}
|
||||||
|
} elsif ($arg =~ m/--best-effort$/) {
|
||||||
|
$option_checking = 'warn';
|
||||||
} else {
|
} else {
|
||||||
push @args, $arg;
|
push @args, $arg;
|
||||||
}
|
}
|
||||||
@@ -252,7 +260,7 @@ if (defined $ENV{NOCONFIGURE}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
push @args, "--srcdir=$src_path";
|
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";
|
print "Running ./configure with '" . join ("' '", @args), "'\n";
|
||||||
system ("./configure", @args) && die "Error running configure";
|
system ("./configure", @args) && die "Error running configure";
|
||||||
|
Reference in New Issue
Block a user