From c93c582946079a5bd7a5f9e7ee1f9a27fedbd89d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 24 May 2016 11:22:56 +0200 Subject: [PATCH] include footnotes inside manual pages We need to use xmlto --- debian/control | 2 +- doc-debian/control | 2 +- pve-doc-generator.mk | 67 ++++++++++++++++++++++++++++---------------- 3 files changed, 45 insertions(+), 26 deletions(-) diff --git a/debian/control b/debian/control index 6ca1de4..73b7ad2 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,6 @@ Package: pve-doc-generator 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. diff --git a/doc-debian/control b/doc-debian/control index cef7fdc..6cb1c8c 100644 --- a/doc-debian/control +++ b/doc-debian/control @@ -2,7 +2,7 @@ Source: pve-docs Section: doc Priority: extra Maintainer: Proxmox Support Team -Build-Depends: debhelper (>= 7.0.50~), lintian +Build-Depends: debhelper (>= 7.0.50~), lintian, asciidoc, xmlto Standards-Version: 3.8.4 Package: pve-docs diff --git a/pve-doc-generator.mk b/pve-doc-generator.mk index 30762a5..c75210a 100644 --- a/pve-doc-generator.mk +++ b/pve-doc-generator.mk @@ -164,85 +164,104 @@ ifneq (${DGDIR},.) 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} - a2x ${A2X_MAN8_OPTIONS} pve-firewall.adoc + $(call A2MAN8,pve-firewall) 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} - a2x ${A2X_MAN1_OPTIONS} pveceph.adoc + $(call A2MAN1,pveceph) 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} - a2x ${A2X_MAN1_OPTIONS} vzdump.adoc + $(call A2MAN1,vzdump) 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} - a2x ${A2X_MAN1_OPTIONS} qm.adoc + $(call A2MAN1,qm) 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} - a2x ${A2X_MAN1_OPTIONS} pvecm.adoc + $(call A2MAN1,pvecm) 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} - a2x ${A2X_MAN1_OPTIONS} pveam.adoc + $(call A2MAN1,pveam) 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} - 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} - a2x ${A2X_MAN8_OPTIONS} pve-ha-lrm.adoc + $(call A2MAN8,pve-ha-lrm) 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} - a2x ${A2X_MAN8_OPTIONS} pvedaemon.adoc + $(call A2MAN8,pvedaemon) 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} - a2x ${A2X_MAN8_OPTIONS} spiceproxy.adoc + $(call A2MAN8,spiceproxy) 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} @@ -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} - a2x ${A2X_MAN5_OPTIONS} $*.adoc + $(call A2MAN5,$*) test -n "$${NOVIEW}" || man -l $@ .PHONY: cleanup-docgen -- 2.39.2