forked from altcloud/mkimage-profiles
added docs-publish toplevel goal
This one is long overdue as I keep forgetting to update the published copy of generated documentation all the time. Note that you must pass DOCS_PUBLISH (as a local directory or host:dir suitable for rsync/ssh) via make arguments, environment or ~/.mkimage/profiles.mk file.
This commit is contained in:
parent
a2d79414b5
commit
e0004a2621
3
Makefile
3
Makefile
@ -68,3 +68,6 @@ SHELL = /bin/bash
|
||||
|
||||
docs:
|
||||
@$(MAKE) -C doc
|
||||
|
||||
docs-publish:
|
||||
@$(MAKE) -C doc publish
|
||||
|
15
doc/Makefile
15
doc/Makefile
@ -8,6 +8,9 @@ ifdef DEBUG
|
||||
VERBOSE = --verbose
|
||||
endif
|
||||
|
||||
# avoid common DEBUG for the time being
|
||||
-include $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
PROJECT = mkimage-profiles
|
||||
TOPLEVEL_DOC = $(PROJECT).asciidoc
|
||||
RESOURCE_FILES = /etc/asciidoc
|
||||
@ -24,10 +27,19 @@ COMMON_ARGS = -d book -a lang="$L" $(DEST) $(VERBOSE) $(TOPLEVEL_DOC)
|
||||
HTML_ARGS = -a data-uri --icons -r $(RESOURCE_FILES) -r . \
|
||||
--xsltproc-opts='$(XSLT_ARGS)' $(COMMON_ARGS)
|
||||
|
||||
# most convenient deliverables
|
||||
DOCS_OUT = $(PROJECT).pdf $(PROJECT).html docbook-xsl.css
|
||||
|
||||
.PHONY: all prep chunked xhtml pdf clean
|
||||
|
||||
all: chunked xhtml pdf
|
||||
|
||||
# NB: destination defined externally
|
||||
publish: all
|
||||
@if [ -n "$(DOCS_PUBLISH)" ]; then \
|
||||
rsync -qa $(DOCS_OUT) "$(DOCS_PUBLISH)"; \
|
||||
fi
|
||||
|
||||
prep:
|
||||
@if [ -n "$(BUILDDIR)" ]; then mkdir -p "$(BUILDDIR)"; fi
|
||||
|
||||
@ -46,5 +58,4 @@ pdf: prep
|
||||
clean:
|
||||
@echo "** cleaning up"
|
||||
@if [ -d "$(BUILDDIR)" ]; then cd "$(BUILDDIR)"; fi; \
|
||||
rm -f $(PROJECT).pdf $(PROJECT).html docbook-xsl.css; \
|
||||
rm -rf $(PROJECT).chunked/
|
||||
rm -rf $(DOCS_OUT) $(PROJECT).chunked/
|
||||
|
Loading…
Reference in New Issue
Block a user