(report-emacs-bug): Make a better guess at envelope-from
[emacs.git] / doc / emacs / Makefile.in
blob5a915561744d2e358e569143fb69d090a01f489c
1 ### @configure_input@
3 # Copyright (C) 1994, 1996-2014 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/>.
20 SHELL = @SHELL@
22 # NB If you add any more configure variables,
23 # update the sed rules in the dist target below.
25 # Where to find the source code. $(srcdir) will be the doc/emacs subdirectory
26 # of the source tree. This is set by configure's `--srcdir' option.
27 srcdir=@srcdir@
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
38 prefix = @prefix@
39 datarootdir = @datarootdir@
40 datadir = @datadir@
41 PACKAGE_TARNAME = @PACKAGE_TARNAME@
42 docdir = @docdir@
43 dvidir = @dvidir@
44 htmldir = @htmldir@
45 pdfdir = @pdfdir@
46 psdir = @psdir@
48 MKDIR_P = @MKDIR_P@
50 GZIP_PROG = @GZIP_PROG@
52 HTML_OPTS = --no-split --html
54 INFO_EXT=@INFO_EXT@
55 # Options used only when making info output.
56 # --no-split is only needed because of MS-DOS.
57 # For a possible alternative, see
58 # http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
59 INFO_OPTS=@INFO_OPTS@
61 INSTALL = @INSTALL@
62 INSTALL_DATA = @INSTALL_DATA@
64 # The makeinfo program is part of the Texinfo distribution.
65 # Use --force so that it generates output even if there are errors.
66 MAKEINFO = @MAKEINFO@
67 MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
69 TEXI2DVI = texi2dvi
70 TEXI2PDF = texi2pdf
71 DVIPS = dvips
74 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
75 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
77 DVI_TARGETS = emacs.dvi emacs-xtra.dvi
78 HTML_TARGETS = emacs.html
79 PDF_TARGETS = emacs.pdf emacs-xtra.pdf
80 PS_TARGETS = emacs.ps emacs-xtra.ps
82 EMACS_XTRA= \
83 ${srcdir}/emacs-xtra.texi \
84 $(srcdir)/arevert-xtra.texi \
85 $(srcdir)/cal-xtra.texi \
86 $(srcdir)/dired-xtra.texi \
87 $(srcdir)/picture-xtra.texi \
88 $(srcdir)/emerge-xtra.texi \
89 $(srcdir)/vc-xtra.texi \
90 $(srcdir)/vc1-xtra.texi \
91 $(srcdir)/fortran-xtra.texi \
92 $(srcdir)/msdog-xtra.texi
94 EMACSSOURCES= \
95 ${srcdir}/emacs.texi \
96 ${srcdir}/emacsver.texi \
97 ${srcdir}/doclicense.texi \
98 ${srcdir}/gpl.texi \
99 ${srcdir}/screen.texi \
100 ${srcdir}/commands.texi \
101 ${srcdir}/entering.texi \
102 ${srcdir}/basic.texi \
103 ${srcdir}/mini.texi \
104 ${srcdir}/m-x.texi \
105 ${srcdir}/help.texi \
106 ${srcdir}/mark.texi \
107 ${srcdir}/killing.texi \
108 ${srcdir}/regs.texi \
109 ${srcdir}/display.texi \
110 ${srcdir}/search.texi \
111 ${srcdir}/fixit.texi \
112 ${srcdir}/files.texi \
113 ${srcdir}/buffers.texi \
114 ${srcdir}/windows.texi \
115 ${srcdir}/frames.texi \
116 ${srcdir}/mule.texi \
117 ${srcdir}/modes.texi \
118 ${srcdir}/indent.texi \
119 ${srcdir}/text.texi \
120 ${srcdir}/programs.texi \
121 ${srcdir}/building.texi \
122 ${srcdir}/maintaining.texi \
123 ${srcdir}/abbrevs.texi \
124 ${srcdir}/sending.texi \
125 ${srcdir}/rmail.texi \
126 ${srcdir}/dired.texi \
127 ${srcdir}/calendar.texi \
128 ${srcdir}/misc.texi \
129 ${srcdir}/package.texi \
130 ${srcdir}/custom.texi \
131 ${srcdir}/trouble.texi \
132 ${srcdir}/cmdargs.texi \
133 ${srcdir}/xresources.texi \
134 ${srcdir}/anti.texi \
135 ${srcdir}/macos.texi \
136 ${srcdir}/msdog.texi \
137 ${srcdir}/gnu.texi \
138 ${srcdir}/glossary.texi \
139 ${srcdir}/ack.texi \
140 ${srcdir}/kmacro.texi \
141 $(EMACS_XTRA)
143 ## The info/ directory exists in release tarfiles but not the repository.
144 mkinfodir = @${MKDIR_P} ${buildinfodir}
146 .PHONY: info dvi html pdf ps
148 .SUFFIXES: .ps .dvi
150 .dvi.ps:
151 $(DVIPS) -o $@ $<
153 info: $(buildinfodir)/emacs$(INFO_EXT)
154 dvi: $(DVI_TARGETS)
155 html: $(HTML_TARGETS)
156 pdf: $(PDF_TARGETS)
157 ps: $(PS_TARGETS)
159 # Note that all the Info targets build the Info files in srcdir.
160 # There is no provision for Info files to exist in the build directory.
161 # In a distribution of Emacs, the Info files should be up to date.
162 # Note: "<" is not portable in ordinary make rules.
163 $(buildinfodir)/emacs$(INFO_EXT): ${EMACSSOURCES}
164 $(mkinfodir)
165 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
167 emacs.dvi: ${EMACSSOURCES}
168 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
170 emacs.pdf: ${EMACSSOURCES}
171 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
173 emacs.html: ${EMACSSOURCES}
174 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs.texi
176 emacs-xtra.dvi: $(EMACS_XTRA)
177 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
179 emacs-xtra.pdf: $(EMACS_XTRA)
180 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
182 .PHONY: mostlyclean clean distclean maintainer-clean infoclean
184 ## Temp files.
185 mostlyclean:
186 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
187 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
189 ## Products not in the release tarfiles.
190 clean: mostlyclean
191 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
193 distclean: clean
194 rm -f Makefile
196 ## In the standalone tarfile, the clean rule runs this.
197 infoclean:
198 -cd $(buildinfodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9]
200 maintainer-clean: distclean infoclean
202 .PHONY: install-dvi install-html install-pdf install-ps install-doc
204 install-dvi: dvi
205 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
206 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
207 install-html: html
208 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
209 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
210 install-pdf: pdf
211 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
212 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
213 install-ps: ps
214 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
215 for file in $(PS_TARGETS); do \
216 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
217 [ -n "${GZIP_PROG}" ] || continue; \
218 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
219 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
220 done
222 ## Top-level Makefile installs the info pages.
223 install-doc: install-dvi install-html install-pdf install-ps
226 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
228 uninstall-dvi:
229 for file in $(DVI_TARGETS); do \
230 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
231 done
232 uninstall-html:
233 for file in $(HTML_TARGETS); do \
234 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
235 done
236 uninstall-ps:
237 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
238 for file in $(PS_TARGETS); do \
239 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
240 done
241 uninstall-pdf:
242 for file in $(PDF_TARGETS); do \
243 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
244 done
246 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
249 ### Makefile ends here