changeset 51175:3903ab54107e

8204664: PrepareFailureLogs should be done after sequential make targets Reviewed-by: erikj
author ihse
date Thu, 14 Jun 2018 11:46:53 +0200
parents 5756e8eecb17
children 1372f66e0a17
files make/Init.gmk make/InitSupport.gmk
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/Init.gmk	Thu Jun 14 11:22:04 2018 +0200
+++ b/make/Init.gmk	Thu Jun 14 11:46:53 2018 +0200
@@ -298,7 +298,6 @@
   main: $(INIT_TARGETS)
         ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
 	  $(call RotateLogFiles)
-	  $(call PrepareFailureLogs)
 	  $(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE)
           ifneq ($(SEQUENTIAL_TARGETS), )
             # Don't touch build output dir since we might be cleaning. That
@@ -308,6 +307,7 @@
 	        $(SEQUENTIAL_TARGETS) )
           endif
           ifneq ($(PARALLEL_TARGETS), )
+	    $(call PrepareFailureLogs)
 	    $(call StartGlobalTimer)
 	    $(call PrepareSmartJavac)
             # JOBS will only be empty for a bootcycle-images recursive call
--- a/make/InitSupport.gmk	Thu Jun 14 11:22:04 2018 +0200
+++ b/make/InitSupport.gmk	Thu Jun 14 11:46:53 2018 +0200
@@ -456,6 +456,9 @@
 	)
   endef
 
+  # Failure logs are only supported for "parallel" main targets, not the
+  # (trivial) sequential make targets (such as clean and reconfigure),
+  # since the failure-logs directory creation will conflict with clean.
   define PrepareFailureLogs
 	$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
 	$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs