X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=doc%2FMakefile;h=70870dd645a610d8f304879df011547bb80e9b5f;hb=7bae398b43f69d024cf524349705fee97ab002ae;hp=4aa308c25958d706e3d4d64c4fb83cd95c727544;hpb=9967ddb9074fb2f7fe532edae58af2c026a9f2bc;p=tinyos-2.x.git diff --git a/doc/Makefile b/doc/Makefile index 4aa308c2..70870dd6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,30 +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 #override for different docutils installations ifndef RST2HTML -RST2HTML= rst2html.py +RST2HTML= rst2html +endif +ifndef RST2LATEX +RST2LATEX= rst2latex endif -STYLESHEET = stylesheets/doc.css - -HTML = $(OVERVIEW_HTML) all: overview teps +pdf: $(TEPS_TEX) + + + $(OVERVIEW_HTML): $(OVERVIEW) $(STYLESHEET) $(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