Move flymake test data to more standard location
[emacs.git] / doc / emacs / Makefile.in
blob5e53c07451b2b0adca12d0b67e5ced279533b168
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 top_srcdir = @top_srcdir@
31 version = @version@
33 ## Where the output files go.
34 ## Note that the setfilename command in the .texi files assumes this.
35 ## This is a bit funny. Because the info files are in the
36 ## distribution tarfiles, they are always made in $scrdir/../../info,
37 ## even for out-of-tree builds.
38 buildinfodir = $(srcdir)/../../info
39 # Directory with the (customized) texinfo.tex file.
40 texinfodir = $(srcdir)/../misc
42 prefix = @prefix@
43 datarootdir = @datarootdir@
44 datadir = @datadir@
45 PACKAGE_TARNAME = @PACKAGE_TARNAME@
46 docdir = @docdir@
47 dvidir = @dvidir@
48 htmldir = @htmldir@
49 pdfdir = @pdfdir@
50 psdir = @psdir@
52 MKDIR_P = @MKDIR_P@
54 GZIP_PROG = @GZIP_PROG@
56 HTML_OPTS = --no-split --html
58 # Options used only when making info output.
59 # --no-split is only needed because of MS-DOS.
60 # For a possible alternative, see
61 # http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
62 INFO_OPTS= --no-split
64 INSTALL = @INSTALL@
65 INSTALL_DATA = @INSTALL_DATA@
67 # The makeinfo program is part of the Texinfo distribution.
68 # Use --force so that it generates output even if there are errors.
69 MAKEINFO = @MAKEINFO@
70 MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
72 TEXI2DVI = texi2dvi
73 TEXI2PDF = texi2pdf
74 DVIPS = dvips
77 ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
78 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
80 DVI_TARGETS = emacs.dvi emacs-xtra.dvi
81 HTML_TARGETS = emacs.html
82 PDF_TARGETS = emacs.pdf emacs-xtra.pdf
83 PS_TARGETS = emacs.ps emacs-xtra.ps
85 EMACS_XTRA= \
86 ${srcdir}/emacs-xtra.texi \
87 $(srcdir)/arevert-xtra.texi \
88 $(srcdir)/cal-xtra.texi \
89 $(srcdir)/dired-xtra.texi \
90 $(srcdir)/picture-xtra.texi \
91 $(srcdir)/emerge-xtra.texi \
92 $(srcdir)/vc-xtra.texi \
93 $(srcdir)/vc1-xtra.texi \
94 $(srcdir)/fortran-xtra.texi \
95 $(srcdir)/msdos-xtra.texi
97 EMACSSOURCES= \
98 ${srcdir}/emacs.texi \
99 ${srcdir}/emacsver.texi \
100 ${srcdir}/doclicense.texi \
101 ${srcdir}/gpl.texi \
102 ${srcdir}/screen.texi \
103 ${srcdir}/commands.texi \
104 ${srcdir}/entering.texi \
105 ${srcdir}/basic.texi \
106 ${srcdir}/mini.texi \
107 ${srcdir}/m-x.texi \
108 ${srcdir}/help.texi \
109 ${srcdir}/mark.texi \
110 ${srcdir}/killing.texi \
111 ${srcdir}/regs.texi \
112 ${srcdir}/display.texi \
113 ${srcdir}/search.texi \
114 ${srcdir}/fixit.texi \
115 ${srcdir}/files.texi \
116 ${srcdir}/buffers.texi \
117 ${srcdir}/windows.texi \
118 ${srcdir}/frames.texi \
119 ${srcdir}/mule.texi \
120 ${srcdir}/modes.texi \
121 ${srcdir}/indent.texi \
122 ${srcdir}/text.texi \
123 ${srcdir}/programs.texi \
124 ${srcdir}/building.texi \
125 ${srcdir}/maintaining.texi \
126 ${srcdir}/abbrevs.texi \
127 ${srcdir}/sending.texi \
128 ${srcdir}/rmail.texi \
129 ${srcdir}/dired.texi \
130 ${srcdir}/calendar.texi \
131 ${srcdir}/misc.texi \
132 ${srcdir}/package.texi \
133 ${srcdir}/custom.texi \
134 ${srcdir}/trouble.texi \
135 ${srcdir}/cmdargs.texi \
136 ${srcdir}/xresources.texi \
137 ${srcdir}/anti.texi \
138 ${srcdir}/macos.texi \
139 ${srcdir}/msdos.texi \
140 ${srcdir}/gnu.texi \
141 ${srcdir}/glossary.texi \
142 ${srcdir}/ack.texi \
143 ${srcdir}/kmacro.texi \
144 $(EMACS_XTRA)
146 ## Disable implicit rules.
147 %.texi: ;
149 .PHONY: info dvi html pdf ps
151 info: $(buildinfodir)/emacs.info
152 dvi: $(DVI_TARGETS)
153 html: $(HTML_TARGETS)
154 pdf: $(PDF_TARGETS)
155 ps: $(PS_TARGETS)
157 ## The info/ directory exists in release tarfiles but not the repository.
158 ${buildinfodir}:
159 ${MKDIR_P} $@
161 # Note that all the Info targets build the Info files in srcdir.
162 # There is no provision for Info files to exist in the build directory.
163 # In a distribution of Emacs, the Info files should be up to date.
164 $(buildinfodir)/emacs.info: ${EMACSSOURCES} | ${buildinfodir}
165 $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
167 emacs.dvi: ${EMACSSOURCES}
168 $(ENVADD) $(TEXI2DVI) $<
170 emacs.pdf: ${EMACSSOURCES}
171 $(ENVADD) $(TEXI2PDF) $<
173 emacs.html: ${EMACSSOURCES}
174 $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
176 emacs-xtra.dvi: $(EMACS_XTRA)
177 $(ENVADD) $(TEXI2DVI) $<
179 emacs-xtra.pdf: $(EMACS_XTRA)
180 $(ENVADD) $(TEXI2PDF) $<
182 %.ps: %.dvi
183 $(DVIPS) -o $@ $<
185 .PHONY: doc-emacsver
187 # If configure were to just generate emacsver.texi from emacsver.texi.in
188 # in the normal way, the timestamp of emacsver.texi would always be
189 # newer than that of the info files, which are prebuilt in release tarfiles.
190 # So we use this rule, and move-if-change, to avoid that.
191 doc-emacsver:
192 sed 's/[@]version@/${version}/' \
193 ${srcdir}/emacsver.texi.in > emacsver.texi.$$$$ && \
194 ${top_srcdir}/build-aux/move-if-change emacsver.texi.$$$$ \
195 ${srcdir}/emacsver.texi
197 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
199 ## Temp files.
200 mostlyclean:
201 rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
202 *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
204 ## Products not in the release tarfiles.
205 clean: mostlyclean
206 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
208 distclean: clean
209 rm -f Makefile
211 ## In the standalone tarfile, the clean rule runs this.
212 infoclean:
213 rm -f \
214 $(buildinfodir)/emacs.info \
215 $(buildinfodir)/emacs.info-[1-9] \
216 $(buildinfodir)/emacs.info-[1-9][0-9]
218 bootstrap-clean maintainer-clean: distclean infoclean
219 rm -f ${srcdir}/emacsver.texi
221 .PHONY: install-dvi install-html install-pdf install-ps install-doc
223 install-dvi: dvi
224 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)"
225 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)"
226 install-html: html
227 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)"
228 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)"
229 install-pdf: pdf
230 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)"
231 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)"
232 install-ps: ps
233 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)"
234 for file in $(PS_TARGETS); do \
235 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \
236 [ -n "${GZIP_PROG}" ] || continue; \
237 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \
238 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \
239 done
241 ## Top-level Makefile installs the info pages.
242 install-doc: install-dvi install-html install-pdf install-ps
245 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc
247 uninstall-dvi:
248 for file in $(DVI_TARGETS); do \
249 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \
250 done
251 uninstall-html:
252 for file in $(HTML_TARGETS); do \
253 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \
254 done
255 uninstall-ps:
256 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \
257 for file in $(PS_TARGETS); do \
258 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \
259 done
260 uninstall-pdf:
261 for file in $(PDF_TARGETS); do \
262 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \
263 done
265 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
268 ### Makefile ends here