[CRIU] [RFC] [PATCH 1/2] build/nmk: add mrproper-y

Dmitry Safonov dsafonov at virtuozzo.com
Fri Mar 18 03:09:32 PDT 2016


This will separate clean process on two parts:
- deleting binaries/objects/temp
- deleting generated files

Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 scripts/nmk/scripts/build.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
index 10a5d44..bd23d61 100644
--- a/scripts/nmk/scripts/build.mk
+++ b/scripts/nmk/scripts/build.mk
@@ -13,6 +13,7 @@ builtin-name	:=
 lib-name	:=
 ld_flags	:=
 cleanup-y	:=
+mrproper-y	:=
 
 MAKECMDGOALS := $(call uniq,$(MAKECMDGOALS))
 
@@ -170,13 +171,19 @@ objlist:
 .PHONY: objlist
 
 #
-# Clean everything up.
+# Clean most files, but leave enough to navigate with tags (generated files)
 clean:
 	$(call msg-clean, $(obj))
 	$(Q) $(RM) $(obj)/*.o $(obj)/*.d $(obj)/*.i $(obj)/*.s $(cleanup-y)
 .PHONY: clean
 
 #
+# Delete all generated files
+mrproper: clean
+	$(Q) $(RM) $(mrproper-y)
+.PHONY: mrproper
+
+#
 # Footer.
 $(__nmk_dir)scripts/build.mk:
 	@true
-- 
2.7.2



More information about the CRIU mailing list