X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2FMakefile;h=c28362ea980b3f916697486382ebe29879136f6b;hp=7280fb00c143ef114bba8c6c45427bd443d588e4;hb=269dc2f6c836027e0be757cfcea7922292620390;hpb=97c1993b79101d519c13b2c905191fb61583872c diff --git a/doc/Makefile b/doc/Makefile index 7280fb0..c28362e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,44 +1,68 @@ -DOCNAME = yacasl2 -SRC = $(DOCNAME).texi -CSS = style.css +DOCS := install manual -PTEX = ptex -TEXI2DVI = texi2dvi -DVI2PDF = dvipdfmx -MAKEINFO = makeinfo -MV = mv +CSS := style.css -.PHONY: all htmlnosplit pdf clean +CP := cp +DVIPDFMX := dvipdfmx +GZIP := gzip +INSTALL := install +INSTALL-INFO := install-info +MKDIR := mkdir +RMR := rm -rf +TEX := ptex +TEXI2DVI := TEX=ptex texi2dvi +TEX2DVI_FLAGS = -q --texinfo=@afourpaper -.INTERMEDIATE: $(DOCNAME).dvi +prefix ?= ~ +infodir ?= $(prefix)/share/info -doc: info htmlnosplit html pdf +.PHONY: base all info html htmls pdf install-info uninstall-info clean textmp-clean -htmlnosplit: $(DOCNAME).html - $(MV) $< index.html +.INTERMEDIATE: *.dvi -html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; - @cp $(CSS) $@/$(CSS) - @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) +base: install.txt info html -pdf: $(DOCNAME).pdf +all: base htmls pdf -info: $(DOCNAME).info +info: yacasl2.info -$(DOCNAME).info: $(SRC) - @$(MAKEINFO) -o $@ $^ +html: $(addsuffix .html,$(DOCS)) -$(DOCNAME).html: $(SRC) $(CSS) - @$(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $(SRC) +htmls: $(addsuffix _html,$(DOCS)) -$(DOCNAME).pdf: $(DOCNAME).dvi - @$(DVI2PDF) $^ +pdf: $(addsuffix .pdf,$(DOCS)) -$(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 +yacasl2.info: manual.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< -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 +$(addsuffix .html,$(DOCS)) $(addsuffix _html,$(DOCS)): $(CSS) + +%.html: %.texi + $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $< + +%_html: %.texi + if test ! -e $@; then $(MKDIR) $@; fi + $(CP) $(CSS) $@/ + $(MAKEINFO) -o $@ --html --css-ref=$(CSS) $< + +%.pdf: %.dvi + $(DVIPDFMX) $< + +%.txt: %.texi + $(MAKEINFO) --no-headers --disable-encoding -o $@ $< + +install-info: yacasl2.info + $(INSTALL) -d $(infodir) + $(INSTALL) $< $(infodir)/ + $(INSTALL-INFO) $(infodir)/$< $(infodir)/dir + $(GZIP) -f $(infodir)/$< + +uninstall-info: + $(INSTALL-INFO) --delete $(infodir)/yacasl2.info $(infodir)/dir + $(RM) $(infodir)/yacasl2.info + +clean: textmp-clean + @$(RMR) *_html *.info *.html *.pdf *.dvi *.txt + +textmp-clean: + @$(RM) *.aux *.cp *.cps *.fn *.ky *.log *.pg *.pgs *.tmp *.toc *.tp *.vr