git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
James Denholm <nod.helm@gmail.com>
Date
May 6, 2014, 12:41 UTC
Message-ID
<1399380109-3805-6-git-send-email-nod.helm@gmail.com>
In-Reply-To
<1399380109-3805-1-git-send-email-nod.helm@gmail.com>

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>
---
 contrib/subtree/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index f3834b5..d888d45 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -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
-- 
1.9.2
Previous: James DenholmNext: Junio C Hamano
Message 6 of 8 in “contrib/subtree/Makefile: Standardisation pass”
  1. 0/5 contrib/subtree/Makefile: Standardisation passJames Denholm, May 6, 2014
  2. 1/5 contrib/subtree/Makefile: scrap unused $(gitdir)James Denholm, May 6, 2014
  3. 2/5 contrib/subtree/Makefile: Use GIT-VERSION-FILEJames Denholm, May 6, 2014
  4. 3/5 contrib/subtree/Makefile: s/libexecdir/gitexecdirJames Denholm, May 6, 2014
  5. 4/5 contrib/subtree/Makefile: Doc-gen rules cleanupJames Denholm, May 6, 2014
  6. 5/5 contrib/subtree/Makefile: clean rule cleanupJames Denholm, May 6, 2014
  7. Junio C HamanoMay 6, 2014
  8. James DenholmMay 6, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.