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

[PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation

From
Frank Lichtenheld <frank@lichtenheld.de>
Date
Mar 25, 2007, 11:56 UTC
Message-ID
<11748238102228-git-send-email-frank@lichtenheld.de>
In-Reply-To
<7vircqe389.fsf@assigned-by-dhcp.cox.net>

Include GIT-VERSION-FILE and replace @@GIT_VERSION@@ in the HTML and XML asciidoc output. The documentation doesn't depend on GIT-VERSION-FILE so it will not be automatically rebuild if nothing else changed.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 Documentation/Makefile |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
 This should satisfy all of Junio's requirements.
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 7c1c9e1..64cc755 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -64,6 +64,11 @@ install: man
 	$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
 
 
+../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+	$(MAKE) -C ../ GIT-VERSION-FILE
+
+-include ../GIT-VERSION-FILE
+
 #
 # Determine "include::" file references in asciidoc files.
 #
@@ -90,17 +95,21 @@ $(cmds_txt): cmd-list.perl $(MAN1_TXT)
 git.7 git.html: git.txt core-intro.txt
 
 clean:
-	rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
+	rm -f *.xml *.xml+ *.html *.html+ *.1 *.7 howto-index.txt howto/*.html doc.dep
 	rm -f $(cmds_txt)
 
 %.html : %.txt
 	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
+	sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+
+	mv $@+ $@
 
 %.1 %.7 : %.xml
 	xmlto -m callouts.xsl man $<
 
 %.xml : %.txt
 	$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
+	sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+
+	mv $@+ $@
 
 user-manual.xml: user-manual.txt user-manual.conf
 	$(ASCIIDOC) -b docbook -d book $<
@@ -136,3 +145,5 @@ install-webdoc : html
 
 quick-install:
 	sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
+
+.PHONY: .FORCE-GIT-VERSION-FILE
-- 
1.5.0.3
Previous: Junio C HamanoNext: Frank Lichtenheld
Message 7 of 11 in “Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf”
  1. 1/2 Documentation: Allow @@GIT_VERSION@@ in asciidoc.confFrank Lichtenheld, Mar 23, 2007
  2. 2/2 Documentation: Add version information to man pagesFrank Lichtenheld, Mar 23, 2007
  3. Junio C HamanoMar 23, 2007
  4. Frank LichtenheldMar 24, 2007
  5. Brian GernhardtMar 24, 2007
  6. Junio C HamanoMar 24, 2007
  7. 1/2 Documentation: Replace @@GIT_VERSION@@ in documentationFrank Lichtenheld, Mar 25, 2007
  8. 2/2 Documentation: Add version information to man pagesFrank Lichtenheld, Mar 25, 2007
  9. Junio C HamanoMar 27, 2007
  10. Junio C HamanoMar 26, 2007
  11. Junio C HamanoMar 26, 2007

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.