@matheusbsbs / matheus-bagliano / commits / 4159c57813
Fork 0

Documentation: robustify asciidoc GIT_VERSION replacement

Instead of using sed on the resulting file, we now have a git_version asciidoc attribute. This means that we don't pipe the output of asciidoc, which means we can detect build failures. Problem reported by Scott Lamb, solution suggested by Jonas Fonseca. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jeff King committed Jun 1, 2007 at 05:10 UTC 4159c5781303bb24d82be69b6a5de92d51d8d4f0
2 files changed +3 -5
Documentation/Makefile
+2 -4
@@ -112,8 +112,7 @@ clean:
112 %.html : %.txt
113 rm -f $@+ $@
114 $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
115 - $(ASCIIDOC_EXTRA) -o - $< | \
116 - sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
115 + $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
116 mv $@+ $@
117
118 %.1 %.5 %.7 : %.xml
@@ -122,8 +121,7 @@ clean:
121 %.xml : %.txt
122 rm -f $@+ $@
123 $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
125 - $(ASCIIDOC_EXTRA) -o - $< | \
126 - sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
124 + $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
125 mv $@+ $@
126
127 user-manual.xml: user-manual.txt user-manual.conf
Documentation/asciidoc.conf
+1 -1
@@ -40,7 +40,7 @@ template::[header-declarations]
40 <refentrytitle>{mantitle}</refentrytitle>
41 <manvolnum>{manvolnum}</manvolnum>
42 <refmiscinfo class="source">Git</refmiscinfo>
43 -<refmiscinfo class="version">@@GIT_VERSION@@</refmiscinfo>
43 +<refmiscinfo class="version">{git_version}</refmiscinfo>
44 <refmiscinfo class="manual">Git Manual</refmiscinfo>
45 </refmeta>
46 <refnamediv>