From 921a2913cc7d7d499b273ce24ce204272ecfa4e9 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Thu, 24 Jan 2013 22:34:12 +0900 Subject: [PATCH] =?utf8?q?doc=E3=81=AEMakefile=E3=82=92=E6=B1=8E=E7=94=A8?= =?utf8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- doc/Makefile | 48 +++++---------------------------------------- doc/install-info.mk | 18 +++++++++++++++++ doc/texinfo.mk | 38 +++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 43 deletions(-) create mode 100644 doc/install-info.mk create mode 100644 doc/texinfo.mk diff --git a/doc/Makefile b/doc/Makefile index c28362e..7e7a0b1 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,24 +1,10 @@ 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 @@ -35,34 +21,10 @@ 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)/$< +distclean: texinfo-distclean -uninstall-info: - $(INSTALL-INFO) --delete $(infodir)/yacasl2.info $(infodir)/dir - $(RM) $(infodir)/yacasl2.info +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 diff --git a/doc/install-info.mk b/doc/install-info.mk new file mode 100644 index 0000000..9193d2a --- /dev/null +++ b/doc/install-info.mk @@ -0,0 +1,18 @@ +prefix ?= ~ +infodir ?= $(prefix)/share/info + +GZIP := gzip +INSTALL := install +INSTALL-INFO := install-info + +.PHONY: install-info uninstall-info + +install-info: yacasl2.info + $(INSTALL) -d $(infodir) + $(INSTALL) $< $(infodir)/ + $(INSTALL-INFO) $(infodir)/$< $(infodir)/dir + $(GZIP) -f $(infodir)/$< + +uninstall-info: + $(INSTALL-INFO) --delete $(addprefix $(infodir)/,$(TARGETS)) $(infodir)/dir + $(RM) $(addprefix $(infodir)/,$(TARGETS)) diff --git a/doc/texinfo.mk b/doc/texinfo.mk new file mode 100644 index 0000000..b0a5f01 --- /dev/null +++ b/doc/texinfo.mk @@ -0,0 +1,38 @@ +.PHONY: texinfo-distclean textmp-clean + +CP ?= cp +DVIPDFMX := dvipdfmx +INSTALL-INFO := install-info +MKDIR := mkdir +RMR := rm -rf +TEX := ptex +TEXI2DVI := TEX=$(TEX) texi2dvi + +DVIPDFMX_FLAGS ?= +MAKEINFO_FLAGS ?= +TEXI2DVI_FLAGS ?= -q --texinfo=@afourpaper + +%.info: %.texi + $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $< + +%.html: %.texi $(CSS) + $(MAKEINFO) -o $@ --no-split --html --css-include=$(CSS) $< + +%_html: %.texi $(CSS) + if test ! -e $@; then $(MKDIR) $@; fi + $(CP) $(CSS) $@/ + $(MAKEINFO) -o $@ --html --css-ref=$(CSS) $< + +%.pdf: %.dvi + $(DVIPDFMX) $(DVIPDFMXFLAGS) $< + +%.txt: %.texi + $(MAKEINFO) --no-headers --disable-encoding -o $@ $< + +texinfo-distclean: textmp-clean + @$(RMR) *_html *.info *.html *.pdf *.dvi *.txt + +texinfo-clean: textmp-clean + +textmp-clean: + @$(RM) *.aux *.cp *.cps *.fn *.ky *.log *.pg *.pgs *.tmp *.toc *.tp *.vr -- 2.18.0