]> git.proxmox.com Git - pve-docs.git/commitdiff
correctly remove temporary xml files
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 25 May 2016 05:35:25 +0000 (07:35 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 25 May 2016 05:35:25 +0000 (07:35 +0200)
Makefile
pve-doc-generator.mk

index 206a29e432223155cdc9dc40ff8957a1af55d1b9..93af3ea97032e45a6718394e09c290507a02a61d 100644 (file)
--- 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 {} ';'
index c75210aaddbce18a8a8c0840241d84485127359c..37c8bbbf113f4f16bb474710b5fdcdf4de40c93e 100644 (file)
@@ -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