contrib/subtree/Makefile: clean up rule for "clean"
authorJames Denholm <nod.helm@gmail.com>
Tue, 6 May 2014 12:41:49 +0000 (22:41 +1000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 May 2014 22:36:17 +0000 (15:36 -0700)
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.

Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: James Denholm <nod.helm@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/Makefile
index f3834b5bd6ebb91a611cf7a9f6ad8d8ccfe0cb58..d888d4516114c719e46ab7f2aeb24e63618b7fac 100644 (file)
@@ -12,7 +12,8 @@ man1dir ?= $(mandir)/man1
 -include ../../GIT-VERSION-FILE
 
 # this should be set to a 'standard' bsd-type install program
-INSTALL ?= install
+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