0.8.9.32:
[sbcl.git] / doc / manual / Makefile
1
2 DOCFILES:=$(shell echo *.texinfo)
3 ROOTFILE:=sbcl.texinfo
4 TMPFILES:=sbcl.aux sbcl.cp sbcl.fn sbcl.ky sbcl.log sbcl.pg sbcl.toc sbcl.tp sbcl.vr
5
6 PSFILE=sbcl.ps
7 PDFFILE=sbcl.pdf
8 DVIFILE=sbcl.dvi
9 INFOFILE=sbcl.info
10 HTMLDIR=$(basename $(ROOTFILE))
11 # Place where generated documentation ends up. The value of
12 # DOCSTRINGDIR has to end with a slash or you lose (it's passed to
13 # Lisp's `pathname' function).
14 DOCSTRINGDIR="docstrings/"
15 # List of package names that documentation will be created for.
16 PACKAGES=":COMMON-LISP :SB-ALIEN :SB-DEBUG :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD"
17
18
19 ifeq ($(MAKEINFO),)
20   MAKEINFO:=makeinfo
21 endif
22
23 ifeq ($(TEXI2PDF),)
24   TEXI2PDF:=texi2pdf
25 endif
26
27 ifeq ($(DVIPS),)
28   DVIPS:=dvips
29 endif
30
31 .PHONY: all
32 all: ps pdf info html
33
34 .PHONY: dist
35 dist: html pdf
36
37
38
39 # html documentation; output in $(HTMLDIR)
40 .PHONY: html
41 html: html-stamp
42
43 html-stamp: $(DOCFILES) docstrings
44         @rm -rf $(HTMLDIR)
45         $(MAKEINFO) -I $(DOCSTRINGDIR) --html $(ROOTFILE)
46         touch html-stamp
47
48 # Postscript documentation
49 .PHONY: ps
50 ps: $(PSFILE)
51
52 $(PSFILE): $(DVIFILE)
53         dvips -o $@ $<
54
55 $(DVIFILE): $(DOCFILES) docstrings
56         texi2dvi -I $(DOCSTRINGDIR) $(ROOTFILE)
57
58 # PDF documentation
59 .PHONY: pdf
60 pdf: $(PDFFILE)
61
62 $(PDFFILE): $(DOCFILES) docstrings
63         texi2pdf -I $(DOCSTRINGDIR) $(ROOTFILE)
64
65 # info docfiles
66 .PHONY: info
67 info: $(INFOFILE)
68
69 $(INFOFILE): $(DOCFILES) docstrings
70         $(MAKEINFO) -I $(DOCSTRINGDIR) $(ROOTFILE)
71
72 # Texinfo docstring snippets; output hardcoded in docstrings/ for now.
73 .PHONY: docstrings
74 docstrings: docstrings-stamp
75
76 docstrings-stamp:
77         DOCSTRINGDIR=$(DOCSTRINGDIR) sh docstrings.sh
78         touch docstrings-stamp
79
80
81
82 .PHONY: clean
83 clean: 
84         rm -f *~ *.bak *.orig \#*\# .\#* texput.log *.fasl
85         rm -rf $(HTMLDIR) $(DOCSTRINGDIR)
86         rm -f $(PSFILE) $(PDFFILE) $(DVIFILE) html-stamp docstrings-stamp
87         rm -f $(TMPFILES)
88         rm -f sbcl.info sbcl.info-*
89
90 .PHONY: distclean
91 distclean: clean