Commit | Line | Data |
---|---|---|
df42eec6 | 1 | #### Makefile for the Emacs Manual |
8cf51b2c GM |
2 | |
3 | # Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, | |
5f874327 GM |
4 | # 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
5 | # Free Software Foundation, Inc. | |
8cf51b2c GM |
6 | |
7 | # This file is part of GNU Emacs. | |
8 | ||
352c8b4a | 9 | # GNU Emacs is free software: you can redistribute it and/or modify |
8cf51b2c | 10 | # it under the terms of the GNU General Public License as published by |
352c8b4a GM |
11 | # the Free Software Foundation, either version 3 of the License, or |
12 | # (at your option) any later version. | |
8cf51b2c GM |
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 | |
352c8b4a GM |
20 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
21 | ||
0264072d | 22 | SHELL = /bin/sh |
8cf51b2c | 23 | |
4c83f6e1 GM |
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. | |
8cf51b2c | 26 | srcdir=@srcdir@ |
8cf51b2c GM |
27 | |
28 | # Tell make where to find source files; this is needed for the makefiles. | |
29 | VPATH=@srcdir@ | |
30 | ||
17ca7950 GM |
31 | # Only for make dist. |
32 | version=@version@ | |
33 | ||
df42eec6 GM |
34 | ## Where the output files go. |
35 | ## Note that the setfilename command in the .texi files assumes this. | |
36 | infodir=../../info | |
2358ae54 GM |
37 | # Directory with the (customized) texinfo.tex file. |
38 | texinfodir = $(srcdir)/../misc | |
8cf51b2c GM |
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 --force | |
df42eec6 | 43 | |
df42eec6 | 44 | TEXI2DVI = texi2dvi |
703d26ba | 45 | TEXI2PDF = texi2pdf |
8cf51b2c GM |
46 | |
47 | # The following rule does not work with all versions of `make'. | |
48 | .SUFFIXES: .texi .dvi | |
49 | .texi.dvi: | |
df42eec6 | 50 | $(TEXI2DVI) $< |
8cf51b2c | 51 | |
2358ae54 | 52 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)" |
8cf51b2c | 53 | |
df42eec6 | 54 | |
4c83f6e1 GM |
55 | EMACS_XTRA= \ |
56 | ${srcdir}/emacs-xtra.texi \ | |
8cf51b2c GM |
57 | $(srcdir)/arevert-xtra.texi \ |
58 | $(srcdir)/cal-xtra.texi \ | |
59 | $(srcdir)/dired-xtra.texi \ | |
60 | $(srcdir)/picture-xtra.texi \ | |
61 | $(srcdir)/emerge-xtra.texi \ | |
62 | $(srcdir)/vc-xtra.texi \ | |
63 | $(srcdir)/vc1-xtra.texi \ | |
8cf51b2c GM |
64 | $(srcdir)/fortran-xtra.texi \ |
65 | $(srcdir)/msdog-xtra.texi | |
66 | ||
67 | EMACSSOURCES= \ | |
68 | ${srcdir}/emacs.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 | ||
0264072d | 114 | info: $(infodir)/emacs |
8cf51b2c | 115 | |
df42eec6 | 116 | $(infodir): |
8a944cea | 117 | mkdir $@ || test -d $@ |
8cf51b2c | 118 | |
0264072d GM |
119 | dvi: emacs.dvi |
120 | pdf: emacs.pdf | |
8cf51b2c | 121 | |
0264072d GM |
122 | # Note that all the Info targets build the Info files in srcdir. |
123 | # There is no provision for Info files to exist in the build directory. | |
8cf51b2c GM |
124 | # In a distribution of Emacs, the Info files should be up to date. |
125 | ||
df42eec6 | 126 | emacs : $(infodir)/emacs |
8cf51b2c | 127 | |
0264072d GM |
128 | $(infodir)/emacs: $(infodir) ${EMACSSOURCES} |
129 | cd $(srcdir); $(MAKEINFO) emacs.texi -o $@ | |
8cf51b2c GM |
130 | |
131 | emacs.dvi: ${EMACSSOURCES} | |
132 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi | |
133 | ||
703d26ba GM |
134 | emacs.pdf: ${EMACSSOURCES} |
135 | $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi | |
136 | ||
8cf51b2c | 137 | |
4c83f6e1 | 138 | emacs-xtra.dvi: $(EMACS_XTRA) |
8cf51b2c GM |
139 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi |
140 | ||
4c83f6e1 | 141 | emacs-xtra.pdf: $(EMACS_XTRA) |
703d26ba GM |
142 | $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi |
143 | ||
4c83f6e1 | 144 | .PHONY: mostlyclean clean distclean maintainer-clean infoclean |
8cf51b2c | 145 | |
4c83f6e1 | 146 | ## Temp files. |
8cf51b2c | 147 | mostlyclean: |
4c83f6e1 GM |
148 | rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \ |
149 | *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs | |
8cf51b2c | 150 | |
4c83f6e1 | 151 | ## Products not in the release tarfiles. |
8cf51b2c | 152 | clean: mostlyclean |
4c83f6e1 | 153 | rm -f emacs.dvi emacs-xtra.dvi emacs.pdf emacs-xtra.pdf |
17ca7950 | 154 | rm -f emacs-manual-${version}.tar* |
8cf51b2c GM |
155 | |
156 | distclean: clean | |
157 | ||
4c83f6e1 GM |
158 | ## In the standalone tarfile, the clean rule runs this. |
159 | infoclean: | |
0264072d | 160 | -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9] |
df42eec6 | 161 | |
4c83f6e1 GM |
162 | maintainer-clean: distclean infoclean |
163 | ||
164 | ## Make a standalone tarfile of the Emacs manual sources. | |
165 | ## The [c] is a dumb way to prevent configure expanding it. | |
166 | ## The emacs: rule becomes circular when we change infodir to ".". | |
167 | dist: | |
17ca7950 GM |
168 | rm -rf emacs-manual-${version} |
169 | mkdir emacs-manual-${version} | |
4c83f6e1 | 170 | cp ${srcdir}/*.texi ${texinfodir}/texinfo.tex \ |
17ca7950 | 171 | ${srcdir}/ChangeLog* emacs-manual-${version}/ |
4c83f6e1 GM |
172 | sed -e 's/@sr[c]dir@/./' -e 's/\(texinfodir *=\).*/\1 ./' \ |
173 | -e 's/\(infodir *=\).*/\1 ./' -e '/^emacs *:/d' \ | |
174 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | |
17ca7950 GM |
175 | -e "s/@ver[s]ion@/${version}/" \ |
176 | ${srcdir}/Makefile.in > emacs-manual-${version}/Makefile | |
177 | tar -cf emacs-manual-${version}.tar emacs-manual-${version} | |
178 | rm -rf emacs-manual-${version} | |
4c83f6e1 | 179 | |
df42eec6 | 180 | ### Makefile ends here |