3 ### Build script for the manual
5 ### (c) 2015 Straylight/Edgeware
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the Sensible Object Design, an object system for C.
12 ### SOD is free software; you can redistribute it and/or modify
13 ### it under the terms of the GNU General Public License as published by
14 ### the Free Software Foundation; either version 2 of the License, or
15 ### (at your option) any later version.
17 ### SOD is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ### GNU General Public License for more details.
22 ### You should have received a copy of the GNU General Public License
23 ### along with SOD; if not, write to the Free Software Foundation,
24 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 include $(top_srcdir)/vars.am
32 CLEANFILES += *.aux *.out *.log *.toc *.ind *.idx *.ilg
33 EXTRA_DIST += $(TEX_FILES) $(BIB_FILES)
35 V_LATEX = $(V_LATEX_@AM_V@)
36 V_LATEX_ = $(V_LATEX_@AM_DEFAULT_V@)
37 V_LATEX_0 = @echo " LATEX $@";
39 V_TEXMODE = $(V_TEXMODE_@AM_V@)
40 V_TEXMODE_ = $(V_TEXMODE_@AM_DEFAULT_V@)
41 V_TEXMODE_0 = batchmode
42 V_TEXMODE_1 = nonstopmode
44 V_BIBTEX = $(V_BIBTEX_@AM_V@)
45 V_BIBTEX_ = $(V_BIBTEX_@AM_DEFAULT_V@)
46 V_BIBTEX_0 = @echo " BIBTEX $@";
48 V_MAKEINDEX = $(V_MAKEINDEX_@AM_V@)
49 V_MAKEINDEX_ = $(V_MAKEINDEX_@AM_DEFAULT_V@)
50 V_MAKEINDEX_0 = @echo " MAKEIDX $@";
52 TEXFLAGS = --interaction=$(V_TEXMODE) \
53 --output-directory=$(abs_builddir)
57 run_pdflatex = $(V_LATEX)cd $(srcdir) && \
58 version=$$(echo '$(VERSION)' | sed 's/~/\\textasciitilde /g') && \
59 $(PDFLATEX) $(TEXFLAGS) \
60 --jobname=$(basename $1) \
61 "\def\pkgversion{$$version}\input{$1}"
63 ###--------------------------------------------------------------------------
69 ## Main document styling and definitions.
73 TEX_FILES += intro.tex
76 TEX_FILES += tutorial.tex
79 TEX_FILES += refintro.tex
80 TEX_FILES += concepts.tex
81 TEX_FILES += cmdline.tex
82 TEX_FILES += syntax.tex
83 TEX_FILES += runtime.tex
84 TEX_FILES += structures.tex
87 TEX_FILES += lispintro.tex
89 TEX_FILES += parsing.tex
90 TEX_FILES += clang.tex
92 TEX_FILES += layout.tex
93 TEX_FILES += module.tex
94 TEX_FILES += output.tex
97 TEX_FILES += cutting-room-floor.tex
99 ## Bibliography database.
102 ## Building the bibliography style.
103 EXTRA_DIST += mdwalpha.dbj
105 ## Spelling dictionary.
106 EXTRA_DIST += sod.words
108 ## Building the output documents.
109 MAINTAINERCLEANFILES += sod.pdf sod.bst babelbst.tex
113 EXTRA_DIST += sod.pdf
114 sod.pdf: $(TEX_FILES) $(BIB_FILES)
115 $(call run_pdflatex,sod.tex)
117 BIBINPUTS=$(srcdir):$$BIBINPUTS \
118 BSTINPUTS=$(srcdir):$$BSTINPUTS \
119 $(BIBTEX) $(BIBTEXFLAGS) sod.aux
120 $(call run_pdflatex,sod.tex)
121 $(V_MAKEINDEX)$(MAKEINDEX) $(MAKEINDEXFLAGS) sod.idx
122 $(call run_pdflatex,sod.tex)
125 BIB_FILES += mdwalpha.bst babelbst.tex
126 babelbst.tex: mdwalpha.bst
127 mdwalpha.bst: mdwalpha.dbj
128 (cd $(srcdir) && $(TEX) \
130 --interaction=$(V_TEXMODE) \
131 --output-directory=$(abs_builddir) \
132 '\let\ifbatching\iftrue \input mdwalpha.dbj')
136 ###--------------------------------------------------------------------------
137 ### Maintenance rules.
140 { IFS= read -r hdr && echo "$$hdr" && \
141 LC_COLLATE=POSIX sort -f; \
142 } <$(srcdir)/sod.words >$(srcdir)/sod.words.new && \
143 mv $(srcdir)/sod.words.new $(srcdir)/sod.words
144 .PHONY: fixup-wordlist
147 $(ASDF_ENV) $(RUNLISP) -L$(WORKING_LISPS) $(srcdir)/list-exports \
148 >$(srcdir)/SYMBOLS.new && \
149 mv $(srcdir)/SYMBOLS.new $(srcdir)/SYMBOLS
150 .PHONY: update-symbols
152 check-manual: update-symbols sod.pdf
153 $(srcdir)/check-docs sod.aux $(srcdir)/SYMBOLS
156 ###----- That's all, folks --------------------------------------------------