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