[CRIU] [PATCH] Makefile: add distclean target

Kir Kolyshkin kir at openvz.org
Mon Feb 13 18:10:29 EST 2012


...and move tags/cscope removal to it.

'make clean' is traditionally used to remove all
compiler-generated stuff in order to do a clean rebuild.

'make distclean' cleans more, it is used to prepare sources
for 'make dist' (creating a source tarball).

It is unfortunate to find out you have to run 'make tags cscope'
every time after 'make clean'.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 Makefile |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 113012c..8fda273 100644
--- a/Makefile
+++ b/Makefile
@@ -156,8 +156,6 @@ clean:
 	$(Q) $(RM) -f ./*.img
 	$(Q) $(RM) -f ./*.out
 	$(Q) $(RM) -f ./*.bin
-	$(Q) $(RM) -f ./tags
-	$(Q) $(RM) -f ./cscope*
 	$(Q) $(RM) -f ./$(PROGRAM)
 	$(Q) $(RM) -f ./$(HEAD-BLOB-GEN)
 	$(Q) $(RM) -f ./$(RHEAD-BLOB-GEN)
@@ -169,6 +167,12 @@ clean:
 	$(Q) $(MAKE) -C Documentation clean
 .PHONY: clean
 
+distclean: clean
+	$(E) "  DISTCLEAN"
+	$(Q) $(RM) -f ./tags
+	$(Q) $(RM) -f ./cscope*
+.PHONY: distclean
+
 tags:
 	$(E) "  GEN" $@
 	$(Q) $(RM) -f tags
-- 
1.7.7.6



More information about the CRIU mailing list