summaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-03-25 11:56:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-28 23:48:50 (GMT)
commit7b8a74f39cbd58b514dce963e7a571904508661b (patch)
tree97a74c2a568661161102383796a65f4daaed1389 /Documentation/Makefile
parent7685227e973fce34340d3766b1775263751afa56 (diff)
downloadgit-7b8a74f39cbd58b514dce963e7a571904508661b.zip
git-7b8a74f39cbd58b514dce963e7a571904508661b.tar.gz
git-7b8a74f39cbd58b514dce963e7a571904508661b.tar.bz2
Documentation: Replace @@GIT_VERSION@@ in documentation
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. [jc: fixing the case for interrupted build] Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 7db3fb9..e82596d 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -65,6 +65,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.
#
@@ -91,17 +96,25 @@ $(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) $<
+ rm -f $@+ $@
+ $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
+ $(ASCIIDOC_EXTRA) -o - $< | \
+ 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 $<
+ rm -f $@+ $@
+ $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
+ $(ASCIIDOC_EXTRA) -o - $< | \
+ sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
+ mv $@+ $@
user-manual.xml: user-manual.txt user-manual.conf
$(ASCIIDOC) -b docbook -d book $<
@@ -132,3 +145,5 @@ install-webdoc : html
quick-install:
sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
+
+.PHONY: .FORCE-GIT-VERSION-FILE