From: Jeff King Date: Fri, 1 Jun 2007 09:10:30 +0000 (-0400) Subject: Documentation: robustify asciidoc GIT_VERSION replacement X-Git-Tag: v1.5.2.1~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4159c5781303bb24d82be69b6a5de92d51d8d4f0;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/Makefile b/Documentation/Makefile index 3f92783d5..4064b38c4 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -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 @@ -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 diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index fa7dc9484..60e15ba34 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -40,7 +40,7 @@ template::[header-declarations] {mantitle} {manvolnum} Git -@@GIT_VERSION@@ +{git_version} Git Manual