Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:01
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
Ideally if we can persuade asciidoc to output to its stdout, we
could do this:

	rm -f $@+ $@
        $(ASCIIDOC) --to-stdout ... | sed -e $(script) >$@+
        mv $@+ $@
like this perhaps.

---

 Documentation/Makefile |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index de6cc6e..e82596d 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -100,16 +100,20 @@ clean:
 	rm -f $(cmds_txt)
 
 %.html : %.txt
-	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
-	sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+
+	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 $<
-	sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help