X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2FMakefile;h=9eb81c34905abd7b9057c53a99aa6f273a4d01f0;hp=200853981fed2ac7a1e5e206b608fdbe1c4e56ab;hb=123e1c84b369e6f1c7b28c72e6902e4742628be4;hpb=bdbb4708c0434ef7085486c381902f69fbbaf110 diff --git a/doc/Makefile b/doc/Makefile index 2008539..9eb81c3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,42 +1,63 @@ DOCNAME = yacasl2 SRC = $(DOCNAME).texi CSS = style.css +HTMLDIR = html -PTEX = ptex -TEXI2DVI = texi2dvi -DVI2PDF = dvipdfmx -MAKEINFO = makeinfo +MV ?= mv +CP ?= cp +MKDIR ?= mkdir +RMRF ?= rm -rf +PTEX ?= ptex +TEXI2DVI ?= texi2dvi +DVI2PDF ?= dvipdfmx +MAKEINFO ?= gmakeinfo +INSTALL ?= install +INSTALL-INFO ?= ginstall-info -.PHONY: all htmlnosplit pdf clean +prefix ?= ~ +infodir ?= $(prefix)/share/info + +.PHONY: all info htmlnosplit html pdf install-info clean clean-docs clean-tex-tmp .INTERMEDIATE: $(DOCNAME).dvi -doc: info htmlnosplit html pdf +all: info html htmls pdf -htmlnosplit: $(DOCNAME).html +info: $(DOCNAME).info -html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; - @cp $(CSS) $@/$(CSS) - @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) +html: $(DOCNAME).html + $(MV) $< index.html -pdf: $(DOCNAME).pdf - -info: $(DOCNAME).info +htmls: $(SRC) $(CSS) + $(INSTALL) -d $(HTMLDIR) + $(INSTALL) $(CSS) $(HTMLDIR)/ + $(MAKEINFO) -o $(HTMLDIR) --html --css-ref=$(CSS) $(SRC) -$(DOCNAME).info: $(SRC) - @$(MAKEINFO) -o $@ $^ +pdf: $(DOCNAME).pdf $(DOCNAME).html: $(SRC) $(CSS) - @$(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) + $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) $(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 + +install-info: $(DOCNAME).info + $(INSTALL) -d $(infodir) + $(INSTALL) $(DOCNAME).info $(infodir)/$(DOCNAME) + $(INSTALL-INFO) $(infodir)/$(DOCNAME) $(infodir)/dir + +uninstall-info: $(DOCNAME).info + $(INSTALL-INFO) --delete $(infodir)/$(DOCNAME) $(infodir)/dir + $(RM) $(infodir)/$(DOCNAME) + +clean: clean-docs clean-tex-tmp + +clean-docs: + @$(RMRF) html $(DOCNAME).info $(DOCNAME).pdf index.html -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 +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