Makefileの修正
[YACASL2.git] / doc / Makefile
index c3a5422..7e7a0b1 100644 (file)
@@ -1,19 +1,30 @@
-TEXBIN = /usr/local/teTeX/bin
-PTEX = $(TEXBIN)/ptex
-TEXINDEX = $(TEXBIN)/texindex
-DVI2PDF = $(TEXBIN)/dvipdfmx
-TEMPPDF = temp_pdf
-
-.PHPNY: html pdf clean
-html: yacasl2.texi
-       @makeinfo --html --css-ref=style.css $^
-pdf: yacasl2.texi
-       @if test ! -s $(TEMPPDF); then mkdir $(TEMPPDF); fi; \
-     cd $(TEMPPDF); \
-     $(PTEX) ../$^; \
-     $(TEXINDEX) yacasl2.??; \
-     $(DVI2PDF) yacasl2.dvi; \
-     mv yacasl2.pdf ..; \
-     cd -
-clean:
-       @rm -rf yacasl2/index.html $(TEMPPDF)
+DOCS := install manual
+CSS := style.css
+
+prefix ?= ~
+infodir ?= $(prefix)/share/info
+
+.PHONY: base all info html htmls pdf distclean clean
+
+base: install.txt info html
+
+all: base htmls pdf
+
+info: yacasl2.info
+
+html: $(addsuffix .html,$(DOCS))
+
+htmls: $(addsuffix _html,$(DOCS))
+
+pdf: $(addsuffix .pdf,$(DOCS))
+
+yacasl2.info: manual.texi
+       $(MAKEINFO) $(MAKEINFO_FLAGS) $<
+
+distclean: texinfo-distclean
+
+clean: texinfo-clean
+
+include texinfo.mk
+
+include install-info.mk