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 "$<"
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