Fix #+sb-safepoint on non-Windows.
[sbcl.git] / doc / manual / Makefile
blob98c2dce2b6c2811cc320733f0614d150a6fcd254
1 SBCLTEXI:=sbcl.texinfo
2 ASDFTEXI:=asdf.texinfo
3 DOCFILES:=*.texinfo $(ASDFTEXI)
4 TMPTYPES:=aux cp cps fn fns ky log pg toc tp tps vr vrs
5 TMPFILES:=$(foreach target,asdf sbcl,$(foreach type,$(TMPTYPES),$(target).$(type)))
6 PSFILES=sbcl.ps asdf.ps
7 PDFFILES=sbcl.pdf asdf.pdf
8 INFOFILES=sbcl.info asdf.info
9 HTMLDIRS=$(basename $(SBCLTEXI)) $(basename $(ASDFTEXI))
10 HTMLFILES=sbcl.html asdf.html
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 CONTRIB_SRC_DIR="../../contrib/"
16 I_FLAGS=-I $(DOCSTRINGDIR) -I $(CONTRIB_SRC_DIR)
18 # SBCL_SYSTEM is an optional argument to this make program. If this
19 # variable is set, its contents are used as the command line for
20 # invoking SBCL.
22 # When passing a non-standard SBCL_SYSTEM, be sure to set the
23 # environment variable SBCL_HOME to a useful value, as well.
25 ifeq ($(MAKEINFO),)
26 MAKEINFO:=makeinfo
27 endif
29 ifeq ($(TEXI2PDF),)
30 TEXI2PDF:=texi2dvi -p
31 endif
33 ifeq ($(DVIPS),)
34 DVIPS:=dvips
35 endif
37 .PHONY: all
38 all: $(ASDFTEXI) ps pdf info html
40 .PHONY: dist
41 dist: html pdf
43 asdf.texinfo:
44 rm -f asdf.texinfo
45 ln -s ../../contrib/asdf/asdf.texinfo
47 version.texinfo:
48 rm -f version.texinfo
49 ln -s ../../contrib/asdf/version.texinfo
51 # html documentation; output in $(HTMLDIRS)
52 .PHONY: html
53 html: html-stamp
55 html-stamp: $(DOCFILES) docstrings
56 @rm -rf $(HTMLDIRS)
57 @rm -f $(HTMLFILES)
58 # $(MAKEINFO) $(I_FLAGS) --html --css-include=style-multi.css $(SBCLTEXI)
59 # $(MAKEINFO) --html --css-include=style-multi.css $(ASDFTEXI)
60 $(MAKEINFO) $(I_FLAGS) --html --no-split --css-include=style-common.css --css-include=style-single.css $(SBCLTEXI)
61 $(MAKEINFO) --html --no-split --css-include=style-common.css --css-include=style-single.css $(ASDFTEXI)
62 touch html-stamp
64 # Postscript documentation
65 .PHONY: ps
66 ps: $(PSFILES)
68 %.ps: %.dvi
69 dvips -q -o $@ $<
71 # DVI generation
72 %.dvi: %.texinfo $(DOCFILES) docstrings
73 texi2dvi -q $(I_FLAGS) $<
75 # PDF documentation
76 .PHONY: pdf
77 pdf: $(PDFFILES)
79 %.pdf: %.texinfo $(DOCFILES) docstrings
80 $(TEXI2PDF) -q $(I_FLAGS) $<
82 # info docfiles
83 .PHONY: info
84 info: $(INFOFILES)
86 %.info: %.texinfo $(DOCFILES) docstrings
87 $(MAKEINFO) $(I_FLAGS) $<
89 # Texinfo docstring snippets
90 docstrings variables.texinfo: tempfiles-stamp
91 sh make-tempfiles.sh "$(SBCL_SYSTEM)" "$(DOCSTRINGDIR)" && touch $(DOCSTRINGDIR)
93 tempfiles-stamp:
94 touch tempfiles-stamp
96 .PHONY: clean
97 clean:
98 rm -f *~ *.bak *.orig \#*\# .\#* texput.log *.fasl
99 rm -rf $(HTMLDIRS) $(DOCSTRINGDIR)
100 rm -f $(HTMLFILES)
101 rm -f contrib-docs.texi-temp
102 rm -f package-locks.texi-temp
103 rm -f variables.texinfo
104 rm -f $(PSFILES) $(PDFFILES) html-stamp tempfiles-stamp
105 rm -f $(TMPFILES) $(INDEXFILES)
106 rm -f sbcl.info sbcl.info-* asdf.info
108 .PHONY: distclean
109 distclean: clean