bugfix: we removed the existing Makefile even for `./configure --help`.

Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
This commit is contained in:
spacewander 2017-12-09 23:33:25 +08:00 committed by Yichun Zhang (agentzh)
parent dd46539557
commit 2cc5ba6c91
2 changed files with 12 additions and 11 deletions

View File

@ -1327,8 +1327,8 @@ install: all
clean:
rm -rf build
--- err
Can't exec "gcc-4.2": No such file or directory at ./configure line 625.
Can't exec "gcc-4.2": No such file or directory at ./configure line 663.
Can't exec "gcc-4.2": No such file or directory at ./configure line 621.
Can't exec "gcc-4.2": No such file or directory at ./configure line 659.
@ -1498,8 +1498,8 @@ install: all
clean:
rm -rf build
--- err
Can't exec "cl": No such file or directory at ./configure line 625.
Can't exec "cl": No such file or directory at ./configure line 663.
Can't exec "cl": No such file or directory at ./configure line 621.
Can't exec "cl": No such file or directory at ./configure line 659.
@ -1700,7 +1700,7 @@ clean:
--- err
--with-libpq is not allowed when --with-pg_config is already specified.
--- exit: 2
--- exit: 255
@ -2297,7 +2297,7 @@ install: all
clean:
rm -rf build
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 722.
Can't exec "sw_vers": No such file or directory at ./configure line 718.
@ -2382,7 +2382,7 @@ install: all
clean:
rm -rf build
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 722.
Can't exec "sw_vers": No such file or directory at ./configure line 718.

9
util/configure vendored
View File

@ -23,10 +23,6 @@ my $OS = $^O;
my $ngx_dir;
if (-f 'Makefile') {
unlink 'Makefile' or die "ERROR: failed to remove existing Makefile: $!\n";
}
for my $opt (@ARGV) {
if ($opt =~ /^--platform=(.*)/) {
$OS = $1;
@ -1368,6 +1364,11 @@ _EOC_
}
sub gen_makefile {
if (-f 'Makefile') {
unlink 'Makefile' or
die "ERROR: failed to remove existing Makefile: $!\n";
}
open my $out, ">Makefile" or
die "Cannot open Makefile for writing: $!\n";