111
|
1 # Makefile for Sphinx Texinfo output
|
|
2
|
|
3 infodir ?= /usr/share/info
|
|
4
|
|
5 MAKEINFO = makeinfo --no-split
|
|
6 MAKEINFO_html = makeinfo --no-split --html
|
|
7 MAKEINFO_plaintext = makeinfo --no-split --plaintext
|
|
8 TEXI2PDF = texi2pdf --batch --expand
|
|
9 INSTALL_INFO = install-info
|
|
10
|
|
11 ALLDOCS = $(basename $(wildcard *.texi))
|
|
12
|
|
13 all: info
|
|
14 info: $(addsuffix .info,$(ALLDOCS))
|
|
15 plaintext: $(addsuffix .txt,$(ALLDOCS))
|
|
16 html: $(addsuffix .html,$(ALLDOCS))
|
|
17 pdf: $(addsuffix .pdf,$(ALLDOCS))
|
|
18
|
|
19 install-info: info
|
|
20 for f in *.info; do \
|
|
21 cp -t $(infodir) "$$f" && \
|
|
22 $(INSTALL_INFO) --info-dir=$(infodir) "$$f" ; \
|
|
23 done
|
|
24
|
|
25 uninstall-info: info
|
|
26 for f in *.info; do \
|
|
27 rm -f "$(infodir)/$$f" ; \
|
|
28 $(INSTALL_INFO) --delete --info-dir=$(infodir) "$$f" ; \
|
|
29 done
|
|
30
|
|
31 %.info: %.texi
|
|
32 $(MAKEINFO) -o '$@' '$<'
|
|
33
|
|
34 %.txt: %.texi
|
|
35 $(MAKEINFO_plaintext) -o '$@' '$<'
|
|
36
|
|
37 %.html: %.texi
|
|
38 $(MAKEINFO_html) -o '$@' '$<'
|
|
39
|
|
40 %.pdf: %.texi
|
|
41 -$(TEXI2PDF) '$<'
|
|
42 -$(TEXI2PDF) '$<'
|
|
43 -$(TEXI2PDF) '$<'
|
|
44
|
|
45 clean:
|
|
46 -rm -f *.info *.pdf *.txt *.html
|
|
47 -rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ky *.pg
|
|
48 -rm -f *.vr *.tp *.fn *.fns *.def *.defs *.cp *.cps *.ge *.ges *.mo
|
|
49
|
|
50 .PHONY: all info plaintext html pdf install-info uninstall-info clean
|