Thread (14 messages) flat view 14 messages, 2 authors, 2016-06-15
STALE3734d

[PATCH v2 5/5] contrib/subtree/Makefile: clean rule cleanup

From: James Denholm <hidden>
Date: 2016-06-15 23:00:59
Subsystem: the rest · Maintainer: Linus Torvalds

git:Documentation/Makefile and others establish "RM ?= rm -f" as a
convention for rm calls in clean rules, hence follow this convention
instead of simply forcing clean to use rm.

subproj and mainline no longer need to be removed in clean, as they are
no longer created in git:contrib/subtree by "make test". Hence, remove
the rm call for those folders.

Other makefiles don't remove "*~" files, remove the rm call to prevent
unexpected behaviour in the future. Similarly, clean doesn't remove the
installable file, so rectify this.

Signed-off-by: James Denholm <redacted>
---

Admittedly, git:Makefile does not itself follow the "RM ?= rm -f"
setup, instead using "RM = rm -f", but I felt that there were probably
$ARCANE_REASONS for this.

Also, Peff, you were right about the dirs.

 contrib/subtree/Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index f3834b5..4f96a24 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -11,8 +11,9 @@ man1dir ?= $(mandir)/man1
 
 -include ../../GIT-VERSION-FILE
 
-# this should be set to a 'standard' bsd-type install program
-INSTALL ?= install
+# These should be set to 'standard' bsd-type programs
+INSTALL  ?= install
+RM       ?= rm -f
 
 ASCIIDOC = asciidoc
 XMLTO    = xmlto
@@ -60,7 +61,7 @@ test:
 	$(MAKE) -C t/ test
 
 clean:
-	rm -f *~ *.xml *.html *.1
-	rm -rf subproj mainline
+	$(RM) $(GIT_SUBTREE)
+	$(RM) *.xml *.html *.1
 
 .PHONY: FORCE
-- 
1.9.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help