]> git.proxmox.com Git - pve-docs.git/blobdiff - pve-doc-generator.mk
export pct.1 pct.conf.5 vm.conf.5 and datacenter.conf.5
[pve-docs.git] / pve-doc-generator.mk
index e8648188800976b54f724d424ed96f5fd9dfb37b..cdc51a4d10592373d3c14b1493ab4a9fc2185111 100644 (file)
@@ -5,6 +5,11 @@ DGDIR?=/usr/share/pve-doc-generator
 
 all:
 
+PVE_COMMON_DOC_SOURCES=                        \
+       attributes.txt                  \
+       pve-copyright.adoc              \
+       docinfo.xml
+
 PVE_FIREWALL_MAN8_SOURCES=             \
        pve-firewall.adoc               \
        pve-firewall.8-synopsis.adoc    \
@@ -13,19 +18,36 @@ PVE_FIREWALL_MAN8_SOURCES=          \
        pve-firewall-vm-opts.adoc       \
        pve-firewall-rules-opts.adoc    \
        pve-firewall-macros.adoc        \
-       attributes.txt                  \
-       docinfo.xml
+       ${PVE_COMMON_DOC_SOURCES}
+
+PVESM_MAN1_SOURCES=                    \
+       pvesm.adoc                      \
+       pvesm.1-synopsis.adoc           \
+       pve-storage-dir.adoc            \
+       pve-storage-glusterfs.adoc      \
+       pve-storage-iscsi.adoc          \
+       pve-storage-iscsidirect.adoc    \
+       pve-storage-lvm.adoc            \
+       pve-storage-nfs.adoc            \
+       pve-storage-rbd.adoc            \
+       pve-storage-zfspool.adoc        \
+       ${PVE_COMMON_DOC_SOURCES}
+
+PCT_MAN1_SOURCES=                      \
+       pct.adoc                        \
+       pct.1-synopsis.adoc             \
+       ${PVE_COMMON_DOC_SOURCES}
 
 attributes.txt docinfo.xml:
        cp ${DGDIR}/$@ $@.tmp
        mv $@.tmp $@
 
 %-opts.adoc: ${DGDIR}/gen-%-opts.pl
-       $< >$@.tmp
+       ${DGDIR}/gen-$*-opts.pl >$@.tmp
        mv $@.tmp $@
 
 %.adoc: ${DGDIR}/gen-%-adoc.pl
-       $< >$@.tmp
+       ${DGDIR}/gen-$*-adoc.pl >$@.tmp
        mv $@.tmp $@
 
 %.1-synopsis.adoc:
@@ -36,14 +58,35 @@ attributes.txt docinfo.xml:
        perl -I. -e "use PVE::Service::$(subst -,_,$*);print PVE::Service::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
        mv $@.tmp $@
 
+ifneq (${DGDIR},.)
 %.adoc: ${DGDIR}/%.adoc
        cp $< $@.tmp
        mv $@.tmp $@
+endif
 
 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
        a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage pve-firewall.adoc
        test -n "$${NOVIEW}" || man -l $@
 
+pvesm.1: ${PVESM_MAN1_SOURCES}
+       a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pvesm.adoc
+       test -n "$${NOVIEW}" || man -l $@
+
+pct.1: ${PCT_MAN1_SOURCES}
+       a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage pct.adoc
+       test -n "$${NOVIEW}" || man -l $@
+
+pct.conf.5: pct.conf.adoc pct.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
+       a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage pct.conf.adoc
+       test -n "$${NOVIEW}" || man -l $@
+
+vm.conf.5: vm.conf.adoc vm.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
+       a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage vm.conf.adoc
+       test -n "$${NOVIEW}" || man -l $@
+
+datacenter.conf.5: datacenter.conf.adoc datacenter.conf.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
+       a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage datacenter.conf.adoc
+       test -n "$${NOVIEW}" || man -l $@
 
 .PHONY: cleanup-docgen
 cleanup-docgen: