X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=c4dc520effe08083d007cfbb95a9a0dedce59135;hb=c382a00ca44f99c57fe50b5b2ec6cafd457b16b5;hp=59511eb7e951c6fbf53b21e813a990e8b2d53159;hpb=4fe8479d27f535a0ff44c9f6ce270249934e980f;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index 59511eb..c4dc520 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,47 @@ -.PHPNY: html clean -html: yacasl2.texi - @makeinfo --html --css-ref=style.css $^ -clean: - @rm -rf yacasl2 +DOCNAME = yacasl2 +SRC = $(DOCNAME).texi +CSS = style.css + +MV = mv +CP = cp +MKDIR = mkdir +RMRF = rm -rf +PTEX = ptex +TEXI2DVI = texi2dvi +DVI2PDF = dvipdfmx +MAKEINFO = makeinfo + +.PHONY: doc info htmlnosplit html pdf clean clean_docs clean_tex_tmp + +.INTERMEDIATE: $(DOCNAME).dvi + +doc: info htmlnosplit html pdf + +info: $(DOCNAME).info + +htmlnosplit: index.html + +index.html: $(SRC) $(CSS) + $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) + +html: $(SRC) $(CSS) + if test ! -e $@; then $(MKDIR) $@; fi; + $(CP) $(CSS) $@/$(CSS) + $(MAKEINFO) -o $@ --html --css-ref=$(CSS) $(SRC) + +pdf: $(DOCNAME).pdf + +$(DOCNAME).pdf: $(DOCNAME).dvi + $(DVI2PDF) $^ + +$(DOCNAME).dvi: $(SRC) + TEX=$(PTEX) $(TEXI2DVI) -q --texinfo=@afourpaper -o $@ $< + @$(MAKE) clean_tex_tmp + +clean: clean_docs clean_tex_tmp + +clean_docs: + @$(RMRF) html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html + +clean_tex_tmp: + @$(RMRF) $(DOCNAME).aux $(DOCNAME).cp $(DOCNAME).cps $(DOCNAME).fn $(DOCNAME).ky $(DOCNAME).log $(DOCNAME).pg $(DOCNAME).pgs $(DOCNAME).tmp $(DOCNAME).toc $(DOCNAME).tp $(DOCNAME).vr