]> git.proxmox.com Git - pve-docs.git/commitdiff
buildsys: allow re-building synopsis & opts files standalone
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Oct 2017 08:12:46 +0000 (10:12 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 18 Oct 2017 13:07:54 +0000 (15:07 +0200)
Add two new make targets 'update-static', 'clean-static' which split
out functionality from the 'update' target.
As the latter uses the long duration `make all` anybody which just
wants to see the current synopsis (e.g., when improving a chapter)
spends a lot time waiting here.

The new target clean or update (generate) specifically just the
synopsis, opts, apidata and firewall macro files from the current
installed package versions, allowing faster build times when one does
frequent edit-build cycles.

Makefile

index f27f3ec2eea7c6611ab470e68d9e495f7937083f..61d8fbcb23f5d17e87b64a882a0072b2e14f8272 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -220,16 +220,22 @@ 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: clean clean-static | update-static
+       make all
+
+.PHONY: update-static
+update-static: clean-static | $(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-*