1 #### Makefile for the Emacs Manual
3 # Copyright (C) 1994, 1996-2012 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 infodir = $(srcdir)/..
/..
/info
35 # Directory with the (customized) texinfo.tex file.
36 texinfodir
= $(srcdir)/..
/misc
38 # The makeinfo program is part of the Texinfo distribution.
39 # Use --force so that it generates output even if there are errors.
41 MAKEINFO_OPTS
= --force --enable-encoding
-I
$(srcdir)
48 ENVADD
= TEXINPUTS
="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
49 MAKEINFO
="$(MAKEINFO) $(MAKEINFO_OPTS)"
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
65 ${srcdir}/emacs.texi \
66 ${srcdir}/emacsver.texi \
67 ${srcdir}/doclicense.texi \
69 ${srcdir}/screen.texi \
70 ${srcdir}/commands.texi \
71 ${srcdir}/entering.texi \
72 ${srcdir}/basic.texi \
77 ${srcdir}/killing.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 \
87 ${srcdir}/modes.texi \
88 ${srcdir}/indent.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 \
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 \
108 ${srcdir}/glossary.texi \
110 ${srcdir}/kmacro.texi \
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}
119 .PHONY
: info dvi html pdf ps
121 info: $(infodir)/emacs
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.
131 $(infodir)/emacs
: ${EMACSSOURCES}
133 $(MAKEINFO
) $(MAKEINFO_OPTS
) -o
$@
$<
135 emacs.
dvi: ${EMACSSOURCES}
136 $(ENVADD
) $(TEXI2DVI
) $<
141 emacs.pdf
: ${EMACSSOURCES}
142 $(ENVADD
) $(TEXI2PDF
) $<
144 emacs.html
: ${EMACSSOURCES}
145 $(MAKEINFO
) $(MAKEINFO_OPTS
) --html
-o
$@
$<
147 emacs-xtra.
dvi: $(EMACS_XTRA
)
148 $(ENVADD
) $(TEXI2DVI
) $<
150 emacs-xtra.ps
: emacs-xtra.
dvi
153 emacs-xtra.pdf
: $(EMACS_XTRA
)
154 $(ENVADD
) $(TEXI2PDF
) $<
156 .PHONY
: mostlyclean clean distclean maintainer-clean infoclean
160 rm -f
*.aux
*.log
*.toc
*.cp
*.cps
*.fn
*.fns
*.ky
*.kys \
161 *.op
*.ops
*.pg
*.pgs
*.tp
*.tps
*.vr
*.vrs
163 ## Products not in the release tarfiles.
165 rm -f emacs.
dvi emacs-xtra.
dvi emacs.pdf emacs-xtra.pdf \
166 emacs.ps emacs-xtra.ps
168 rm -f emacs-manual-
${version}.
tar*
172 ## In the standalone tarfile, the clean rule runs this.
174 -cd
$(infodir) && rm -f emacs emacs-
[1-9] emacs-
[1-9][0-9]
176 maintainer-clean
: distclean infoclean
180 ## Make a standalone tarfile of the Emacs manual sources.
181 ## The [c] is a dumb way to prevent configure expanding it.
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}
194 ### Makefile ends here