1### @configure_input@ 2 3# Copyright (C) 1994, 1996-2021 Free Software Foundation, Inc. 4 5# This file is part of GNU Emacs. 6 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. 11 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. 16 17# You should have received a copy of the GNU General Public License 18# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 19 20SHELL = @SHELL@ 21 22# NB If you add any more configure variables, 23# update the sed rules in the dist target below. 24 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. 27srcdir=@srcdir@ 28 29top_srcdir = @top_srcdir@ 30 31version = @version@ 32 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. 38buildinfodir = $(srcdir)/../../info 39# Directory with the (customized) texinfo.tex file. 40texinfodir = $(srcdir)/../misc 41 42prefix = @prefix@ 43datarootdir = @datarootdir@ 44datadir = @datadir@ 45PACKAGE_TARNAME = @PACKAGE_TARNAME@ 46docdir = @docdir@ 47dvidir = @dvidir@ 48htmldir = @htmldir@ 49pdfdir = @pdfdir@ 50psdir = @psdir@ 51 52MKDIR_P = @MKDIR_P@ 53 54GZIP_PROG = @GZIP_PROG@ 55 56HTML_OPTS = --no-split --html 57 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# https://lists.gnu.org/r/emacs-devel/2011-01/msg01182.html 62INFO_OPTS= --no-split 63 64INSTALL = @INSTALL@ 65INSTALL_DATA = @INSTALL_DATA@ 66 67# The makeinfo program is part of the Texinfo distribution. 68# Use --force so that it generates output even if there are errors. 69MAKEINFO = @MAKEINFO@ 70MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir) 71 72TEXI2DVI = texi2dvi 73TEXI2PDF = texi2pdf 74DVIPS = dvips 75 76# 'make' verbosity. 77AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 78 79AM_V_GEN = $(am__v_GEN_@AM_V@) 80am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 81am__v_GEN_0 = @echo " GEN " $@; 82am__v_GEN_1 = 83 84ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \ 85 MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" 86 87DVI_TARGETS = emacs.dvi emacs-xtra.dvi 88HTML_TARGETS = emacs.html 89PDF_TARGETS = emacs.pdf emacs-xtra.pdf 90PS_TARGETS = emacs.ps emacs-xtra.ps 91 92EMACS_XTRA= \ 93 ${srcdir}/emacs-xtra.texi \ 94 $(srcdir)/arevert-xtra.texi \ 95 $(srcdir)/cal-xtra.texi \ 96 $(srcdir)/dired-xtra.texi \ 97 ${srcdir}/docstyle.texi \ 98 $(srcdir)/picture-xtra.texi \ 99 $(srcdir)/emerge-xtra.texi \ 100 $(srcdir)/vc-xtra.texi \ 101 $(srcdir)/vc1-xtra.texi \ 102 $(srcdir)/fortran-xtra.texi \ 103 $(srcdir)/msdos-xtra.texi 104 105EMACSSOURCES= \ 106 ${srcdir}/emacs.texi \ 107 ${srcdir}/emacsver.texi \ 108 ${srcdir}/doclicense.texi \ 109 ${srcdir}/gpl.texi \ 110 ${srcdir}/screen.texi \ 111 ${srcdir}/commands.texi \ 112 ${srcdir}/entering.texi \ 113 ${srcdir}/basic.texi \ 114 ${srcdir}/mini.texi \ 115 ${srcdir}/m-x.texi \ 116 ${srcdir}/help.texi \ 117 ${srcdir}/mark.texi \ 118 ${srcdir}/killing.texi \ 119 ${srcdir}/regs.texi \ 120 ${srcdir}/display.texi \ 121 ${srcdir}/search.texi \ 122 ${srcdir}/fixit.texi \ 123 ${srcdir}/files.texi \ 124 ${srcdir}/buffers.texi \ 125 ${srcdir}/windows.texi \ 126 ${srcdir}/frames.texi \ 127 ${srcdir}/mule.texi \ 128 ${srcdir}/modes.texi \ 129 ${srcdir}/indent.texi \ 130 ${srcdir}/text.texi \ 131 ${srcdir}/programs.texi \ 132 ${srcdir}/building.texi \ 133 ${srcdir}/maintaining.texi \ 134 ${srcdir}/abbrevs.texi \ 135 ${srcdir}/sending.texi \ 136 ${srcdir}/rmail.texi \ 137 ${srcdir}/dired.texi \ 138 ${srcdir}/calendar.texi \ 139 ${srcdir}/misc.texi \ 140 ${srcdir}/package.texi \ 141 ${srcdir}/custom.texi \ 142 ${srcdir}/trouble.texi \ 143 ${srcdir}/cmdargs.texi \ 144 ${srcdir}/xresources.texi \ 145 ${srcdir}/anti.texi \ 146 ${srcdir}/macos.texi \ 147 ${srcdir}/msdos.texi \ 148 ${srcdir}/gnu.texi \ 149 ${srcdir}/glossary.texi \ 150 ${srcdir}/ack.texi \ 151 ${srcdir}/kmacro.texi \ 152 $(EMACS_XTRA) 153 154## Disable implicit rules. 155%.texi: ; 156 157.PHONY: info dvi html pdf ps 158 159info: $(buildinfodir)/emacs.info 160dvi: $(DVI_TARGETS) 161html: $(HTML_TARGETS) 162pdf: $(PDF_TARGETS) 163ps: $(PS_TARGETS) 164 165## The info/ directory exists in release tarfiles but not the repository. 166${buildinfodir}: 167 ${MKDIR_P} $@ 168 169# Note that all the Info targets build the Info files in srcdir. 170# There is no provision for Info files to exist in the build directory. 171# In a distribution of Emacs, the Info files should be up to date. 172$(buildinfodir)/emacs.info: ${EMACSSOURCES} | ${buildinfodir} 173 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $< 174 175emacs.dvi: ${EMACSSOURCES} 176 $(ENVADD) $(TEXI2DVI) $< 177 178emacs.pdf: ${EMACSSOURCES} 179 $(ENVADD) $(TEXI2PDF) $< 180 181emacs.html: ${EMACSSOURCES} 182 $(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $< 183 184emacs-xtra.dvi: $(EMACS_XTRA) 185 $(ENVADD) $(TEXI2DVI) $< 186 187emacs-xtra.pdf: $(EMACS_XTRA) 188 $(ENVADD) $(TEXI2PDF) $< 189 190%.ps: %.dvi 191 $(DVIPS) -o $@ $< 192 193.PHONY: doc-emacsver 194 195# If configure were to just generate emacsver.texi from emacsver.texi.in 196# in the normal way, the timestamp of emacsver.texi would always be 197# newer than that of the info files, which are prebuilt in release tarfiles. 198# So we use this rule, and move-if-change, to avoid that. 199doc-emacsver: 200 sed 's/[@]version@/${version}/' \ 201 ${srcdir}/emacsver.texi.in > emacsver.texi.$$$$ && \ 202 ${top_srcdir}/build-aux/move-if-change emacsver.texi.$$$$ \ 203 ${srcdir}/emacsver.texi 204 205.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean 206 207## Temp files. 208mostlyclean: 209 rm -f ./*.aux ./*.log ./*.toc ./*.cp ./*.cps ./*.fn ./*.fns ./*.ky ./*.kys \ 210 ./*.op ./*.ops ./*.pg ./*.pgs ./*.tp ./*.tps ./*.vr ./*.vrs 211 212## Products not in the release tarfiles. 213clean: mostlyclean 214 rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) 215 216distclean: clean 217 rm -f Makefile 218 219## In the standalone tarfile, the clean rule runs this. 220infoclean: 221 rm -f \ 222 $(buildinfodir)/emacs.info \ 223 $(buildinfodir)/emacs.info-[1-9] \ 224 $(buildinfodir)/emacs.info-[1-9][0-9] 225 226bootstrap-clean maintainer-clean: distclean infoclean 227 rm -f ${srcdir}/emacsver.texi 228 229.PHONY: install-dvi install-html install-pdf install-ps install-doc 230 231install-dvi: dvi 232 umask 022; $(MKDIR_P) "$(DESTDIR)$(dvidir)" 233 $(INSTALL_DATA) $(DVI_TARGETS) "$(DESTDIR)$(dvidir)" 234install-html: html 235 umask 022; $(MKDIR_P) "$(DESTDIR)$(htmldir)" 236 $(INSTALL_DATA) $(HTML_TARGETS) "$(DESTDIR)$(htmldir)" 237install-pdf: pdf 238 umask 022;$(MKDIR_P) "$(DESTDIR)$(pdfdir)" 239 $(INSTALL_DATA) $(PDF_TARGETS) "$(DESTDIR)$(pdfdir)" 240install-ps: ps 241 umask 022; $(MKDIR_P) "$(DESTDIR)$(psdir)" 242 for file in $(PS_TARGETS); do \ 243 $(INSTALL_DATA) $${file} "$(DESTDIR)$(psdir)"; \ 244 [ -n "${GZIP_PROG}" ] || continue; \ 245 rm -f "$(DESTDIR)$(psdir)/$${file}.gz"; \ 246 ${GZIP_PROG} -9n "$(DESTDIR)$(psdir)/$${file}"; \ 247 done 248 249## Top-level Makefile installs the Info manuals. 250install-doc: install-dvi install-html install-pdf install-ps 251 252 253.PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc 254 255uninstall-dvi: 256 for file in $(DVI_TARGETS); do \ 257 rm -f "$(DESTDIR)$(dvidir)/$${file}"; \ 258 done 259uninstall-html: 260 for file in $(HTML_TARGETS); do \ 261 rm -f "$(DESTDIR)$(htmldir)/$${file}"; \ 262 done 263uninstall-ps: 264 ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \ 265 for file in $(PS_TARGETS); do \ 266 rm -f "$(DESTDIR)$(psdir)/$${file}$${ext}"; \ 267 done 268uninstall-pdf: 269 for file in $(PDF_TARGETS); do \ 270 rm -f "$(DESTDIR)$(pdfdir)/$${file}"; \ 271 done 272 273uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps 274 275 276### Makefile ends here 277