DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
+ARTICLES =
+# with their own formatting rules.
+SP_ARTICLES = tutorial
+
+DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
+DOC_PDF += $(patsubst %,%.pdf,$(ARTICLES) $(SP_ARTICLES))
+
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
all: html man
html: $(DOC_HTML)
+pdf: $(DOC_PDF)
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
-include doc.dep
clean:
- rm -f *.xml *.html *.1 *.7 doc.dep
+ rm -f *.xml *.html *.pdf *.1 *.7 doc.dep
%.html : %.txt
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
%.xml : %.txt
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
+
+%.pdf: %.xml
+ xmlto pdf $<
+
+# special formatting rules
+tutorial.html : %.html : %.txt
+ $(ASCIIDOC) -b xhtml11 -d article -f tutorial.conf $(ASCIIDOC_EXTRA) $<
+tutorial.xml : %.xml : %.txt
+ $(ASCIIDOC) -b docbook -d article -f tutorial.conf $<
$(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
doc:
- cd doc && $(MAKE) all
+ cd Documentation && $(MAKE) all
test:
cd t && $(MAKE) all
clean:
- for dir in doc t; do \
+ for dir in Documentation t; do \
(cd $$dir && $(MAKE) clean); \
done
rm -rf build
rm -f stgit/*.pyc
rm -f stgit/commands/*.pyc
+
+.PHONY: all install doc test clean
+++ /dev/null
-DOCS = tutorial.txt
-DOCS_HTML = $(DOCS:.txt=.html)
-DOCS_PDF = $(DOCS:.txt=.pdf)
-
-all: $(DOCS_HTML) $(DOCS_PDF)
-
-%.html: %.txt
- asciidoc $<
-
-%.xml: %.txt
- asciidoc --backend=docbook $<
-
-%.pdf: %.xml
- xmlto pdf $<
-
-clean:
- rm -f *.xml *.html *.pdf