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/>.
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.
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
39 datarootdir
= @datarootdir@
41 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
50 GZIP_PROG
= @GZIP_PROG@
52 HTML_OPTS
= --no-split
--html
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
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.
67 MAKEINFO_OPTS
= --force --enable-encoding
-I
$(srcdir)
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
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
95 ${srcdir}/emacs.texi \
96 ${srcdir}/emacsver.texi \
97 ${srcdir}/doclicense.texi \
99 ${srcdir}/screen.texi \
100 ${srcdir}/commands.texi \
101 ${srcdir}/entering.texi \
102 ${srcdir}/basic.texi \
103 ${srcdir}/mini.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 \
138 ${srcdir}/glossary.texi \
140 ${srcdir}/kmacro.texi \
143 ## The info/ directory exists in release tarfiles but not the repository.
144 mkinfodir
= @
${MKDIR_P} ${buildinfodir}
146 .PHONY
: info dvi html pdf ps
153 info: $(buildinfodir
)/emacs
$(INFO_EXT
)
155 html
: $(HTML_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}
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
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.
191 rm -f
$(DVI_TARGETS
) $(HTML_TARGETS
) $(PDF_TARGETS
) $(PS_TARGETS
)
196 ## In the standalone tarfile, the clean rule runs this.
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
205 umask
022; $(MKDIR_P
) "$(DESTDIR)$(dvidir)"
206 $(INSTALL_DATA
) $(DVI_TARGETS
) "$(DESTDIR)$(dvidir)"
208 umask
022; $(MKDIR_P
) "$(DESTDIR)$(htmldir)"
209 $(INSTALL_DATA
) $(HTML_TARGETS
) "$(DESTDIR)$(htmldir)"
211 umask
022;$(MKDIR_P
) "$(DESTDIR)$(pdfdir)"
212 $(INSTALL_DATA
) $(PDF_TARGETS
) "$(DESTDIR)$(pdfdir)"
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}"; \
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
229 for file in
$(DVI_TARGETS
); do \
230 rm -f
"$(DESTDIR)$(dvidir)/$${file}"; \
233 for file in
$(HTML_TARGETS
); do \
234 rm -f
"$(DESTDIR)$(htmldir)/$${file}"; \
237 ext
= ; [ -n
"${GZIP_PROG}" ] && ext
=.gz
; \
238 for file in
$(PS_TARGETS
); do \
239 rm -f
"$(DESTDIR)$(psdir)/$${file}$${ext}"; \
242 for file in
$(PDF_TARGETS
); do \
243 rm -f
"$(DESTDIR)$(pdfdir)/$${file}"; \
246 uninstall-doc
: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
249 ### Makefile ends here