make/Init.gmk
changeset 51678 2fdfe34f7262
parent 50562 3903ab54107e
child 53729 9e1c9dc23c99
--- a/make/Init.gmk	Mon Sep 10 09:58:23 2018 +0200
+++ b/make/Init.gmk	Mon Sep 10 09:59:27 2018 +0200
@@ -240,6 +240,11 @@
     override BUILD_LOG_PIPE :=
   endif
 
+  ifeq ($(filter dist-clean, $(SEQUENTIAL_TARGETS)), dist-clean)
+    # We can't have a log file if we're about to remove it.
+    override BUILD_LOG_PIPE :=
+  endif
+
   ifeq ($(OUTPUT_SYNC_SUPPORTED), true)
     OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
   endif