[CRIU] [PATCH 7/9] Makefile: reorg top-level clean/mrproper

Kir Kolyshkin kir at openvz.org
Wed Feb 22 15:15:47 PST 2017


Mostly this is done in order to not repeat the recursive clean
lines twice.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Makefile | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 75569f8..7c4b372 100644
--- a/Makefile
+++ b/Makefile
@@ -244,29 +244,24 @@ lib: criu
 	$(Q) $(MAKE) $(build)=lib all
 .PHONY: lib
 
-subclean:
-	$(Q) $(MAKE) -C Documentation clean
-	$(Q) $(MAKE) $(build)=test/compel clean
-	$(Q) $(RM) .gitid
-.PHONY: subclean
-
-clean: subclean
+clean mrproper:
 	$(Q) $(MAKE) $(build)=images $@
 	$(Q) $(MAKE) $(build)=criu $@
 	$(Q) $(MAKE) $(build)=soccr $@
 	$(Q) $(MAKE) $(build)=compel $@
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 	$(Q) $(MAKE) $(build)=lib $@
-.PHONY: clean
+.PHONY: clean mrproper
 
-# mrproper depends on clean in nmk
-mrproper: subclean
-	$(Q) $(MAKE) $(build)=images $@
-	$(Q) $(MAKE) $(build)=criu $@
-	$(Q) $(MAKE) $(build)=soccr $@
-	$(Q) $(MAKE) $(build)=compel $@
-	$(Q) $(MAKE) $(build)=compel/plugins $@
-	$(Q) $(MAKE) $(build)=lib $@
+clean-top:
+	$(Q) $(MAKE) -C Documentation clean
+	$(Q) $(MAKE) $(build)=test/compel clean
+	$(Q) $(RM) .gitid
+.PHONY: clean-top
+
+clean: clean-top
+
+mrproper-top: clean-top
 	$(Q) $(RM) $(CONFIG_HEADER)
 	$(Q) $(RM) $(SOCCR_CONFIG)
 	$(Q) $(RM) $(VERSION_HEADER)
@@ -275,7 +270,9 @@ mrproper: subclean
 	$(Q) $(RM) compel/include/asm
 	$(Q) $(RM) cscope.*
 	$(Q) $(RM) tags TAGS
-.PHONY: mrproper
+.PHONY: mrproper-top
+
+mrproper: mrproper-top
 
 #
 # Non-CRIU stuff.
-- 
2.9.3



More information about the CRIU mailing list