2008-08-31 00:33:32 +04:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
sub combinations {
|
|
|
|
return [] unless @_;
|
|
|
|
my $first = shift;
|
|
|
|
my @rest = combinations(@_);
|
|
|
|
return @rest, map { [$first, @$_] } @rest;
|
|
|
|
}
|
|
|
|
|
2009-12-03 06:20:24 +03:00
|
|
|
my @allargs=("--enable-debug", "--disable-wrapping", "--disable-justify", "--disable-extra", "--enable-tiny", "--disable-browser --disable-help --disable-mouse --disable-operatingdir --disable-speller", "--disable-multibuffer", "--disable-nanorc", "--with-slang");
|
2008-08-31 00:33:32 +04:00
|
|
|
my @combos = combinations(@allargs);
|
|
|
|
|
|
|
|
my $i = 0;
|
|
|
|
foreach my $name (@combos) {
|
|
|
|
my @args = @$name;
|
|
|
|
my $pct = $i / $#combos * 100;
|
|
|
|
printf "Trying with options: @args, %d%% done...\n", $pct;
|
2009-07-12 07:36:58 +04:00
|
|
|
my $cmd = "./configure @args && make clean all";
|
|
|
|
system("($cmd) >/dev/null 2>&1");
|
2009-02-17 06:05:17 +03:00
|
|
|
if ($? != 0) {
|
2008-08-31 00:33:32 +04:00
|
|
|
print "Build failed for args: @args\n";
|
2009-07-12 07:36:58 +04:00
|
|
|
print "To reproduce, run:\n $cmd\n";
|
2008-08-31 00:33:32 +04:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
print "All options completed successfully!\n";
|