X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2FMakefile;h=4be074e94cc232b38926b91501b195813ec5cb52;hp=e5b87fd9a809a5ab76958aa75800a7f1d2d085f4;hb=0d225ac1f580c59da7a063ef52da35c0af254dd3;hpb=42426ae7769b50b3828c14cff716973b677bbb3e diff --git a/doc/Makefile b/doc/Makefile index e5b87fd..4be074e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,29 +1,41 @@ DOCNAME = yacasl2 SRC = $(DOCNAME).texi CSS = style.css -TEXBIN = /usr/local/teTeX/bin +TEXBIN = $(dir $(shell which ptex)) PTEX = $(TEXBIN)/ptex TEXINDEX = $(TEXBIN)/texindex DVI2PDF = $(TEXBIN)/dvipdfmx -TEXOBJDIR = texobj +MAKEINFO = makeinfo .PHONY: all htmlnosplit pdf clean + +.INTERMEDIATE: yacasl2.dvi + all: info htmlnosplit html pdf -info: $(DOCNAME).info -$(DOCNAME).info: $(SRC) - @makeinfo -o $@ $^ + htmlnosplit: $(DOCNAME).html -$(DOCNAME).html: $(SRC) $(CSS) - @makeinfo -o $@ --no-split --no-headers --html --css-include=$(CSS) $(SRC) + html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; \ - cp $(CSS) $@/$(CSS); \ - makeinfo -o $@ --html --css-ref=style.css $(SRC) + @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) - @if test ! -s $(TEXOBJDIR); then mkdir $(TEXOBJDIR); fi; \ - TEX=ptex texi2dvi -q --texinfo=@afourpaper $^ + @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 html $(TEXOBJDIR) $(DOCNAME).info $(DOCNAME).?? $(DOCNAME).??? + @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi