changeset 19053:03ad2f603654 draft

(svn r23907) -Fix: [Makefile] Let "make clean --dry-run" not delete Makefiles.
author matthijs <matthijs@openttd.org>
date Tue, 07 Feb 2012 09:57:08 +0000
parents 32dd35fd2c59
children ba23b10963a9
files Makefile.in
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in
+++ b/Makefile.in
@@ -126,6 +126,13 @@
 mrproper:
 	@for dir in $(DIRS); do \
 		$(MAKE) -C $$dir mrproper; \
+	done
+# Don't be tempted to merge these two for loops. Doing that breaks make
+# --dry-run, since make has this "feature" that it always runs commands
+# containing $(MAKE), even when --dry-run is passed. The objective is of
+# course to also get a dry-run of submakes, but make is not smart enough
+# to see that a for loop runs both a submake and an actual command.
+	@for dir in $(DIRS); do \
 		rm -f $$dir/Makefile; \
 	done
 	$(Q)rm -rf objs