X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=a9f54de11c9578aeeff8d76547fc56bce4cc86d0;hb=ae7aaf86959f7de9213bc8f5f0fa5308b932a624;hp=7280fb00c143ef114bba8c6c45427bd443d588e4;hpb=97c1993b79101d519c13b2c905191fb61583872c;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index 7280fb0..a9f54de 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,44 +1,38 @@ -DOCNAME = yacasl2 -SRC = $(DOCNAME).texi -CSS = style.css +RMR := $(RM) -r +SED := sed -PTEX = ptex -TEXI2DVI = texi2dvi -DVI2PDF = dvipdfmx -MAKEINFO = makeinfo -MV = mv +DOCS := install manual +CSS := style.css -.PHONY: all htmlnosplit pdf clean +prefix ?= ~ +infodir ?= $(prefix)/share/info -.INTERMEDIATE: $(DOCNAME).dvi +.PHONY: base all info html htmls pdf distclean clean -doc: info htmlnosplit html pdf +base: install.txt info html -htmlnosplit: $(DOCNAME).html - $(MV) $< index.html +all: base htmls pdf -html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; - @cp $(CSS) $@/$(CSS) - @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) +info: yacasl2.info -pdf: $(DOCNAME).pdf +html: $(addsuffix .html,$(DOCS)) + for f in $^; do $(SED) -i -e 's!dir\.html#Top!\.\./!g' $$f; done -info: $(DOCNAME).info +htmls: $(addsuffix _html,$(DOCS)) + for d in $^; do $(SED) -i -e 's!\.\./dir/index\.html!\.\./\.\./!g' $$d/index.html; done -$(DOCNAME).info: $(SRC) - @$(MAKEINFO) -o $@ $^ +pdf: $(addsuffix .pdf,$(DOCS)) -$(DOCNAME).html: $(SRC) $(CSS) - @$(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) +yacasl2.info: manual.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< -$(DOCNAME).pdf: $(DOCNAME).dvi - @$(DVI2PDF) $^ +# makeで作成されたドキュメントはすべて削除 +distclean: clean texinfo-distclean + $(RM) install.txt *.info *.html *_html *.pdf -$(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 +# make baseで作成されたドキュメントは残す +clean: texinfo-clean -clean: - @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi - @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 +include texinfo.mk + +include install-info.mk