X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=7d575e24805d28f915d766e3d309b0dd2017f645;hb=1906078707b52a1534aba7c18630f9fe7a33b3ae;hp=c4dc520effe08083d007cfbb95a9a0dedce59135;hpb=9a03447739ef5e8dd12d745805516dd5bcc00bea;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index c4dc520..7d575e2 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,47 +1,35 @@ -DOCNAME = yacasl2 -SRC = $(DOCNAME).texi -CSS = style.css +RMR := $(RM) -r -MV = mv -CP = cp -MKDIR = mkdir -RMRF = rm -rf -PTEX = ptex -TEXI2DVI = texi2dvi -DVI2PDF = dvipdfmx -MAKEINFO = makeinfo +DOCS := install manual +CSS := style.css -.PHONY: doc info htmlnosplit html pdf clean clean_docs clean_tex_tmp +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 -info: $(DOCNAME).info +all: base htmls pdf -htmlnosplit: index.html +info: yacasl2.info -index.html: $(SRC) $(CSS) - $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) +html: $(addsuffix .html,$(DOCS)) -html: $(SRC) $(CSS) - if test ! -e $@; then $(MKDIR) $@; fi; - $(CP) $(CSS) $@/$(CSS) - $(MAKEINFO) -o $@ --html --css-ref=$(CSS) $(SRC) +htmls: $(addsuffix _html,$(DOCS)) -pdf: $(DOCNAME).pdf +pdf: $(addsuffix .pdf,$(DOCS)) -$(DOCNAME).pdf: $(DOCNAME).dvi - $(DVI2PDF) $^ +yacasl2.info: manual.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< -$(DOCNAME).dvi: $(SRC) - TEX=$(PTEX) $(TEXI2DVI) -q --texinfo=@afourpaper -o $@ $< - @$(MAKE) clean_tex_tmp +# makeで作成されたドキュメントはすべて削除 +distclean: clean texinfo-distclean + $(RM) install.txt *.info *.html *_html *.pdf -clean: clean_docs clean_tex_tmp +# make baseで作成されたドキュメントは残す +clean: texinfo-clean -clean_docs: - @$(RMRF) html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html +include texinfo.mk -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 +include install-info.mk