X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=c4dc520effe08083d007cfbb95a9a0dedce59135;hb=c382a00ca44f99c57fe50b5b2ec6cafd457b16b5;hp=4be074e94cc232b38926b91501b195813ec5cb52;hpb=c4f3377b7b6a88cbdab9813584f8891e3397e242;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index 4be074e..c4dc520 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,41 +1,47 @@ 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 +MV = mv +CP = cp +MKDIR = mkdir +RMRF = rm -rf +PTEX = ptex +TEXI2DVI = texi2dvi +DVI2PDF = dvipdfmx +MAKEINFO = makeinfo -.INTERMEDIATE: yacasl2.dvi +.PHONY: doc info htmlnosplit html pdf clean clean_docs clean_tex_tmp -all: info htmlnosplit html pdf +.INTERMEDIATE: $(DOCNAME).dvi -htmlnosplit: $(DOCNAME).html +doc: info htmlnosplit html pdf -html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; - @cp $(CSS) $@/$(CSS) - @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) +info: $(DOCNAME).info -pdf: $(DOCNAME).pdf +htmlnosplit: index.html -info: $(DOCNAME).info +index.html: $(SRC) $(CSS) + $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) -$(DOCNAME).info: $(SRC) - @$(MAKEINFO) -o $@ $^ +html: $(SRC) $(CSS) + if test ! -e $@; then $(MKDIR) $@; fi; + $(CP) $(CSS) $@/$(CSS) + $(MAKEINFO) -o $@ --html --css-ref=$(CSS) $(SRC) -$(DOCNAME).html: $(SRC) $(CSS) - @$(MAKEINFO) -o $@ --no-split --no-headers --html --css-include=$(CSS) $(SRC) +pdf: $(DOCNAME).pdf $(DOCNAME).pdf: $(DOCNAME).dvi - @$(DVI2PDF) $^ + $(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 + 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: - @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi +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