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

[PATCH v2 2/5] contrib/subtree/Makefile: Use GIT-VERSION-FILE

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

GVF is already being used in most/all other makefiles in the project, and has been for _quite_ a while. Hence, drop file-unique gitver and replace with GIT_VERSION.

Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: James Denholm <nod.helm@gmail.com>
---
 contrib/subtree/Makefile | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 87797ed..f63334b 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -6,7 +6,10 @@ mandir ?= $(prefix)/share/man
 libexecdir ?= $(prefix)/libexec/git-core
 man1dir ?= $(mandir)/man1
 
-gitver ?= $(word 3,$(shell git --version))
+../../GIT-VERSION-FILE: FORCE
+	$(MAKE) -C ../../ GIT-VERSION-FILE
+
+-include ../../GIT-VERSION-FILE
 
 # this should be set to a 'standard' bsd-type install program
 INSTALL ?= install
@@ -44,11 +47,11 @@ $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
 
 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
 	asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
-		-agit_version=$(gitver) $^
+		-agit_version=$(GIT_VERSION) $^
 
 $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
 	asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
-		-agit_version=$(gitver) $^
+		-agit_version=$(GIT_VERSION) $^
 
 test:
 	$(MAKE) -C t/ test
@@ -56,3 +59,5 @@ test:
 clean:
 	rm -f *~ *.xml *.html *.1
 	rm -rf subproj mainline
+
+.PHONY: FORCE
-- 
1.9.2
Previous: James DenholmNext: James Denholm
Message 3 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.