X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=e4a6b537ed82b308b26b6782ae69fd5e27428dbc;hb=8cdbc0330310b2c9abb967e308a81249db2bd86d;hp=9eb81c34905abd7b9057c53a99aa6f273a4d01f0;hpb=123e1c84b369e6f1c7b28c72e6902e4742628be4;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index 9eb81c3..e4a6b53 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,63 +1,36 @@ -DOCNAME = yacasl2 -SRC = $(DOCNAME).texi -CSS = style.css -HTMLDIR = html - -MV ?= mv -CP ?= cp -MKDIR ?= mkdir -RMRF ?= rm -rf -PTEX ?= ptex -TEXI2DVI ?= texi2dvi -DVI2PDF ?= dvipdfmx -MAKEINFO ?= gmakeinfo -INSTALL ?= install -INSTALL-INFO ?= ginstall-info +RMR := $(RM) -r + +DOCS := install manual +CSS := style.css prefix ?= ~ infodir ?= $(prefix)/share/info -.PHONY: all info htmlnosplit html pdf install-info clean clean-docs clean-tex-tmp - -.INTERMEDIATE: $(DOCNAME).dvi - -all: info html htmls pdf - -info: $(DOCNAME).info +.PHONY: base all info html htmls pdf distclean clean -html: $(DOCNAME).html - $(MV) $< index.html +base: install.txt info html -htmls: $(SRC) $(CSS) - $(INSTALL) -d $(HTMLDIR) - $(INSTALL) $(CSS) $(HTMLDIR)/ - $(MAKEINFO) -o $(HTMLDIR) --html --css-ref=$(CSS) $(SRC) +all: base htmls pdf -pdf: $(DOCNAME).pdf +info: yacasl2.info -$(DOCNAME).html: $(SRC) $(CSS) - $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) +html: $(addsuffix .html,$(DOCS)) -$(DOCNAME).pdf: $(DOCNAME).dvi - $(DVI2PDF) $^ +htmls: $(addsuffix _html,$(DOCS)) -$(DOCNAME).dvi: $(SRC) - TEX=$(PTEX) $(TEXI2DVI) -q --texinfo=@afourpaper -o $@ $< - @$(MAKE) clean-tex-tmp +pdf: $(addsuffix .pdf,$(DOCS)) -install-info: $(DOCNAME).info - $(INSTALL) -d $(infodir) - $(INSTALL) $(DOCNAME).info $(infodir)/$(DOCNAME) - $(INSTALL-INFO) $(infodir)/$(DOCNAME) $(infodir)/dir +yacasl2.info: manual.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< -uninstall-info: $(DOCNAME).info - $(INSTALL-INFO) --delete $(infodir)/$(DOCNAME) $(infodir)/dir - $(RM) $(infodir)/$(DOCNAME) +# makeで作成されたドキュメントはすべて削除 +distclean: clean texinfo-distclean + $(RM) install.txt *.info *.html *_html *.pdf -clean: clean-docs clean-tex-tmp +# make baseで作成されたドキュメントは残す +clean: texinfo-clean + $(RM) *_html *.pdf -clean-docs: - @$(RMRF) html $(DOCNAME).info $(DOCNAME).pdf index.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