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