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