X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile;h=a9f54de11c9578aeeff8d76547fc56bce4cc86d0;hb=ae7aaf86959f7de9213bc8f5f0fa5308b932a624;hp=c28362ea980b3f916697486382ebe29879136f6b;hpb=269dc2f6c836027e0be757cfcea7922292620390;p=YACASL2.git diff --git a/doc/Makefile b/doc/Makefile index c28362e..a9f54de 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,24 +1,13 @@ -DOCS := install manual +RMR := $(RM) -r +SED := sed +DOCS := install manual CSS := style.css -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 - prefix ?= ~ infodir ?= $(prefix)/share/info -.PHONY: base all info html htmls pdf install-info uninstall-info clean textmp-clean - -.INTERMEDIATE: *.dvi +.PHONY: base all info html htmls pdf distclean clean base: install.txt info html @@ -27,42 +16,23 @@ all: base htmls pdf info: yacasl2.info html: $(addsuffix .html,$(DOCS)) + for f in $^; do $(SED) -i -e 's!dir\.html#Top!\.\./!g' $$f; done htmls: $(addsuffix _html,$(DOCS)) + for d in $^; do $(SED) -i -e 's!\.\./dir/index\.html!\.\./\.\./!g' $$d/index.html; done pdf: $(addsuffix .pdf,$(DOCS)) 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)/$< +# makeで作成されたドキュメントはすべて削除 +distclean: clean texinfo-distclean + $(RM) install.txt *.info *.html *_html *.pdf -uninstall-info: - $(INSTALL-INFO) --delete $(infodir)/yacasl2.info $(infodir)/dir - $(RM) $(infodir)/yacasl2.info +# make baseで作成されたドキュメントは残す +clean: texinfo-clean -clean: textmp-clean - @$(RMR) *_html *.info *.html *.pdf *.dvi *.txt +include texinfo.mk -textmp-clean: - @$(RM) *.aux *.cp *.cps *.fn *.ky *.log *.pg *.pgs *.tmp *.toc *.tp *.vr +include install-info.mk