]> code.delx.au - gnu-emacs/blob - doc/emacs/Makefile.in
2fec57f838b8dd7817b06e324ef34ff295300649
[gnu-emacs] / doc / emacs / Makefile.in
1 #### Makefile for the Emacs Manual
2
3 # Copyright (C) 1994, 1996-2013 Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20 SHELL = /bin/sh
21
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
24
25 # Where to find the source code. $(srcdir) will be the doc/emacs subdirectory
26 # of the source tree. This is set by configure's `--srcdir' option.
27 srcdir=@srcdir@
28
29 # Only for make dist.
30 version=@version@
31
32 ## Where the output files go.
33 ## Note that the setfilename command in the .texi files assumes this.
34 ## This is a bit funny. Because the info files are in the
35 ## distribution tarfiles, they are always made in $scrdir/../../info,
36 ## even for out-of-tree builds.
37 buildinfodir = $(srcdir)/../../info
38 # Directory with the (customized) texinfo.tex file.
39 texinfodir = $(srcdir)/../misc
40
41 MKDIR_P = @MKDIR_P@
42
43 INFO_EXT=@INFO_EXT@
44 # Options used only when making info output.
45 # --no-split is only needed because of MS-DOS.
46 # For a possible alternative, see
47 # http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
48 INFO_OPTS=@INFO_OPTS@
49
50 # The makeinfo program is part of the Texinfo distribution.
51 # Use --force so that it generates output even if there are errors.
52 MAKEINFO = @MAKEINFO@
53 MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
54
55 TEXI2DVI = texi2dvi
56 TEXI2PDF = texi2pdf
57 DVIPS = dvips
58
59
60 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
61 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
62
63
64 EMACS_XTRA= \
65 ${srcdir}/emacs-xtra.texi \
66 $(srcdir)/arevert-xtra.texi \
67 $(srcdir)/cal-xtra.texi \
68 $(srcdir)/dired-xtra.texi \
69 $(srcdir)/picture-xtra.texi \
70 $(srcdir)/emerge-xtra.texi \
71 $(srcdir)/vc-xtra.texi \
72 $(srcdir)/vc1-xtra.texi \
73 $(srcdir)/fortran-xtra.texi \
74 $(srcdir)/msdog-xtra.texi
75
76 EMACSSOURCES= \
77 ${srcdir}/emacs.texi \
78 ${srcdir}/emacsver.texi \
79 ${srcdir}/doclicense.texi \
80 ${srcdir}/gpl.texi \
81 ${srcdir}/screen.texi \
82 ${srcdir}/commands.texi \
83 ${srcdir}/entering.texi \
84 ${srcdir}/basic.texi \
85 ${srcdir}/mini.texi \
86 ${srcdir}/m-x.texi \
87 ${srcdir}/help.texi \
88 ${srcdir}/mark.texi \
89 ${srcdir}/killing.texi \
90 ${srcdir}/regs.texi \
91 ${srcdir}/display.texi \
92 ${srcdir}/search.texi \
93 ${srcdir}/fixit.texi \
94 ${srcdir}/files.texi \
95 ${srcdir}/buffers.texi \
96 ${srcdir}/windows.texi \
97 ${srcdir}/frames.texi \
98 ${srcdir}/mule.texi \
99 ${srcdir}/modes.texi \
100 ${srcdir}/indent.texi \
101 ${srcdir}/text.texi \
102 ${srcdir}/programs.texi \
103 ${srcdir}/building.texi \
104 ${srcdir}/maintaining.texi \
105 ${srcdir}/abbrevs.texi \
106 ${srcdir}/sending.texi \
107 ${srcdir}/rmail.texi \
108 ${srcdir}/dired.texi \
109 ${srcdir}/calendar.texi \
110 ${srcdir}/misc.texi \
111 ${srcdir}/package.texi \
112 ${srcdir}/custom.texi \
113 ${srcdir}/trouble.texi \
114 ${srcdir}/cmdargs.texi \
115 ${srcdir}/xresources.texi \
116 ${srcdir}/anti.texi \
117 ${srcdir}/macos.texi \
118 ${srcdir}/msdog.texi \
119 ${srcdir}/gnu.texi \
120 ${srcdir}/glossary.texi \
121 ${srcdir}/ack.texi \
122 ${srcdir}/kmacro.texi \
123 $(EMACS_XTRA)
124
125 ## This seems pointless. The info/ directory exists in both the
126 ## repository and the release tarfiles.
127 mkinfodir = @${MKDIR_P} ${buildinfodir}
128
129 .PHONY: info dvi html pdf ps
130
131 info: $(buildinfodir)/emacs$(INFO_EXT)
132 dvi: emacs.dvi
133 html: emacs.html
134 pdf: emacs.pdf
135 ps: emacs.ps
136
137 # Note that all the Info targets build the Info files in srcdir.
138 # There is no provision for Info files to exist in the build directory.
139 # In a distribution of Emacs, the Info files should be up to date.
140 # Note: "<" is not portable in ordinary make rules.
141 $(buildinfodir)/emacs$(INFO_EXT): ${EMACSSOURCES}
142 $(mkinfodir)
143 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
144
145 emacs.dvi: ${EMACSSOURCES}
146 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
147
148 emacs.ps: emacs.dvi
149 $(DVIPS) -o $@ emacs.dvi
150
151 emacs.pdf: ${EMACSSOURCES}
152 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
153
154 emacs.html: ${EMACSSOURCES}
155 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs.texi
156
157 emacs-xtra.dvi: $(EMACS_XTRA)
158 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
159
160 emacs-xtra.ps: emacs-xtra.dvi
161 $(DVIPS) -o $@ emacs-xtra.dvi
162
163 emacs-xtra.pdf: $(EMACS_XTRA)
164 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
165
166 .PHONY: mostlyclean clean distclean maintainer-clean infoclean
167
168 ## Temp files.
169 mostlyclean:
170 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
171 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
172
173 ## Products not in the release tarfiles.
174 clean: mostlyclean
175 rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf \
176 emacs.ps emacs-xtra.ps
177 rm -rf emacs.html/
178 rm -f emacs-manual-${version}.tar*
179
180 distclean: clean
181
182 ## In the standalone tarfile, the clean rule runs this.
183 infoclean:
184 -cd $(buildinfodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9]
185
186 maintainer-clean: distclean infoclean
187
188 .PHONY: dist
189
190 ## Make a standalone tarfile of the Emacs manual sources.
191 ## The [c] is a dumb way to prevent configure expanding it.
192 dist:
193 rm -rf emacs-manual-${version}
194 mkdir emacs-manual-${version}
195 cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \
196 ${srcdir}/ChangeLog* emacs-manual-${version}/
197 sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \
198 -e 's/^\(buildinfodir *=\).*/\1 ./' \
199 -e 's/^\(clean:.*\)/\1 infoclean/' \
200 -e "s/@ver[s]ion@/${version}/" \
201 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
202 -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
203 ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile
204 @if grep '@[a-zA-Z_]*@' emacs-manual-${version}/Makefile; then \
205 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
206 fi
207 tar -cf emacs-manual-${version}.tar emacs-manual-${version}
208 rm -rf emacs-manual-${version}
209
210 ### Makefile ends here