]> git.proxmox.com Git - pve-docs.git/commitdiff
define DOCRELEASE=4.1 inside pve-doc-generator.mk
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Apr 2016 08:35:58 +0000 (10:35 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 6 Apr 2016 08:48:09 +0000 (10:48 +0200)
renamed RELEASE to DOCRELEASE to avoid conflicts with other PVE
packages (other packages can include this makefile)

Makefile
pve-doc-generator.mk

index 314671200bc18df5135d2a578e9895912154bc72..6bdefd7f72e109e119953474b00c5f94729d4b20 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,13 @@
-RELEASE=4.1
+DGDIR=.
+
+include ./pve-doc-generator.mk
 
 PACKAGE=pve-doc-generator
 
 # also update debian/changelog
 PKGREL=1
 
 
 PACKAGE=pve-doc-generator
 
 # also update debian/changelog
 PKGREL=1
 
-DEB=${PACKAGE}_${RELEASE}-${PKGREL}_amd64.deb
-
-DGDIR=.
-
-include ./pve-doc-generator.mk
+DEB=${PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
 
 
 DEB_SOURCES=                   \
 
 
 DEB_SOURCES=                   \
@@ -78,9 +76,9 @@ PVE_ADMIN_GUIDE_SOURCES=              \
        attributes.txt
 
 ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
        attributes.txt
 
 ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
-ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
-ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
-ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${RELEASE}"
+ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
+ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
+ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
 
 BROWSER?=xdg-open
 
 
 BROWSER?=xdg-open
 
@@ -89,15 +87,11 @@ all: pve-admin-guide.html
 %-nwdiag.svg: %.nwdiag
        nwdiag -T svg $*.nwdiag -o $@;
 
 %-nwdiag.svg: %.nwdiag
        nwdiag -T svg $*.nwdiag -o $@;
 
-%.1-synopsis.adoc:
-       perl -e "use PVE::CLI::$(subst -,_,$*);print PVE::CLI::$(subst -,_,$*)->generate_asciidoc_synopsys();" > $@.tmp
-       mv $@.tmp $@
-
-%.1: %.adoc %.1-synopsis.adoc docinfo.xml
-       a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
+%.1: %.adoc %.1-synopsis.adoc docinfo.xml attributes.txt
+       a2x -a docinfo1 -a "manvolnum=1" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc
        test -n "$${NOVIEW}" || man -l $@
 
        test -n "$${NOVIEW}" || man -l $@
 
-%.1.html: %.adoc %.1-synopsis.adoc docinfo.xml
+%.1.html: %.adoc %.1-synopsis.adoc docinfo.xml attributes.txt
        asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
        asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
@@ -107,7 +101,7 @@ all: pve-admin-guide.html
        mv $@.tmp $@
 
 %.8: %.adoc %.8-synopsis.adoc docinfo.xml
        mv $@.tmp $@
 
 %.8: %.adoc %.8-synopsis.adoc docinfo.xml
-       a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
+       a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc
        test -n "$${NOVIEW}" || man -l $@
 
 %.8.html: %.adoc %.8-synopsis.adoc docinfo.xml
        test -n "$${NOVIEW}" || man -l $@
 
 %.8.html: %.adoc %.8-synopsis.adoc docinfo.xml
@@ -115,7 +109,7 @@ all: pve-admin-guide.html
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
 %.5: %.adoc %.5-opts.adoc docinfo.xml
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
 %.5: %.adoc %.5-opts.adoc docinfo.xml
-       a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${RELEASE}" -f manpage $*.adoc
+       a2x -a docinfo1 -a "manvolnum=5" -a "manversion=Release ${DOCRELEASE}" -f manpage $*.adoc
        test -n "$${NOVIEW}" || man -l $@
 
 %.5.html: %.adoc %.5-opts.adoc docinfo.xml
        test -n "$${NOVIEW}" || man -l $@
 
 %.5.html: %.adoc %.5-opts.adoc docinfo.xml
@@ -125,15 +119,15 @@ all: pve-admin-guide.html
 index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
        $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
        $(MAKE) NOVIEW=1 qm.1.html pct.1.html pveam.1.html pvesm.1.html pveum.1.html vzdump.1.html pve-firewall.8.html ha-manager.1.html datacenter.cfg.5.html vm.conf.5.html pct.conf.5.html
 index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
        $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
        $(MAKE) NOVIEW=1 qm.1.html pct.1.html pveam.1.html pvesm.1.html pveum.1.html vzdump.1.html pve-firewall.8.html ha-manager.1.html datacenter.cfg.5.html vm.conf.5.html pct.conf.5.html
-       asciidoc -a "date=$(shell date)" -a "revnumber=${RELEASE}" index.adoc
+       asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc
        test -n "$${NOVIEW}" || $(BROWSER) index.html &
 
 pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
        test -n "$${NOVIEW}" || $(BROWSER) index.html &
 
 pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
-       asciidoc -a "revnumber=${RELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
+       asciidoc -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
 pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
 pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
-       grep ">Release ${RELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
+       grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
        a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
        a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc
        test -n "$${NOVIEW}" || $(BROWSER) $@ &
 
index be8a62fdfab62502f3f3e0d28aa27579b5897d3e..e8648188800976b54f724d424ed96f5fd9dfb37b 100644 (file)
@@ -1,3 +1,6 @@
+# also update debian/changelog
+DOCRELEASE=4.1
+
 DGDIR?=/usr/share/pve-doc-generator
 
 all:
 DGDIR?=/usr/share/pve-doc-generator
 
 all:
@@ -38,7 +41,7 @@ attributes.txt docinfo.xml:
        mv $@.tmp $@
 
 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
        mv $@.tmp $@
 
 pve-firewall.8: ${PVE_FIREWALL_MAN8_SOURCES}
-       a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${RELEASE}" -f manpage pve-firewall.adoc
+       a2x -a docinfo1 -a "manvolnum=8" -a "manversion=Release ${DOCRELEASE}" -f manpage pve-firewall.adoc
        test -n "$${NOVIEW}" || man -l $@
 
 
        test -n "$${NOVIEW}" || man -l $@