X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2FMakefile;h=4be074e94cc232b38926b91501b195813ec5cb52;hp=59511eb7e951c6fbf53b21e813a990e8b2d53159;hb=c4f3377b7b6a88cbdab9813584f8891e3397e242;hpb=8fbd22aa630841dcf5457cd7a6b2a2e44f5ab2fe diff --git a/doc/Makefile b/doc/Makefile index 59511eb..4be074e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,41 @@ -.PHPNY: html clean -html: yacasl2.texi - @makeinfo --html --css-ref=style.css $^ +DOCNAME = yacasl2 +SRC = $(DOCNAME).texi +CSS = style.css +TEXBIN = $(dir $(shell which ptex)) +PTEX = $(TEXBIN)/ptex +TEXINDEX = $(TEXBIN)/texindex +DVI2PDF = $(TEXBIN)/dvipdfmx +MAKEINFO = makeinfo + +.PHONY: all htmlnosplit pdf clean + +.INTERMEDIATE: yacasl2.dvi + +all: info htmlnosplit html pdf + +htmlnosplit: $(DOCNAME).html + +html: $(SRC) $(CSS) + @if test ! -s $@; then mkdir $@; fi; + @cp $(CSS) $@/$(CSS) + @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) + +pdf: $(DOCNAME).pdf + +info: $(DOCNAME).info + +$(DOCNAME).info: $(SRC) + @$(MAKEINFO) -o $@ $^ + +$(DOCNAME).html: $(SRC) $(CSS) + @$(MAKEINFO) -o $@ --no-split --no-headers --html --css-include=$(CSS) $(SRC) + +$(DOCNAME).pdf: $(DOCNAME).dvi + @$(DVI2PDF) $^ + +$(DOCNAME).dvi: $(SRC) + @TEX=ptex texi2dvi -q --texinfo=@afourpaper -o $@ $< + @rm -rf $(DOCNAME).aux $(DOCNAME).cp $(DOCNAME).cps $(DOCNAME).fn $(DOCNAME).ky $(DOCNAME).log $(DOCNAME).pg $(DOCNAME).pgs $(DOCNAME).tmp $(DOCNAME).toc $(DOCNAME).tp $(DOCNAME).vr + clean: - @rm -rf yacasl2 + @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi