From e0d777bb5dcd9ba5455ef5f9212858d8ed6dd718 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Sun, 8 Sep 2013 20:57:08 -0700 Subject: [PATCH] ./configure: always remove exising Makefile before trying to generate a new one. --- util/configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/configure b/util/configure index e5f8e9e..59a8299 100755 --- a/util/configure +++ b/util/configure @@ -22,6 +22,10 @@ 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; @@ -304,7 +308,7 @@ sub shell ($@) { unless ($dry_run) { system($cmd) == 0 or - die "failed to run command: ", trim($cmd), "\n"; + die "ERROR: failed to run command: ", trim($cmd), "\n"; } }