X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=c4dc520effe08083d007cfbb95a9a0dedce59135;hb=c382a00ca44f99c57fe50b5b2ec6cafd457b16b5;hp=e3569891a5a8077dc74067b66ab9454132ca5fe7;hpb=6d481ded788fac267c4d6a115184936052df7430;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index e356989..c4dc520 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,47 @@ -.PHPNY: html clean -html: yacasl2.texi - @makeinfo --html $^ -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