From 38ea6e088edcf4f7a37b0de4c17b1be093094506 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 26 Nov 2016 14:33:15 -0800 Subject: [PATCH] Don't invoke make in pcre directory unless it has a Makefile make clean was outputting misleading messages due to our recursive invocation of make in the pcre directory, even if that directory has no Makefile. This can easily come about if the ./configure script determines we have a system installed PCRE. This change simply checks for the presence of the Makefile in the PCRE directory before invoking recursive make, for the clean and distclean targets. Fixes #3586 --- Makefile.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index cdb8ae2dc..8323b0234 100644 --- a/Makefile.in +++ b/Makefile.in @@ -889,7 +889,8 @@ style-all: # Restore the source tree to the state right after extracting a tarball. # distclean: clean - $v $(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||: + $v test ! -f $(PCRE2_DIR)/Makefile || \ + $(MAKE) V=$(V) -C $(PCRE2_DIR) distclean ||: $v rm -f config.status config.log config.h Makefile .PHONY: distclean @@ -906,9 +907,12 @@ clean: # PCRE's make clean has a few slightly annoying exceptions to the V= rule. If V=0 # send all output to /dev/null - unless there's an error, in which case run it again not silenced. ifeq ($(V), 0 ) - $(MAKE) -C $(PCRE2_DIR) clean ||: + @test ! -f $(PCRE2_DIR)/Makefile || \ + $(MAKE) -C $(PCRE2_DIR) clean ||: else - @$(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || $(MAKE) -s -C $(PCRE2_DIR) clean ||: + @test ! -f $(PCRE2_DIR)/Makefile || \ + $(MAKE) -s -C $(PCRE2_DIR) clean > /dev/null || \ + $(MAKE) -s -C $(PCRE2_DIR) clean ||: endif $v rm -f obj/*.o *.o doc.h doc.tmp $v rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr