1 |
On Sat, Feb 9, 2013 at 12:40 PM, W. Trevor King <wking@×××××××.us> wrote: |
2 |
> From: "W. Trevor King" <wking@×××××××.us> |
3 |
> |
4 |
> The rules are more general though; any new *.txt file in doc/ that |
5 |
> doesn't match *.?.txt or one of the explicitly-listed *.generated.txt |
6 |
> files will be automatically built and distributed. |
7 |
> |
8 |
> The generated `files/docbook-xsl.css` is a side effect of the xhtml |
9 |
> target. |
10 |
> --- |
11 |
> Makefile | 15 ++++++++++++--- |
12 |
> 1 file changed, 12 insertions(+), 3 deletions(-) |
13 |
> |
14 |
> diff --git a/Makefile b/Makefile |
15 |
> index 016120a..98accbe 100644 |
16 |
> --- a/Makefile |
17 |
> +++ b/Makefile |
18 |
> @@ -5,15 +5,18 @@ PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$ |
19 |
> MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt) |
20 |
> MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES)) |
21 |
> MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt |
22 |
> -EXTRA_DIST = $(MAN_PAGES) |
23 |
> -GENERATED_FILES = $(MAN_PAGES) $(MAN_PAGE_INCLUDES) |
24 |
> +DOC_SOURCES = $(filter-out $(MAN_PAGE_SOURCES) $(MAN_PAGE_INCLUDES),$(wildcard doc/*.txt)) |
25 |
> +DOCS = $(patsubst doc/%.txt,files/%.html,$(DOC_SOURCES)) |
26 |
> +DOC_SIDE_EFFECTS = files/docbook-xsl.css |
27 |
> +EXTRA_DIST = $(MAN_PAGES) $(DOCS) $(DOC_SIDE_EFFECTS) |
28 |
> +GENERATED_FILES = $(MAN_PAGES) $(MAN_PAGE_INCLUDES) $(DOCS) $(DOC_SIDE_EFFECTS) |
29 |
> |
30 |
> distdir = catalyst-$(PACKAGE_VERSION) |
31 |
> |
32 |
> |
33 |
> all: $(EXTRA_DIST) |
34 |
> |
35 |
> -files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst |
36 |
> +$(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst |
37 |
> a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ |
38 |
> --format=manpage -D files "$<" |
39 |
> |
40 |
> @@ -27,6 +30,12 @@ doc/subarches.generated.txt: $(wildcard arch/*.py) doc/make_subarch_table_guidex |
41 |
> doc/targets.generated.txt: doc/make_target_table.py $(wildcard modules/*_target.py) |
42 |
> "./$<" > "$@" |
43 |
> |
44 |
> +$(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile |
45 |
> + a2x --conf-file=doc/asciidoc.conf --attribute="catalystversion=$(PACKAGE_VERSION)" \ |
46 |
> + --format=xhtml -D files "$<" |
47 |
> + |
48 |
> +$(DOC_SIDE_EFFECTS): $(firstword $(DOCS)) |
49 |
> + |
50 |
> clean: |
51 |
> rm -f $(GENERATED_FILES) |
52 |
> find -name '*.pyo' -delete |
53 |
> -- |
54 |
> 1.8.1.336.g94702dd |
55 |
|
56 |
What's the rationale behind generating HTML instead of man pages like |
57 |
the other docs? |