]> git.proxmox.com Git - pve-docs.git/blobdiff - Makefile
pve-doc-generator: install asciidoc-pve binary
[pve-docs.git] / Makefile
index 21dcf29f7967330600e53a5b56fd721b910ef61f..61923a8ebf191a5fcfc1ca2acb057efc51125acf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 DGDIR=.
+ASCIIDOC_PVE=./asciidoc-pve
 
 include ./pve-doc-generator.mk
 
@@ -7,7 +8,7 @@ DOC_PACKAGE=pve-docs
 MEDIAWIKI_PACKAGE=pve-docs-mediawiki
 
 # also update debian/changelog
-PKGREL=3
+PKGREL=5
 
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
@@ -54,7 +55,8 @@ COMMAND_LIST=         \
        pvesm           \
        pveum           \
        vzdump          \
-       ha-manager
+       ha-manager      \
+       pveperf
 
 SERVICE_LIST=          \
        pve-firewall    \
@@ -151,6 +153,7 @@ PVE_ADMIN_GUIDE_SOURCES=                    \
        ${PVEAM_MAN1_SOURCES}                   \
        ${PVESUBSCRIPTION_MAN1_SOURCES}         \
        ${PVECEPH_MAN1_SOURCES}                 \
+       ${PVEPERF_MAN1_SOURCES}                 \
        pve-bibliography.adoc                   \
        $(addsuffix .adoc, ${COMMAND_LIST})     \
        $(addsuffix .adoc, ${SERVICE_LIST})     \
@@ -163,15 +166,21 @@ link-refs.json: scan-adoc-refs ${PVE_ADMIN_GUIDE_SOURCES}
 
 asciidoc-pve: asciidoc-pve.in link-refs.json
        cat asciidoc-pve.in link-refs.json >asciidoc-pve.tmp
+       sed -e s/@RELEASE@/${DOCRELEASE}/ -i asciidoc-pve.tmp
        chmod +x asciidoc-pve.tmp
        mv asciidoc-pve.tmp asciidoc-pve
 
+pve-docs-mediawiki-import: pve-docs-mediawiki-import.in link-refs.json
+       cat pve-docs-mediawiki-import.in link-refs.json >  pve-docs-mediawiki-import.tmp
+       chmod +x pve-docs-mediawiki-import.tmp
+       mv pve-docs-mediawiki-import.tmp pve-docs-mediawiki-import
+
 WIKI_IMPORTS=                                                                  \
-       section-pve-usbstick-plain.html                                         \
-       section-getting-help-plain.html                                         \
-       section-pve-system-requirements-plain.html                              \
-       $(addsuffix -plain.html, $(addprefix sysadmin-, ${SYSADMIN_PARTS}))     \
-       $(addsuffix -plain.html, $(addprefix chapter-, ${CHAPTER_LIST}))        \
+       pve-usbstick-plain.html                                                 \
+       getting-help-plain.html                                                 \
+       pve-system-requirements-plain.html                                      \
+       $(addsuffix -plain.html, ${SYSADMIN_PARTS})                             \
+       $(addsuffix -plain.html, ${CHAPTER_LIST})                               \
        $(addsuffix .5-plain.html, ${CONFIG_LIST})                              \
        $(addsuffix -plain.html, $(addprefix pve-storage-, ${STORAGE_TYPES}))
 
@@ -196,25 +205,16 @@ all: index.html
 %-nwdiag.svg: %.nwdiag
        nwdiag -T svg $*.nwdiag -o $@;
 
-sysadmin-%-plain.html: %.adoc
-       asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ $*.adoc
-
-section-%-plain.html: %.adoc
-       asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ $*.adoc
-
-chapter-sysadmin.html chapter-sysadmin-plain.html: ${SYSADMIN_SOURCES}
-
-chapter-%.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc ${ADOC_STDARG} -a toc -o $@ $*.adoc
+%-plain.html: asciidoc-pve %.adoc
+       ./asciidoc-pve compile-wiki -o $@ $*.adoc
 
-chapter-%-plain.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc -s -a wiki ${ADOC_STDARG} -o $@ $*.adoc
+chapter-sysadmin.html sysadmin-plain.html: ${SYSADMIN_SOURCES}
 
-pve-storage-%-plain.html: pve-storage-%.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ pve-storage-$*.adoc
+chapter-%.html: %.adoc asciidoc-pve ${PVE_COMMON_DOC_SOURCES}
+       ./asciidoc-pve compile-chapter -o $@ $*.adoc
 
-%.1.html: %.adoc %.1-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
+%.1.html: %.adoc %.1-synopsis.adoc asciidoc-pve ${PVE_COMMON_DOC_SOURCES}
+       ./asciidoc-pve compile-man-html -o $@ $*.adoc
 
 pmxcfs.8.html: pmxcfs.adoc pmxcfs.8-cli.adoc ${PVE_COMMON_DOC_SOURCES}
        asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ pmxcfs.adoc
@@ -270,16 +270,19 @@ deb:
        rm -f ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
        make ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
 
-${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES}
+${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} asciidoc-pve pve-docs-mediawiki-import
        rm -rf build
        mkdir build
        rsync -a debian/ build/debian
+       cp pve-docs-mediawiki-import build/debian/tree/pve-docs-mediawiki/pve-docs-mediawiki-import
        echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
        # install files for pve-doc-generator package
        mkdir -p build/usr/share/${GEN_PACKAGE}
        mkdir -p build/usr/share/doc/${GEN_PACKAGE}
+       mkdir -p build/usr/bin
        install -m 0644 ${GEN_DEB_SOURCES} build/usr/share/${GEN_PACKAGE}
        install -m 0755 ${GEN_SCRIPTS} build/usr/share/${GEN_PACKAGE}
+       install -m 0755 asciidoc-pve build/usr/bin/
        # install files for pvedocs package
        mkdir -p build/usr/share/${DOC_PACKAGE}
        mkdir -p build/usr/share/doc/${DOC_PACKAGE}
@@ -306,5 +309,5 @@ update: clean
        make all
 
 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 asciidoc-pve link-refs.json
+       rm -rf *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html *-plain.html chapter-*.html pve-admin-guide.chunked asciidoc-pve link-refs.json .asciidoc-pve-tmp_* pve-docs-mediawiki-import
        find . -name '*~' -exec rm {} ';'