1 #### Makefile for the Emacs Manual
3 # Copyright (C) 1994, 1996-2013 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
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.
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.
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/>.
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.
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 buildinfodir
= $(srcdir)/..
/..
/info
35 # Directory with the (customized) texinfo.tex file.
36 texinfodir
= $(srcdir)/..
/misc
41 # Options used only when making info output.
42 # --no-split is only needed because of MS-DOS.
43 # For a possible alternative, see
44 # http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
47 # The makeinfo program is part of the Texinfo distribution.
48 # Use --force so that it generates output even if there are errors.
50 MAKEINFO_OPTS
= --force --enable-encoding
-I
$(srcdir)
57 ENVADD
= TEXINPUTS
="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
58 MAKEINFO
="$(MAKEINFO) $(MAKEINFO_OPTS)"
62 ${srcdir}/emacs-xtra.texi \
63 $(srcdir)/arevert-xtra.texi \
64 $(srcdir)/cal-xtra.texi \
65 $(srcdir)/dired-xtra.texi \
66 $(srcdir)/picture-xtra.texi \
67 $(srcdir)/emerge-xtra.texi \
68 $(srcdir)/vc-xtra.texi \
69 $(srcdir)/vc1-xtra.texi \
70 $(srcdir)/fortran-xtra.texi \
71 $(srcdir)/msdog-xtra.texi
74 ${srcdir}/emacs.texi \
75 ${srcdir}/emacsver.texi \
76 ${srcdir}/doclicense.texi \
78 ${srcdir}/screen.texi \
79 ${srcdir}/commands.texi \
80 ${srcdir}/entering.texi \
81 ${srcdir}/basic.texi \
86 ${srcdir}/killing.texi \
88 ${srcdir}/display.texi \
89 ${srcdir}/search.texi \
90 ${srcdir}/fixit.texi \
91 ${srcdir}/files.texi \
92 ${srcdir}/buffers.texi \
93 ${srcdir}/windows.texi \
94 ${srcdir}/frames.texi \
96 ${srcdir}/modes.texi \
97 ${srcdir}/indent.texi \
99 ${srcdir}/programs.texi \
100 ${srcdir}/building.texi \
101 ${srcdir}/maintaining.texi \
102 ${srcdir}/abbrevs.texi \
103 ${srcdir}/sending.texi \
104 ${srcdir}/rmail.texi \
105 ${srcdir}/dired.texi \
106 ${srcdir}/calendar.texi \
107 ${srcdir}/misc.texi \
108 ${srcdir}/package.texi \
109 ${srcdir}/custom.texi \
110 ${srcdir}/trouble.texi \
111 ${srcdir}/cmdargs.texi \
112 ${srcdir}/xresources.texi \
113 ${srcdir}/anti.texi \
114 ${srcdir}/macos.texi \
115 ${srcdir}/msdog.texi \
117 ${srcdir}/glossary.texi \
119 ${srcdir}/kmacro.texi \
122 ## This seems pointless. The info/ directory exists in both the
123 ## repository and the release tarfiles.
124 mkinfodir
= @
${MKDIR_P} ${buildinfodir}
126 .PHONY
: info dvi html pdf ps
128 info: $(buildinfodir
)/emacs
$(INFO_EXT
)
134 # Note that all the Info targets build the Info files in srcdir.
135 # There is no provision for Info files to exist in the build directory.
136 # In a distribution of Emacs, the Info files should be up to date.
137 # Note: "<" is not portable in ordinary make rules.
138 $(buildinfodir
)/emacs
$(INFO_EXT
): ${EMACSSOURCES}
140 $(MAKEINFO
) $(MAKEINFO_OPTS
) $(INFO_OPTS
) -o
$@
${srcdir}/emacs.texi
142 emacs.
dvi: ${EMACSSOURCES}
143 $(ENVADD
) $(TEXI2DVI
) ${srcdir}/emacs.texi
146 $(DVIPS
) -o
$@ emacs.
dvi
148 emacs.pdf
: ${EMACSSOURCES}
149 $(ENVADD
) $(TEXI2PDF
) ${srcdir}/emacs.texi
151 emacs.html
: ${EMACSSOURCES}
152 $(MAKEINFO
) $(MAKEINFO_OPTS
) --html
-o
$@
${srcdir}/emacs.texi
154 emacs-xtra.
dvi: $(EMACS_XTRA
)
155 $(ENVADD
) $(TEXI2DVI
) ${srcdir}/emacs-xtra.texi
157 emacs-xtra.ps
: emacs-xtra.
dvi
158 $(DVIPS
) -o
$@ emacs-xtra.
dvi
160 emacs-xtra.pdf
: $(EMACS_XTRA
)
161 $(ENVADD
) $(TEXI2PDF
) ${srcdir}/emacs-xtra.texi
163 .PHONY
: mostlyclean clean distclean maintainer-clean infoclean
167 rm -f
*.aux
*.log
*.toc
*.cp
*.cps
*.fn
*.fns
*.ky
*.kys \
168 *.op
*.ops
*.pg
*.pgs
*.tp
*.tps
*.vr
*.vrs
170 ## Products not in the release tarfiles.
172 rm -f emacs.
dvi emacs-xtra.
dvi emacs.pdf emacs-xtra.pdf \
173 emacs.ps emacs-xtra.ps
175 rm -f emacs-manual-
${version}.
tar*
179 ## In the standalone tarfile, the clean rule runs this.
181 -cd
$(buildinfodir
) && rm -f emacs
$(INFO_EXT
) emacs
$(INFO_EXT
)-[1-9] emacs
$(INFO_EXT
)-[1-9][0-9]
183 maintainer-clean
: distclean infoclean
187 ## Make a standalone tarfile of the Emacs manual sources.
188 ## The [c] is a dumb way to prevent configure expanding it.
190 rm -rf emacs-manual-
${version}
191 mkdir emacs-manual-
${version}
192 cp
${srcdir}/*.texi
${texinfodir}/texinfo.
tex \
193 ${srcdir}/ChangeLog
* emacs-manual-
${version}/
194 sed
-e
's/@sr[c]dir@/./' -e
's/^\(texinfodir *=\).*/\1 ./' \
195 -e
's/^\(buildinfodir *=\).*/\1 ./' \
196 -e
's/^\(clean:.*\)/\1 infoclean/' \
197 -e
"s/@ver[s]ion@/${version}/" \
198 ${srcdir}/Makefile.in
> emacs-manual-
${version}/Makefile
199 tar -cf emacs-manual-
${version}.
tar emacs-manual-
${version}
200 rm -rf emacs-manual-
${version}
202 ### Makefile ends here