Skip to content

Commit

Permalink
Documentation: robustify asciidoc GIT_VERSION replacement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and Junio C Hamano committed Jun 2, 2007
1 parent 8e29f90 commit 4159c57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Documentation/Makefile
Expand Up @@ -112,8 +112,7 @@ clean:
%.html : %.txt
rm -f $@+ $@
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -o - $< | \
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
mv $@+ $@

%.1 %.5 %.7 : %.xml
Expand All @@ -122,8 +121,7 @@ clean:
%.xml : %.txt
rm -f $@+ $@
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -o - $< | \
sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
mv $@+ $@

user-manual.xml: user-manual.txt user-manual.conf
Expand Down
2 changes: 1 addition & 1 deletion Documentation/asciidoc.conf
Expand Up @@ -40,7 +40,7 @@ template::[header-declarations]
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
<refmiscinfo class="source">Git</refmiscinfo>
<refmiscinfo class="version">@@GIT_VERSION@@</refmiscinfo>
<refmiscinfo class="version">{git_version}</refmiscinfo>
<refmiscinfo class="manual">Git Manual</refmiscinfo>
</refmeta>
<refnamediv>
Expand Down

0 comments on commit 4159c57

Please sign in to comment.