From bca311e4dcc10bf83e4c9a7932c10de19a131251 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 25 May 2016 07:35:25 +0200 Subject: [PATCH] correctly remove temporary xml files --- Makefile | 4 ++-- pve-doc-generator.mk | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 206a29e..93af3ea 100644 --- a/Makefile +++ b/Makefile @@ -268,6 +268,6 @@ update: clean rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc make all -clean: - rm -rf *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked +clean: + rm -rf *.tmp.xml *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked find . -name '*~' -exec rm {} ';' diff --git a/pve-doc-generator.mk b/pve-doc-generator.mk index c75210a..37c8bbb 100644 --- a/pve-doc-generator.mk +++ b/pve-doc-generator.mk @@ -174,18 +174,21 @@ endif A2MAN_COMMON=asciidoc -dmanpage -bdocbook -a docinfo1 define A2MAN1 -${A2MAN_COMMON} -a "manvolnum=1" $1.adoc -xmlto -v man $1.xml +${A2MAN_COMMON} -a "manvolnum=1" -o $1.tmp.xml $1.adoc +xmlto -v man $1.tmp.xml +@rm -f $1.tmp.xml endef define A2MAN5 -${A2MAN_COMMON} -a "manvolnum=5" $1.adoc -xmlto -v man $1.xml +${A2MAN_COMMON} -a "manvolnum=5" -o $1.tmp.xml $1.adoc +xmlto -v man $1.tmp.xml +@rm -f $1.tmp.xml endef define A2MAN8 -${A2MAN_COMMON} -a "manvolnum=8" $1.adoc -xmlto -v man $1.xml +${A2MAN_COMMON} -a "manvolnum=8" -o $1.tmp.xml $1.adoc +xmlto -v man $1.tmp.xml +@rm -f $1.tmp.xml endef pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES} @@ -276,4 +279,4 @@ datacenter.cfg.5: ${DATACENTER_CONF_MAN5_SOURCES} .PHONY: cleanup-docgen cleanup-docgen: - rm -f *.1 *.5 *.8 *.adoc attributes.txt docinfo.xml + rm -f *.tmp.xml *.1 *.5 *.8 *.adoc attributes.txt docinfo.xml -- 2.39.2