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