Commit e0004a26 authored by Michael Shigorin's avatar Michael Shigorin

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.
parent a2d79414
...@@ -68,3 +68,6 @@ SHELL = /bin/bash ...@@ -68,3 +68,6 @@ SHELL = /bin/bash
docs: docs:
@$(MAKE) -C doc @$(MAKE) -C doc
docs-publish:
@$(MAKE) -C doc publish
...@@ -8,6 +8,9 @@ ifdef DEBUG ...@@ -8,6 +8,9 @@ ifdef DEBUG
VERBOSE = --verbose VERBOSE = --verbose
endif endif
# avoid common DEBUG for the time being
-include $(HOME)/.mkimage/profiles.mk
PROJECT = mkimage-profiles PROJECT = mkimage-profiles
TOPLEVEL_DOC = $(PROJECT).asciidoc TOPLEVEL_DOC = $(PROJECT).asciidoc
RESOURCE_FILES = /etc/asciidoc RESOURCE_FILES = /etc/asciidoc
...@@ -24,10 +27,19 @@ COMMON_ARGS = -d book -a lang="$L" $(DEST) $(VERBOSE) $(TOPLEVEL_DOC) ...@@ -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 . \ HTML_ARGS = -a data-uri --icons -r $(RESOURCE_FILES) -r . \
--xsltproc-opts='$(XSLT_ARGS)' $(COMMON_ARGS) --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 .PHONY: all prep chunked xhtml pdf clean
all: chunked xhtml pdf all: chunked xhtml pdf
# NB: destination defined externally
publish: all
@if [ -n "$(DOCS_PUBLISH)" ]; then \
rsync -qa $(DOCS_OUT) "$(DOCS_PUBLISH)"; \
fi
prep: prep:
@if [ -n "$(BUILDDIR)" ]; then mkdir -p "$(BUILDDIR)"; fi @if [ -n "$(BUILDDIR)" ]; then mkdir -p "$(BUILDDIR)"; fi
...@@ -46,5 +58,4 @@ pdf: prep ...@@ -46,5 +58,4 @@ pdf: prep
clean: clean:
@echo "** cleaning up" @echo "** cleaning up"
@if [ -d "$(BUILDDIR)" ]; then cd "$(BUILDDIR)"; fi; \ @if [ -d "$(BUILDDIR)" ]; then cd "$(BUILDDIR)"; fi; \
rm -f $(PROJECT).pdf $(PROJECT).html docbook-xsl.css; \ rm -rf $(DOCS_OUT) $(PROJECT).chunked/
rm -rf $(PROJECT).chunked/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment