mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
docs: ensure outputfile is deleted if rst2html/rst2man fail
This avoids leaving a zero length or partially generated output file on errors. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
efeb9d710d
commit
6337311358
@ -262,21 +262,21 @@ man8_MANS = $(manpages8_rst:%.rst=%.8)
|
|||||||
grep -v '^\.\. contents::' < $< | \
|
grep -v '^\.\. contents::' < $< | \
|
||||||
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
||||||
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
||||||
$(RST2MAN) > $@
|
$(RST2MAN) > $@ || { rm $@ && exit 1; }
|
||||||
|
|
||||||
%.7: %.rst
|
%.7: %.rst
|
||||||
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
||||||
grep -v '^\.\. contents::' < $< | \
|
grep -v '^\.\. contents::' < $< | \
|
||||||
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
||||||
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
||||||
$(RST2MAN) > $@
|
$(RST2MAN) > $@ || { rm $@ && exit 1; }
|
||||||
|
|
||||||
%.8: %.rst
|
%.8: %.rst
|
||||||
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
||||||
grep -v '^\.\. contents::' < $< | \
|
grep -v '^\.\. contents::' < $< | \
|
||||||
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
||||||
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
||||||
$(RST2MAN) > $@
|
$(RST2MAN) > $@ || { rm $@ && exit 1; }
|
||||||
|
|
||||||
manpages/virkeycode-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv \
|
manpages/virkeycode-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv \
|
||||||
$(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am
|
$(top_srcdir)/src/keycodemapdb/tools/keymap-gen Makefile.am
|
||||||
@ -415,11 +415,11 @@ manpages/%.html.in: manpages/%.rst
|
|||||||
grep -v '^:Manual ' < $< | \
|
grep -v '^:Manual ' < $< | \
|
||||||
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
sed -e 's|SYSCONFDIR|$(sysconfdir)|g' \
|
||||||
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
-e 's|RUNSTATEDIR|$(runstatedir)|g' | \
|
||||||
$(RST2HTML) > $@
|
$(RST2HTML) > $@ || { rm $@ && exit 1; }
|
||||||
|
|
||||||
%.html.in: %.rst
|
%.html.in: %.rst
|
||||||
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
|
||||||
$(RST2HTML) $< > $@
|
$(RST2HTML) $< > $@ || { rm $@ && exit 1; }
|
||||||
|
|
||||||
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
||||||
$(acl_generated)
|
$(acl_generated)
|
||||||
|
Loading…
Reference in New Issue
Block a user