X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=doc%2FMakefile;h=70870dd645a610d8f304879df011547bb80e9b5f;hb=99d0f62fa02893cadde6f86f632b10bcead90657;hp=d6bfdacd321748b114869936fcdca79ced78464a;hpb=1ba974b83d19fc41bf80acd52726f36f7f1df297;p=tinyos-2.x.git diff --git a/doc/Makefile b/doc/Makefile index d6bfdacd..70870dd6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,26 +1,44 @@ OVERVIEW = txt/overview.txt OVERVIEW_HTML = $(subst txt/,,$(subst .txt,.html,$(OVERVIEW))) +STYLESHEET = stylesheets/doc.css +HTML = $(OVERVIEW_HTML) TEPS = $(wildcard txt/*.txt) TEPS_HTML = $(subst txt/,,$(subst .txt,.html,$(TEPS))) +TEPS_TEX = $(subst txt/,,$(subst .txt,.tex,$(TEPS))) TEP_STYLESHEET = stylesheets/tep.css - -STYLESHEET = stylesheets/doc.css +#override for different docutils installations +ifndef RST2HTML +RST2HTML= rst2html +endif +ifndef RST2LATEX +RST2LATEX= rst2latex +endif -HTML = $(OVERVIEW_HTML) all: overview teps +pdf: $(TEPS_TEX) + + + $(OVERVIEW_HTML): $(OVERVIEW) $(STYLESHEET) - rst2html.py --stylesheet-path=$(STYLESHEET) --embed-stylesheet $< > html/$@ + $(RST2HTML) --stylesheet-path=$(STYLESHEET) --embed-stylesheet $< > html/$@ %.html: txt/%.txt $(TEP_STYLESHEET) - rst2html.py --stylesheet-path=$(TEP_STYLESHEET) --embed-stylesheet $< > html/$@ + $(RST2HTML) --stylesheet-path=$(TEP_STYLESHEET) --embed-stylesheet $< > html/$@ + +%.tex: txt/%.txt + $(RST2LATEX) $< > pdf/$@ + pdflatex -interaction=batchmode -output-directory pdf $@ overview: $(OVERVIEW_HTML) teps: $(TEPS_HTML) clean: - rm -f html/*.html txt/*~ + rm -f html/*.html txt/*~ pdf/*.log pdf/*.out pdf/*.tex pdf/*.aux + +cleanpdf: + rm -f pdf/*.log pdf/*.out pdf/*.tex pdf/*.aux