]> git.proxmox.com Git - pve-docs.git/blobdiff - Makefile
remove nwdiag related things
[pve-docs.git] / Makefile
index 3b0f1ed059c189743342788ff658ab5f7cc087ff..781acb28b30e28ac921821d8d036ea7cec4c5ef1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,9 @@ DOC_PACKAGE=pve-docs
 MEDIAWIKI_PACKAGE=pve-docs-mediawiki
 
 # also update debian/changelog
-PKGREL=7
+PKGREL=8
 
-GITVERSION:=$(shell cat .git/refs/heads/master)
+GITVERSION:=$(shell git rev-parse HEAD)
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
@@ -17,6 +17,8 @@ DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 DOC_BUILDDEPS := asciidoc-dblatex, source-highlight, librsvg2-bin
 
+export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
+SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}")
 
 all: index.html
 
@@ -50,12 +52,14 @@ GEN_SCRIPTS=                                        \
        gen-pct-network-opts.pl                 \
        gen-pct-mountpoint-opts.pl              \
        gen-qm.conf.5-opts.pl                   \
+       gen-qm-cloud-init-opts.pl               \
        gen-vzdump.conf.5-opts.pl               \
        gen-pve-firewall-cluster-opts.pl        \
        gen-pve-firewall-host-opts.pl           \
        gen-pve-firewall-macros-adoc.pl         \
        gen-pve-firewall-rules-opts.pl          \
-       gen-pve-firewall-vm-opts.pl
+       gen-pve-firewall-vm-opts.pl             \
+       gen-output-format-opts.pl
 
 API_VIEWER_SOURCES=                            \
        api-viewer/index.html                   \
@@ -81,14 +85,10 @@ INDEX_INCLUDES=                                                             \
        man8-index-table.adoc                                           \
        $(sort $(addsuffix .html, ${MANUAL_PAGES}) ${CHAPTER_LIST})
 
-ADOC_STDARG=-b $(shell pwd)/asciidoc/pve-html -f asciidoc/asciidoc-pve.conf -a icons -a data-uri -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}"
+ADOC_STDARG=-b $(shell pwd)/asciidoc/pve-html -f asciidoc/asciidoc-pve.conf -a icons -a data-uri -a "date=${SOURCE_DATE_HUMAN}" -a "revnumber=${DOCRELEASE}" -a footer-style=revdate
 
 BROWSER?=xdg-open
 
-
-%-nwdiag.svg: %.nwdiag
-       nwdiag -T svg $*.nwdiag -o $@;
-
 README.html: README.adoc
        asciidoc -a toc ${ADOC_STDARG} -o $@ $<
 
@@ -198,6 +198,8 @@ $(DOC_DEB): index.html $(WIKI_IMPORTS) $(API_VIEWER_SOURCES) verify-images
        install -dm755 build-$(DOC_PACKAGE)/usr/share/doc/${DOC_PACKAGE}
        install -m 0644 index.html ${INDEX_INCLUDES} build-$(DOC_PACKAGE)/usr/share/${DOC_PACKAGE}
        install -m 0644 ${WIKI_IMPORTS} build-$(DOC_PACKAGE)/usr/share/${DOC_PACKAGE}
+       # install images
+       make -C images DESTDIR=../build-$(DOC_PACKAGE) install
        # install screenshot images
        install -dm755 build-$(DOC_PACKAGE)/usr/share/${DOC_PACKAGE}/images/screenshot
        install -m 0644 images/screenshot/*.png build-$(DOC_PACKAGE)/usr/share/${DOC_PACKAGE}/images/screenshot
@@ -220,16 +222,26 @@ upload: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
        tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
 
 .PHONY: update
-update: clean
+update:
+       make clean clean-static
+       make update-static
+       make all
+
+.PHONY: update-static
+update-static:
+       make clean-static
+       make $(filter %-synopsis.adoc %-opts.adoc, ${PVE_ADMIN_GUIDE_ADOCDEPENDS}) pve-firewall-macros.adoc api-viewer/apidata.js
+
+.PHONY: clean-static
+clean-static:
        find . -regex '.*-\(opts\|synopsis\)\.adoc' -not -name pmxcfs.8-synopsis.adoc -exec rm -f \{\} \;
        rm -f api-viewer/apidata.js
        rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
-       make all
 
-clean: 
+clean:
        rm -rf *.html *.pdf *.epub *.tmp *.1 *.5 *.8
        rm -f *.deb *.changes *.buildinfo
-       rm -f 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 
-       rm -rf .pve-doc-depends 
+       rm -f 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
+       rm -rf .pve-doc-depends
        rm -f pve-doc-generator.mk chapter-index-table.adoc man1-index-table.adoc man5-index-table.adoc man8-index-table.adoc pve-admin-guide-docinfo.xml
        rm -rf build-*