]> git.proxmox.com Git - pve-docs.git/commitdiff
include footnotes inside manual pages
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 24 May 2016 09:22:56 +0000 (11:22 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 24 May 2016 09:56:05 +0000 (11:56 +0200)
We need to use xmlto

debian/control
doc-debian/control
pve-doc-generator.mk

index 6ca1de48e013c3d192f75780446c882e3d92b414..73b7ad277922b16b3476cba9effc4d775d89aff4 100644 (file)
@@ -9,6 +9,6 @@ Package: pve-doc-generator
 Section: perl
 Priority: optional
 Architecture: any
 Section: perl
 Priority: optional
 Architecture: any
-Depends: ${perl:Depends}, libpve-common-perl, asciidoc
+Depends: ${perl:Depends}, libpve-common-perl, asciidoc, xmlto
 Description: Proxmox VE Documentation helpers
  Tool to auto-generate various Proxmox VE Documentation files.
 Description: Proxmox VE Documentation helpers
  Tool to auto-generate various Proxmox VE Documentation files.
index cef7fdcc142b1a98ab9de24f50e11053fbdf695c..6cb1c8c4264a4d242de5c1114995c795ba7f1a33 100644 (file)
@@ -2,7 +2,7 @@ Source: pve-docs
 Section: doc
 Priority: extra
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Section: doc
 Priority: extra
 Maintainer: Proxmox Support Team <support@proxmox.com>
-Build-Depends: debhelper (>= 7.0.50~), lintian
+Build-Depends: debhelper (>= 7.0.50~), lintian, asciidoc, xmlto
 Standards-Version: 3.8.4
 
 Package: pve-docs
 Standards-Version: 3.8.4
 
 Package: pve-docs
index 30762a50bd7ec8f68dda9860d1c642b2e2a37f40..c75210aaddbce18a8a8c0840241d84485127359c 100644 (file)
@@ -164,85 +164,104 @@ ifneq (${DGDIR},.)
        mv $@.tmp $@
 endif
 
        mv $@.tmp $@
 endif
 
-A2X_MAN_COMMON_OPTIONS=-a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
-A2X_MAN1_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=1"
-A2X_MAN5_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=5"
-A2X_MAN8_OPTIONS=${A2X_MAN_COMMON_OPTIONS} -a "manvolnum=8"
+# asciidoc /etc/asciidoc/docbook-xsl/manpage.xsl skip REFERENCES section
+# like footnotes, so we cannot use a2x. We use xmlto instead.
+#A2MAN_COMMON=a2x -v -k -a docinfo1 -a "manversion=Release ${DOCRELEASE}" -f manpage
+#A2MAN1=${A2MAN_COMMON} -a "manvolnum=1"
+#A2MAN5=${A2MAN_COMMON} -a "manvolnum=5"
+#A2MAN8=${A2MAN_COMMON} -a "manvolnum=8"
+
+A2MAN_COMMON=asciidoc -dmanpage -bdocbook -a docinfo1
+
+define A2MAN1
+${A2MAN_COMMON} -a "manvolnum=1" $1.adoc
+xmlto -v man $1.xml
+endef
+
+define A2MAN5
+${A2MAN_COMMON} -a "manvolnum=5" $1.adoc
+xmlto -v man $1.xml
+endef
+
+define A2MAN8
+${A2MAN_COMMON} -a "manvolnum=8" $1.adoc
+xmlto -v man $1.xml
+endef
 
 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
 
 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pve-firewall.adoc
+       $(call A2MAN8,pve-firewall)
        test -n "$${NOVIEW}" || man -l $@
 
 pvesm.1: ${PVESM_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pvesm.1: ${PVESM_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pvesm.adoc
+       $(call A2MAN1,pvesm)
        test -n "$${NOVIEW}" || man -l $@
 
 pveceph.1: ${PVECEPH_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pveceph.1: ${PVECEPH_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pveceph.adoc
+       $(call A2MAN1,pveceph)
        test -n "$${NOVIEW}" || man -l $@
 
 pct.1: ${PCT_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pct.1: ${PCT_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pct.adoc
+       $(call A2MAN1,pct)
        test -n "$${NOVIEW}" || man -l $@
 
 vzdump.1: ${VZDUMP_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 vzdump.1: ${VZDUMP_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} vzdump.adoc
+       $(call A2MAN1,vzdump)
        test -n "$${NOVIEW}" || man -l $@
 
 pvesubscription.1: ${PVESUBSCRIPTION_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pvesubscription.1: ${PVESUBSCRIPTION_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pvesubscription.adoc
+       $(call A2MAN1,pvesubscription)
        test -n "$${NOVIEW}" || man -l $@
 
 qm.1: ${QM_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 qm.1: ${QM_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} qm.adoc
+       $(call A2MAN1,qm)
        test -n "$${NOVIEW}" || man -l $@
 
 qmrestore.1: ${QMRESTORE_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 qmrestore.1: ${QMRESTORE_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} qmrestore.adoc
+       $(call A2MAN1,qmrestore)
        test -n "$${NOVIEW}" || man -l $@
 
 pvecm.1: ${PVECM_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pvecm.1: ${PVECM_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pvecm.adoc
+       $(call A2MAN1,pvecm)
        test -n "$${NOVIEW}" || man -l $@
 
 pveum.1: ${PVEUM_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pveum.1: ${PVEUM_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pveum.adoc
+       $(call A2MAN1,pveum)
        test -n "$${NOVIEW}" || man -l $@
 
 pveam.1: ${PVEAM_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pveam.1: ${PVEAM_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} pveam.adoc
+       $(call A2MAN1,pveam)
        test -n "$${NOVIEW}" || man -l $@
 
 ha-manager.1: ${HA_MANAGER_MAN1_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 ha-manager.1: ${HA_MANAGER_MAN1_SOURCES}
-       a2x ${A2X_MAN1_OPTIONS} ha-manager.adoc
+       $(call A2MAN1,ha-manager)
        test -n "$${NOVIEW}" || man -l $@
 
 pve-ha-crm.8: ${PVE_HA_CRM_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pve-ha-crm.8: ${PVE_HA_CRM_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pve-ha-crm.adoc
+       $(call A2MAN8,pve-ha-crm)
        test -n "$${NOVIEW}" || man -l $@
 
 pve-ha-lrm.8: ${PVE_HA_LRM_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pve-ha-lrm.8: ${PVE_HA_LRM_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pve-ha-lrm.adoc
+       $(call A2MAN8,pve-ha-lrm)
        test -n "$${NOVIEW}" || man -l $@
 
 pvestatd.8: ${PVESTATD_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pvestatd.8: ${PVESTATD_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pvestatd.adoc
+       $(call A2MAN8,pvestatd)
        test -n "$${NOVIEW}" || man -l $@
 
 pvedaemon.8: ${PVEDAEMON_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pvedaemon.8: ${PVEDAEMON_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pvedaemon.adoc
+       $(call A2MAN8,pvedaemon)
        test -n "$${NOVIEW}" || man -l $@
 
 pveproxy.8: ${PVEPROXY_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pveproxy.8: ${PVEPROXY_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pveproxy.adoc
+       $(call A2MAN8,pveproxy)
        test -n "$${NOVIEW}" || man -l $@
 
 spiceproxy.8: ${SPICEPROXY_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 spiceproxy.8: ${SPICEPROXY_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} spiceproxy.adoc
+       $(call A2MAN8,spiceproxy)
        test -n "$${NOVIEW}" || man -l $@
 
 pmxcfs.8: ${PMXCFS_MAN8_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 pmxcfs.8: ${PMXCFS_MAN8_SOURCES}
-       a2x ${A2X_MAN8_OPTIONS} pmxcfs.adoc
+       $(call A2MAN8,pmxcfs)
        test -n "$${NOVIEW}" || man -l $@
 
 qm.conf.5: ${QM_CONF_MAN5_SOURCES}
        test -n "$${NOVIEW}" || man -l $@
 
 qm.conf.5: ${QM_CONF_MAN5_SOURCES}
@@ -252,7 +271,7 @@ pct.conf.5: ${PCT_CONF_MAN5_SOURCES}
 datacenter.cfg.5: ${DATACENTER_CONF_MAN5_SOURCES}
 
 %.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
 datacenter.cfg.5: ${DATACENTER_CONF_MAN5_SOURCES}
 
 %.5: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
-       a2x ${A2X_MAN5_OPTIONS} $*.adoc
+       $(call A2MAN5,$*)
        test -n "$${NOVIEW}" || man -l $@
 
 .PHONY: cleanup-docgen
        test -n "$${NOVIEW}" || man -l $@
 
 .PHONY: cleanup-docgen