diff options
author | W. Trevor King <wking@tremily.us> | 2013-02-09 15:40:31 -0500 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2013-03-08 18:39:11 -0800 |
commit | f09a0254fa7609800d76b127feba44fdd8073323 (patch) | |
tree | e350ad576c9637ea20d4f11c41c10ccb91c0a248 /Makefile | |
parent | doc/HOWTO: First pass at a gentle Catalyst introduction (diff) | |
download | catalyst-f09a0254fa7609800d76b127feba44fdd8073323.tar.gz catalyst-f09a0254fa7609800d76b127feba44fdd8073323.tar.bz2 catalyst-f09a0254fa7609800d76b127feba44fdd8073323.zip |
Makefile: Add DOCS for building files/HOWTO.html
The rules are more general though; any new *.txt file in doc/ that
doesn't match *.?.txt or one of the explicitly-listed *.generated.txt
files will be automatically built and distributed.
The generated `files/docbook-xsl.css` is a side effect of the xhtml
target.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -5,15 +5,18 @@ PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$ MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt) MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES)) MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt -EXTRA_DIST = $(MAN_PAGES) -GENERATED_FILES = $(MAN_PAGES) $(MAN_PAGE_INCLUDES) +DOC_SOURCES = $(filter-out $(MAN_PAGE_SOURCES) $(MAN_PAGE_INCLUDES),$(wildcard doc/*.txt)) +DOCS = $(patsubst doc/%.txt,files/%.html,$(DOC_SOURCES)) +DOC_SIDE_EFFECTS = files/docbook-xsl.css +EXTRA_DIST = $(MAN_PAGES) $(DOCS) $(DOC_SIDE_EFFECTS) +GENERATED_FILES = $(MAN_PAGES) $(MAN_PAGE_INCLUDES) $(DOCS) $(DOC_SIDE_EFFECTS) distdir = catalyst-$(PACKAGE_VERSION) all: $(EXTRA_DIST) -files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst +$(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ --format=manpage -D files "$<" @@ -27,6 +30,12 @@ doc/subarches.generated.txt: $(wildcard arch/*.py) doc/make_subarch_table_guidex doc/targets.generated.txt: doc/make_target_table.py $(wildcard modules/*_target.py) "./$<" > "$@" +$(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile + a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ + --format=xhtml -D files "$<" + +$(DOC_SIDE_EFFECTS): $(firstword $(DOCS)) + clean: rm -f $(GENERATED_FILES) find -name '*.pyo' -delete |