git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.de>
To: git@vger.kernel.org
Cc: Frank Lichtenheld <frank@lichtenheld.de>
Subject: [PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation
Date: Sun, 25 Mar 2007 13:56:49 +0200	[thread overview]
Message-ID: <11748238102228-git-send-email-frank@lichtenheld.de> (raw)
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

  reply	other threads:[~2007-03-25 11:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 18:54 [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf Frank Lichtenheld
2007-03-23 18:54 ` [PATCH 2/2] Documentation: Add version information to man pages Frank Lichtenheld
2007-03-23 21:53 ` [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf Junio C Hamano
2007-03-24 12:04   ` Frank Lichtenheld
2007-03-24 14:26     ` Brian Gernhardt
2007-03-24 21:33     ` Junio C Hamano
2007-03-25 11:56       ` Frank Lichtenheld [this message]
2007-03-25 11:56         ` [PATCH 2/2] Documentation: Add version information to man pages Frank Lichtenheld
2007-03-27  6:55           ` Junio C Hamano
2007-03-26  5:33         ` [PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation Junio C Hamano
2007-03-26  5:45           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11748238102228-git-send-email-frank@lichtenheld.de \
    --to=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).