aboutsummaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
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 ad87736b0..a637d8d55 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.
#
@@ -94,17 +99,25 @@ cmd-list.made: 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) *.made
%.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 $<
@@ -135,3 +148,5 @@ install-webdoc : html
quick-install:
sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
+
+.PHONY: .FORCE-GIT-VERSION-FILE