projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefileの推敲
[YACASL2.git]
/
doc
/
Makefile
diff --git
a/doc/Makefile
b/doc/Makefile
index
44d63a8
..
a9f54de
100644
(file)
--- a/
doc/Makefile
+++ b/
doc/Makefile
@@
-1,41
+1,38
@@
-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
+RMR := $(RM) -r
+SED := sed
-.PHONY: all htmlnosplit pdf clean
+DOCS := install manual
+CSS := style.css
-.INTERMEDIATE: yacasl2.dvi
+prefix ?= ~
+infodir ?= $(prefix)/share/info
-htmlnosplit: $(DOCNAME).html
+.PHONY: base all info html htmls pdf distclean clean
-all: info htmlnosplit html pdf
+base: install.txt info html
-html: $(SRC) $(CSS)
- @if test ! -s $@; then mkdir $@; fi;
- @cp $(CSS) $@/$(CSS)
- @$(MAKEINFO) -o $@ --html --css-ref=style.css $(SRC)
+all: base htmls pdf
-pdf: $(DOCNAME).pdf
+info: yacasl2.info
-info: $(DOCNAME).info
+html: $(addsuffix .html,$(DOCS))
+ for f in $^; do $(SED) -i -e 's!dir\.html#Top!\.\./!g' $$f; done
-
$(DOCNAME).info: $(SRC
)
- @$(MAKEINFO) -o $@ $^
+
htmls: $(addsuffix _html,$(DOCS)
)
+ for d in $^; do $(SED) -i -e 's!\.\./dir/index\.html!\.\./\.\./!g' $$d/index.html; done
-$(DOCNAME).html: $(SRC) $(CSS)
- @$(MAKEINFO) -o $@ --no-split --no-headers --html --css-include=$(CSS) $(SRC)
+pdf: $(addsuffix .pdf,$(DOCS))
-
$(DOCNAME).pdf: $(DOCNAME).dv
i
- @$(DVI2PDF) $^
+
yacasl2.info: manual.tex
i
+ $(MAKEINFO) $(MAKEINFO_FLAGS) $<
-$(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
+# makeで作成されたドキュメントはすべて削除
+distclean: clean texinfo-distclean
+ $(RM) install.txt *.info *.html *_html *.pdf
-clean:
- @rm -rf html $(DOCNAME).info $(DOCNAME).pdf $(DOCNAME).html $(DOCNAME).dvi
+# make baseで作成されたドキュメントは残す
+clean: texinfo-clean
+
+include texinfo.mk
+
+include install-info.mk