]> git.proxmox.com Git - pve-docs.git/blobdiff - Makefile
scan-adoc-refs: avoid spaces in blockid_target
[pve-docs.git] / Makefile
index 2d122d53cc4e46c2cc3e3eab6c5fc3651fc3236f..87926bd82dd0af395f39c7f1f329acdf25f41001 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,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 +54,8 @@ COMMAND_LIST=         \
        pvesm           \
        pveum           \
        vzdump          \
-       ha-manager
+       ha-manager      \
+       pveperf
 
 SERVICE_LIST=          \
        pve-firewall    \
@@ -102,13 +103,14 @@ GEN_SCRIPTS=                                      \
 
 INSTALLATION_SOURCES=                          \
        pve-usbstick.adoc                       \
+       pve-system-requirements.adoc            \
        pve-installation.adoc
 
 SYSADMIN_PARTS=                                        \
-       getting-help                            \
        pve-network                             \
        pve-package-repos                       \
        system-software-updates                 \
+       pve-disk-health-monitoring              \
        local-lvm                               \
        local-zfs
 
@@ -127,6 +129,7 @@ PVE_ADMIN_GUIDE_SOURCES=                    \
        ${SYSADMIN_SOURCES}                     \
        pve-admin-guide.adoc                    \
        pve-intro.adoc                          \
+       getting-help.adoc                       \
        ${INSTALLATION_SOURCES}                 \
        pmxcfs.adoc                             \
        pmxcfs.8-cli.adoc                       \
@@ -149,6 +152,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})     \
@@ -156,8 +160,23 @@ PVE_ADMIN_GUIDE_SOURCES=                   \
        GFDL.adoc                               \
        attributes.txt
 
+link-refs.json: scan-adoc-refs ${PVE_ADMIN_GUIDE_SOURCES}
+       ./scan-adoc-refs ${PVE_ADMIN_GUIDE_SOURCES} >link-refs.json
+
+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
+
+test: asciidoc-pve
+       ./asciidoc-pve compile-wiki-section pve-package-repos.adoc
+       #./asciidoc-pve compile-wiki-chapter ha-manager.adoc
+
 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}))        \
        $(addsuffix .5-plain.html, ${CONFIG_LIST})                              \
@@ -184,11 +203,11 @@ 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
+sysadmin-%-plain.html: asciidoc-pve %.adoc
+       ./asciidoc-pve compile-wiki-section -o $@ $*.adoc
 
-section-%-plain.html: %.adoc
-       asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ $*.adoc
+section-%-plain.html: asciidoc-pve %.adoc
+       ./asciidoc-pve compile-wiki-section -o $@ $*.adoc
 
 chapter-sysadmin.html chapter-sysadmin-plain.html: ${SYSADMIN_SOURCES}
 
@@ -196,10 +215,10 @@ chapter-%.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
        asciidoc ${ADOC_STDARG} -a toc -o $@ $*.adoc
 
 chapter-%-plain.html: %.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc -s -a wiki ${ADOC_STDARG} -o $@ $*.adoc
+       ./asciidoc-pve compile-wiki-chapter -o $@ $*.adoc
 
 pve-storage-%-plain.html: pve-storage-%.adoc ${PVE_COMMON_DOC_SOURCES}
-       asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ pve-storage-$*.adoc
+       ./asciidoc-pve compile-wiki-section -o $@ pve-storage-$*.adoc
 
 %.1.html: %.adoc %.1-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
        asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
@@ -294,5 +313,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
+       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 .asciidoc-pve-tmp_*
        find . -name '*~' -exec rm {} ';'