X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=doc%2FMakefile;h=c28362ea980b3f916697486382ebe29879136f6b;hp=44d63a8081b264b26dab5733009f8cb90601f5ba;hb=269dc2f6c836027e0be757cfcea7922292620390;hpb=79c6567f23680b5c1723726f541b614caa153fe3 diff --git a/doc/Makefile b/doc/Makefile index 44d63a8..c28362e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,41 +1,68 @@ -DOCNAME = yacasl2 -SRC = $(DOCNAME).texi -CSS = style.css -TEXBIN = /usr/local/texlive/2010/bin/x86_64-linux -PTEX = $(TEXBIN)/ptex -TEXINDEX = $(TEXBIN)/texindex -DVI2PDF = $(TEXBIN)/dvipdfmx -MAKEINFO = makeinfo +DOCS := install manual -.PHONY: all htmlnosplit pdf clean +CSS := style.css -.INTERMEDIATE: yacasl2.dvi +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 -htmlnosplit: $(DOCNAME).html +prefix ?= ~ +infodir ?= $(prefix)/share/info -all: info htmlnosplit html pdf +.PHONY: base all info html htmls pdf install-info uninstall-info clean textmp-clean -html: $(SRC) $(CSS) - @if test ! -s $@; then mkdir $@; fi; - @cp $(CSS) $@/$(CSS) - @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC) +.INTERMEDIATE: *.dvi -pdf: $(DOCNAME).pdf +base: install.txt info html -info: $(DOCNAME).info +all: base htmls pdf -$(DOCNAME).info: $(SRC) - @$(MAKEINFO) -o $@ $^ +info: yacasl2.info -$(DOCNAME).html: $(SRC) $(CSS) - @$(MAKEINFO) -o $@ --no-split --no-headers --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 $@ $< - @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 +pdf: $(addsuffix .pdf,$(DOCS)) -clean: - @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi +yacasl2.info: manual.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) $< + +$(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