changeset 712:430419abf723 trunk

[svn] - distclean enhancements
author nenolod
date Sun, 26 Feb 2006 20:09:32 -0800
parents 6792c5fb22f8
children cf7b5a288564
files mk/objective.mk
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mk/objective.mk	Sun Feb 26 20:06:12 2006 -0800
+++ b/mk/objective.mk	Sun Feb 26 20:09:32 2006 -0800
@@ -69,11 +69,23 @@
 	@echo "[all objectives cleaned]"
 
 distclean: clean
-	$(RM) mk/rules.mk
+	@if test "$(SUBDIRS)" != "none"; then \
+		for i in $(SUBDIRS); do \
+			echo "[distcleaning subobjective: $$i]"; \
+			(cd $$i; $(MAKE) distclean; cd ..); \
+			echo "[distcleaning subobjective: $$i]"; \
+		done; \
+	fi
+	@if test -f Makefile.in; then \
+		$(RM) -f Makefile; \
+	fi
+	@if test -f mk/rules.mk; then \
+		$(RM) -f mk/rules.mk; \
+	fi
 
 build:
 	$(MAKE) build-prehook
-	+@if test "$(SUBDIRS)" != "none"; then \
+	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[building subobjective: $$i]"; \
 			(cd $$i; $(MAKE); cd ..); \