3 # Copyright (C) 1992-2021 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 <https://www.gnu.org/licenses/>.
22 # make all to compile and build Emacs.
23 # make install to install it.
24 # make TAGS to update tags tables.
26 # make clean or make mostlyclean
27 # Delete all files from the current directory that are normally
28 # created by building the program. Don't delete the files that
29 # record the configuration. Also preserve files that could be made
30 # by building, but normally aren't because the distribution comes
33 # Delete '.dvi' files here if they are not part of the distribution.
36 # Delete all files from the current directory that are created by
37 # configuring or building the program. If you have unpacked the
38 # source and built the program without creating any other files,
39 # 'make distclean' should leave only the files that were in the
42 # make maintainer-clean
43 # Delete everything from the current directory that can be
44 # reconstructed with this Makefile. This typically includes
45 # everything deleted by distclean, plus more: .elc files,
46 # C source files produced by Bison, tags tables, info files,
50 # Still more severe - delete backup and autosave files, too.
53 # Removes all the compiled files to force a new bootstrap from a
54 # clean slate, and then build in the normal way.
57 # Make Emacs documentation files from their sources; requires makeinfo.
59 # make check (or check-expensive or check-all)
60 # Run the Emacs test suite.
61 # check-expensive includes additional tests that can be slow.
62 # check-all runs all tests, including ones that can be slow, or
69 # This only matters when inheriting a CDPATH not starting with the
73 # ==================== Things 'configure' Might Edit ====================
75 cache_file
= @cache_file@
76 CONFIGURE_FLAGS
= --cache-file
=$(cache_file
)
82 ### These help us choose version- and architecture-specific directories
83 ### to install files in.
85 ### This should be the number of the Emacs version we're building,
86 ### like '24.5' or '25.0.50'.
89 ### This should be the name of the configuration we're building Emacs
90 ### for, like 'x86_64-unknown-linux-gnu' or 'powerpc-ibm-aix7.1.2.0'.
91 configuration
=@configuration@
93 ### The nt/ subdirectory gets built only for MinGW
96 top_builddir
= @top_builddir@
97 -include ${top_builddir}/src
/verbose.mk
99 FIND_DELETE
= @FIND_DELETE@
101 HAVE_NATIVE_COMP
= @HAVE_NATIVE_COMP@
103 # ==================== Where To Install Things ====================
105 # Location to install Emacs.app under GNUstep / macOS.
106 # Later values may use these.
107 ns_appbindir
=@ns_appbindir@
108 ns_appresdir
=@ns_appresdir@
109 # Either yes or no depending on whether this is a relocatable Emacs.app.
110 ns_self_contained
=@ns_self_contained@
112 # The default location for installation. Everything is placed in
113 # subdirectories of this directory. The default values for many of
114 # the variables below are expressed in terms of this one, so you may
115 # not need to change them. This defaults to /usr/local.
118 # Like 'prefix', but used for architecture-specific files.
119 exec_prefix=@
exec_prefix@
121 # Where to install Emacs and other binaries that people will want to
122 # run directly (like etags).
125 # The root of the directory tree for read-only architecture-independent
126 # data files. ${datadir}, ${infodir} and ${mandir} are based on this.
127 datarootdir
=@datarootdir@
129 # Where to install architecture-independent data files. ${lispdir}
130 # and ${etcdir} are subdirectories of this.
133 # Where to install and expect the files that Emacs modifies as it
134 # runs. These files are all architecture-independent.
135 # Right now, this is not used.
136 sharedstatedir
=@sharedstatedir@
138 # Where to install and expect executable files to be run by Emacs
139 # rather than directly by users (and other architecture-dependent
140 # data, although Emacs does not have any). The executables
141 # are actually installed in ${archlibdir}, which is (normally)
142 # a subdirectory of this.
143 libexecdir
=@libexecdir@
145 # Currently only used for the systemd service file.
148 # Where to install emacs-module.h.
149 includedir=@
includedir@
151 # Where to install Emacs's man pages.
152 # Note they contain cross-references that expect them to be in section 1.
154 man1dir=$(mandir)/man1
156 # Where to install and expect the info files describing Emacs.
158 # Info files not in the doc/misc directory (we get those via make echo-info).
159 INFO_NONMISC
=emacs.
info eintr.
info elisp.
info
161 # Directory for local state files for all programs.
162 localstatedir
=@localstatedir@
164 # Where to look for bitmap files.
165 bitmapdir
=@bitmapdir@
167 # Where to find the source code. The source code for Emacs's C kernel is
168 # expected to be in ${srcdir}/src, and the source code for Emacs's
169 # utility programs is expected to be in ${srcdir}/lib-src. This is
170 # set by the configure script's '--srcdir' option.
172 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
174 abs_srcdir
=@abs_srcdir@
176 # Where the manpage source files are kept.
177 mansrcdir
=$(srcdir)/doc
/man
179 # Tell make where to find source files; this is needed for the makefiles.
182 # Where to find the application default.
183 x_default_search_path
=@x_default_search_path@
185 # Where the etc/emacs.desktop file is to be installed.
186 desktopdir
=$(datarootdir
)/applications
188 # Where the etc/emacs.appdata.xml file is to be installed.
189 appdatadir
=$(datarootdir
)/metainfo
191 # Where the etc/emacs.service file is to be installed.
192 # The system value (typically /usr/lib/systemd/user) can be
193 # obtained with: pkg-config --variable=systemduserunitdir systemd
194 # but that does not respect configure's prefix.
195 # It is not clear where we should install this file when
196 # prefix != /usr (or /usr/local?) (eg for non-root installs).
197 # Other options include ~/.config/systemd/user/,
198 # $XDG_RUNTIME_DIR/systemd/user/
199 # It seems the user may end up having to make a manual link...
200 systemdunitdir
=$(libdir)/systemd
/user
202 # Where the etc/images/icons/hicolor directory is to be installed.
203 icondir
=$(datarootdir
)/icons
205 # The source directory for the icon files.
206 iconsrcdir
=$(srcdir)/etc
/images
/icons
208 # ==================== Emacs-specific directories ====================
210 # These variables hold the values Emacs will actually use. They are
211 # based on the values of the standard Make variables above.
213 # Where lisp files are installed in a distributed with Emacs (relative
214 # path to the installation directory).
215 lispdirrel
=@lispdirrel@
217 # Where to install the lisp files distributed with Emacs.
218 # This includes the Emacs version, so that the lisp files for different
219 # versions of Emacs will install themselves in separate directories.
222 # Directories Emacs should search for standard lisp files.
223 # The default is ${lispdir}.
224 standardlisppath
=@standardlisppath@
226 # Directories Emacs should search for lisp files specific to this
227 # site (i.e. customizations), before consulting ${standardlisppath}.
228 # This should be a colon-separated list of directories.
229 locallisppath
=@locallisppath@
231 # Where Emacs will search to find its lisp files. Before
232 # changing this, check to see if your purpose wouldn't
233 # better be served by changing locallisppath. This
234 # should be a colon-separated list of directories.
235 # The default is ${locallisppath}:${standardlisppath}.
238 # Where Emacs will search for its lisp files while building.
239 # This is only used during the process of compiling Emacs,
240 # to help Emacs find its lisp files before they've been installed
241 # in their final location.
242 # This should be a colon-separated list of directories.
243 # Normally it points to the lisp/ directory in the sources.
244 # NB lread.c relies on lisp/ being first here.
245 buildlisppath
=${abs_srcdir}/lisp
247 # Where to install the other architecture-independent
248 # data files distributed with Emacs (like the tutorial,
249 # the cookie recipes and the Zippy database). This path
250 # usually contains the Emacs version number, so the data
251 # files for multiple versions of Emacs may be installed
255 # Where to put executables to be run by Emacs rather than
256 # the user. This path usually includes the Emacs version
257 # and configuration name, so that multiple configurations
258 # for multiple versions of Emacs may be installed at
260 archlibdir
=@archlibdir@
262 # Where to put the etc/DOC file.
263 etcdocdir
=@etcdocdir@
265 # User or group of the auxiliary program update-game-score, which is
266 # installed on platforms with a game directory shared by multiple users.
267 # On other platforms Emacs can update the score files itself.
269 gamegroup
=@gamegroup@
270 # Where to install game score files, if gameuser or gamegroup is nonempty.
272 # Nonempty if and only if a shared gamedir is used.
273 use_gamedir
=$(gameuser
)$(gamegroup
)
275 # ==================== Utility Programs for the Build ====================
277 # Allow the user to specify the install program.
278 # Note that if the system does not provide a suitable install,
279 # configure will use build-aux/install-sh. Annoyingly, it does
280 # not use an absolute path. So we must take care to always run
281 # INSTALL-type commands from the directory containing the Makefile.
282 # This explains (I think) the cd thisdir seen in several install rules.
284 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
285 INSTALL_DATA
= @INSTALL_DATA@
286 INSTALL_INFO
= @INSTALL_INFO@
287 # By default, we uphold the dignity of our programs.
290 # Create a link to a file in the same directory as the target.
291 LN_S_FILEONLY
= @LN_S_FILEONLY@
293 # We use gzip to compress installed .el and some .txt files.
294 GZIP_PROG
= @GZIP_PROG@
296 # ============================= Targets ==============================
298 # Program name transformation.
299 TRANSFORM
= @program_transform_name@
301 # What emacs should be called when installed.
302 EMACS_NAME
= `echo emacs | sed '$(TRANSFORM)'`
303 EMACS
= ${EMACS_NAME}${EXEEXT}
304 EMACSFULL
= `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT}
306 # Subdirectories to make recursively.
307 SUBDIR
= $(NTDIR
) lib lib-src src lisp
309 # The subdir makefiles created by config.status.
310 SUBDIR_MAKEFILES_IN
= @SUBDIR_MAKEFILES_IN@
311 SUBDIR_MAKEFILES
= $(patsubst ${srcdir}/%,%,${SUBDIR_MAKEFILES_IN
:.in
=})
313 # Non-makefile files created by config.status.
314 CONFIG_STATUS_FILES_IN
= \
315 ${srcdir}/nt
/emacs.rc.in
${srcdir}/nt
/emacsclient.rc.in \
316 ${srcdir}/doc
/man
/emacs
.1.in
${srcdir}/src
/emacs-module.h.in \
317 ${srcdir}/src
/module-env-
*.h
319 # Subdirectories to install, and where they'll go. lib-src's and nt's
320 # makefiles know how to install them, so we don't do that here.
321 # Directories that cannot simply be copied, eg info, are treated
323 COPYDIR
= ${srcdir}/etc
${srcdir}/lisp
324 COPYDESTS
= "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
326 ifeq (${ns_self_contained},no
)
327 BIN_DESTDIR
='$(DESTDIR)${bindir}/'
328 ELN_DESTDIR
= $(DESTDIR
)${libdir}/emacs
/${version}/
330 BIN_DESTDIR
='${ns_appbindir}/'
331 ELN_DESTDIR
= ${ns_appresdir}/
336 .PHONY
: all ${SUBDIR} blessmail epaths-force epaths-force-w32 etc-emacsver
338 # If configure were to just generate emacsver.tex from emacsver.tex.in
339 # in the normal way, the timestamp of emacsver.tex would always be
340 # newer than that of the pdf files, which are prebuilt in release tarfiles.
341 # So we use this rule, and move-if-change, to avoid that.
343 majorversion
=`echo ${version} | sed 's/\..*//'`; \
344 sed
"s/[@]majorversion@/$${majorversion}/" \
345 ${srcdir}/etc
/refcards
/emacsver.
tex.in
> emacsver.
tex.
$$$$ && \
346 ${srcdir}/build-aux
/move-if-change emacsver.
tex.
$$$$ \
347 ${srcdir}/etc
/refcards
/emacsver.
tex
349 # The shared gamedir name as a C string literal, or a null ptr if not in use.
350 PATH_GAME
= $(if
$(use_gamedir
),"$(gamedir)",((char const
*) 0))
352 # Generate epaths.h from epaths.in. This target is invoked by 'configure'.
353 # See comments in configure.ac for why it is done this way, as opposed
354 # to just letting configure generate epaths.h from epaths.in in a
355 # similar way to how Makefile is made from Makefile.in.
357 @for
dir in
'$(abs_srcdir)' '$(lispdir)' '$(archlibdir)'; do \
360 printf
>&2 "Build or installation directory '%s'\\n" "$$dir"; \
361 echo
>&2 "cannot contain ':'."; \
365 @
(gamedir
='${gamedir}'; \
366 sed
< ${srcdir}/src
/epaths.in
> epaths.h.
$$$$ \
367 -e
's;\(#.*PATH_LOADSEARCH\).*$$;\1 "${standardlisppath}";' \
368 -e
's;\(#.*PATH_REL_LOADSEARCH\).*$$;\1 "${lispdirrel}";' \
369 -e
's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "${locallisppath}";' \
370 -e
's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "${buildlisppath}";' \
371 -e
'/^#define PATH_[^ ]*SEARCH /s/\([":]\):*/\1/g' \
372 -e
'/^#define PATH_[^ ]*SEARCH /s/:"/"/' \
373 -e
's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
374 -e
's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
375 -e
's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
376 -e
's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
377 -e
's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \
378 -e
's;\(#.*PATH_GAME\).*$$;\1 $(PATH_GAME);' \
379 -e
's;\(#.*PATH_DOC\).*$$;\1 "${etcdocdir}";') && \
380 ${srcdir}/build-aux
/move-if-change epaths.h.
$$$$ src
/epaths.h
382 # The w32 build needs a slightly different editing, and it uses
383 # nt/epaths.nt as the template.
385 # Use the value of ${locallisppath} supplied by 'configure',
386 # to support the --enable-locallisppath argument.
388 # In this case, the paths written to 'src/epaths.h' must be in native
389 # MS-Windows format (e.g. 'c:/foo/bar'), because temacs is a MinGW
390 # program that doesn't support MSYS-style paths (e.g. '/c/foo/bar' or
393 @
(w32srcdir
=`${srcdir}/build-aux/msys-to-w32 "${abs_srcdir}"`; \
394 w32prefix
=`${srcdir}/build-aux/msys-to-w32 "${prefix}"`; \
395 w32locallisppath
=`${srcdir}/build-aux/msys-to-w32 "${locallisppath}"` ; \
396 w32locallisppath
=$${w32locallisppath
//$${w32prefix}/"%emacs_dir%"} ; \
397 sed
< ${srcdir}/nt
/epaths.nt
> epaths.h.
$$$$ \
398 -e
's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${w32locallisppath//;/\\;}"'";' \
399 -e
's;\(#.*PATH_REL_LOADSEARCH\).*$$;\1 "${lispdirrel}";' \
400 -e
'/^.*#/s/@VER@/${version}/g' \
401 -e
'/^.*#/s/@CFG@/${configuration}/g' \
402 -e
"/^.*#/s|@SRC@|$${w32srcdir}|g") && \
403 ${srcdir}/build-aux
/move-if-change epaths.h.
$$$$ src
/epaths.h
405 lib-src src
: $(NTDIR
) lib
409 # We need to build 'emacs' in 'src' to compile the *.elc files in 'lisp'.
412 # These targets should be "${SUBDIR} without 'src'".
413 lib lib-src lisp nt
: Makefile
416 # Ideally, VCSWITNESS should be a file that is modified whenever the
417 # repository registers a commit from either a local checkin or a
418 # repository pull. In git there is no single file that guarantees
419 # this, but the local log for the current head should be close enough.
421 # Pass an unexpanded $srcdir to src's Makefile, which then
422 # expands it using its own value of srcdir (which points to the
423 # source directory of src/).
424 dirstate
= .git
/logs
/HEAD
425 VCSWITNESS
= $(if
$(wildcard $(srcdir)/$(dirstate
)),$$(srcdir)/..
/$(dirstate
))
427 $(MAKE
) -C
$@ VCSWITNESS
='$(VCSWITNESS)' BIN_DESTDIR
='$(BIN_DESTDIR)' \
428 ELN_DESTDIR
='$(ELN_DESTDIR)' all
430 blessmail
: Makefile src
431 $(MAKE
) -C lib-src maybe-blessmail
433 # We used to have one rule per */Makefile.in, but that leads to race
434 # conditions with parallel makes, so assume that the timestamp on
435 # ./Makefile represents the timestamp on all the other Makefiles.
436 # Similarly, assume the timestamp on ./configure represents the
437 # timestamp on src/config.in.
439 # config.status overrides MAKEFILE_NAME with a bogus name when creating
440 # src/epaths.h, so that 'make epaths-force' does not recursively invoke
441 # config.status and overwrite config.status while executing it (Bug#11214).
443 # 'make bootstrap' overrides MAKEFILE_NAME to a nonexistent file but
444 # then attempts to build that file. This forces 'Makefile', 'lib/Makefile',
445 # etc. to be built without running into similar recursion problems.
446 MAKEFILE_NAME
= Makefile
447 $(MAKEFILE_NAME
): config.status
$(srcdir)/configure \
448 $(srcdir)/lib
/gnulib.mk.in \
449 $(srcdir)/Makefile.in
$(SUBDIR_MAKEFILES_IN
) $(CONFIG_STATUS_FILES_IN
)
450 MAKE
='$(MAKE)' .
/config.status
452 # Don't erase these files if make is interrupted while refreshing them.
453 .PRECIOUS
: Makefile config.status
455 config.status
: ${srcdir}/configure
456 if
[ -x .
/config.status
]; then \
457 $(CFG
) .
/config.status
--recheck
; \
459 $(CFG
) $(srcdir)/configure
$(CONFIGURE_FLAGS
); \
462 $(srcdir)/configure
: $(srcdir)/configure.ac
$(srcdir)/m4
/*.m4
463 cd
$(srcdir) && .
/autogen.sh autoconf
465 # ==================== Installation ====================
467 .PHONY
: install install-arch-dep install-arch-indep install-etcdoc install-info
468 .PHONY
: install-man install-etc install-strip install-
$(NTDIR
) install-eln
469 .PHONY
: uninstall uninstall-
$(NTDIR
)
471 ## If we let lib-src do its own installation, that means we
472 ## don't have to duplicate the list of utilities to install in
473 ## this Makefile as well.
475 install: all install-arch-indep install-etcdoc install-arch-dep install-
$(NTDIR
) blessmail install-eln
478 ## Ensure that $subdir contains a subdirs.el file.
479 ## Here and elsewhere, we set the umask so that any created files are
481 ## TODO it might be good to warn about non-standard permissions of
482 ## pre-existing directories, but that does not seem easy.
483 write_subdir
=if
[ -f
"$${subdir}/subdirs.el" ]; \
487 ${MKDIR_P} "$${subdir}"; \
488 (echo
"(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
489 echo
" (normal-top-level-add-subdirs-to-load-path))") \
490 > "$${subdir}/subdirs.el"; \
493 ### Install the executables that were compiled specifically for this machine.
494 ### We do install-arch-indep first because the executable needs the
495 ### Lisp files and DOC file to work properly.
496 install-arch-dep
: src install-arch-indep install-etcdoc install-
$(NTDIR
)
497 umask
022; ${MKDIR_P} "$(DESTDIR)${bindir}"
498 $(MAKE
) -C lib-src
install
499 ifeq (${ns_self_contained},no
)
500 ${INSTALL_PROGRAM} $(INSTALL_STRIP
) src
/emacs
${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)"
501 ifeq (${DUMPING},pdumper
)
502 ${INSTALL_DATA} src
/emacs.pdmp
"$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs.pdmp
504 -chmod
755 "$(DESTDIR)${bindir}/$(EMACSFULL)"
506 rm -f
"$(DESTDIR)${bindir}/$(EMACS)"
507 cd
"$(DESTDIR)${bindir}" && $(LN_S_FILEONLY
) "$(EMACSFULL)" "$(EMACS)"
510 subdir
=${ns_appresdir}/site-lisp
&& ${write_subdir}
511 rm -rf
${ns_appresdir}/share
514 ### Windows-specific install target for installing programs produced
515 ### in nt/, and its Posix do-nothing shadow.
518 $(MAKE
) -C
$(NTDIR
) install
520 ## In the share directory, we are deleting:
521 ## applications (with emacs.desktop, also found in etc/)
522 ## emacs (basically empty except for unneeded site-lisp directories)
523 ## icons (duplicates etc/images/icons/hicolor)
525 ## This is install-etc for everything except self-contained-ns builds.
526 ## For them, it is empty.
527 INSTALL_ARCH_INDEP_EXTRA
= @INSTALL_ARCH_INDEP_EXTRA@
529 ## https://lists.gnu.org/r/emacs-devel/2007-10/msg01672.html
530 ## Needs to be the user running install, so configure can't set it.
531 set_installuser
=for installuser in
$${LOGNAME} $${USERNAME} $${USER} \
532 `(id -u) 2> /dev/null`; do \
533 [ -n
"$${installuser}" ] && break
; \
535 installgroup
=`(id -g) 2>/dev/null` && [ -n
"$$installgroup" ] && \
536 installuser
=$$installuser:$$installgroup
538 ### Install the files that are machine-independent.
539 ### Most of them come straight from the distribution; the exception is
540 ### the DOC file, which is copied from the build directory.
542 ## We delete each directory in ${COPYDESTS} before we copy into it;
543 ## that way, we can reinstall over directories that have been put in
544 ## place with their files read-only (perhaps because they are checked
545 ## into RCS). In order to make this safe, we make sure that the
546 ## source exists and is distinct from the destination.
548 ## We delete etc/DOC* because there may be irrelevant DOC files from
549 ## other builds in the source directory. This is ok because we just
550 ## deleted the entire installed etc/ directory and recreated it.
551 ## install-etcdoc installs the relevant DOC.
553 ## Note that we install etc/refcards/*.ps if present.
554 ## TODO we should compress these if GZIP_PROG is set.
555 ## It would be simpler to have a separate install rule for etc/refcards
556 ## (maybe move it to doc/refcards?).
558 ## Note that the Makefiles in the etc directory are potentially useful
559 ## in an installed Emacs, so should not be excluded.
561 ## We always create the _default_ locallisppath directories, and
562 ## ensure that they contain a subdirs.el file (via write_subdir).
563 ## This is true even if locallisppath has a non-default value.
564 ## In case of non-default value, we used to create the specified directories,
565 ## but not add subdirs.el to them. This was a strange halfway house.
566 ## Nowadays we do not create non-default directories.
568 ## Note that we use tar instead of plain old cp -R/-r because the latter
569 ## is apparently not portable (even in 2012!).
570 ## https://lists.gnu.org/r/emacs-devel/2012-05/msg00278.html
571 ## I have no idea which platforms Emacs supports where cp -R does not
572 ## work correctly, and therefore no idea when tar can be replaced.
573 ## See also these comments from 2004 about cp -r working fine:
574 ## https://lists.gnu.org/r/autoconf-patches/2004-11/msg00005.html
575 install-arch-indep
: lisp install-info install-man
${INSTALL_ARCH_INDEP_EXTRA}
576 umask
022 && $(MKDIR_P
) "$(DESTDIR)$(includedir)"
577 $(INSTALL_DATA
) src
/emacs-module.h
"$(DESTDIR)$(includedir)/emacs-module.h"
578 -set
${COPYDESTS} ; \
580 $(set_installuser
); \
581 for
dir in
${COPYDIR} ; do \
582 [ -d
$${dir} ] || exit
1 ; \
583 dest
="$$1" ; shift
; \
584 if
[ -d
"$${dest}" ]; then \
585 exp_dest
=`cd "$${dest}" && /bin/pwd`; \
586 [ "$$exp_dest" = "`cd $${dir} && /bin/pwd`" ] && continue
; \
589 rm -rf
"$${dest}" ; \
590 umask
022; ${MKDIR_P} "$${dest}" ; \
591 printf
'Copying %s to %s...\n' "$$dir" "$$dest" ; \
592 (cd
$${dir}; tar -chf
- .
) \
593 |
(cd
"$${dest}"; umask
022; \
594 tar -xvf
- && cat
> /dev
/null
) || exit
1; \
595 if
[ "$${dir}" = "${srcdir}/etc" ]; then \
596 rm -f
"$${dest}/DOC"* ; \
597 rm -f
"$${dest}/refcards"/*.aux
"$${dest}/refcards"/*.
dvi; \
598 rm -f
"$${dest}/refcards"/*.log
"$${dest}/refcards"/*.in
; \
601 (cd
"$${dest}" || exit
1; \
602 for subdir in
`find . -type d -print` ; do \
603 chmod a
+rx
$${subdir} ; \
604 rm -f
$${subdir}/.gitignore
; \
605 rm -f
$${subdir}/.arch-inventory
; \
606 rm -f
$${subdir}/.DS_Store
; \
607 rm -f
$${subdir}/#* ; \
608 rm -f
$${subdir}/.
#* ; \
609 rm -f
$${subdir}/*~
; \
610 rm -f
$${subdir}/*.orig
; \
611 rm -f
$${subdir}/ChangeLog
* ; \
612 [ "$${dir}" != "${srcdir}/etc" ] && \
613 rm -f
$${subdir}/[mM
]akefile
*[.
-]in
$${subdir}/[mM
]akefile
; \
615 find
"$${dest}" -exec chown
$${installuser} {} ';' ;\
617 -rm -f
"$(DESTDIR)${lispdir}/subdirs.el"
618 umask
022; $(srcdir)/build-aux
/update-subdirs
"$(DESTDIR)${lispdir}"
619 subdir
="$(DESTDIR)${datadir}/emacs/${version}/site-lisp" ; \
621 subdir
="$(DESTDIR)${datadir}/emacs/site-lisp" ; \
622 ${write_subdir} || true
623 [ -z
"${GZIP_PROG}" ] ||
{ \
624 echo
"Compressing *.el etc. ..." && \
625 cd
"$(DESTDIR)${lispdir}" && \
626 for f in
`find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \
627 ${GZIP_PROG} -9n
"$$f"; \
629 ${GZIP_PROG} -9n
"../etc/publicsuffix.txt"; \
631 -chmod
-R a
+r
"$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
633 ## The above chmods are needed because "umask 022; tar ..." is not
634 ## guaranteed to do the right thing; eg if we are root and tar is
635 ## preserving source permissions.
637 ## Note that install-arch-indep deletes and recreates the entire
638 ## installed etc/ directory, so we need it to run before this does.
639 install-etcdoc
: src install-arch-indep
641 umask
022; ${MKDIR_P} "$(DESTDIR)${etcdocdir}" ; \
642 exp_etcdocdir
=`cd "$(DESTDIR)${etcdocdir}"; /bin/pwd`; \
643 if
[ "`cd ./etc; /bin/pwd`" != "$$exp_etcdocdir" ]; \
646 printf
'Copying %s to %s ...\n' "etc/$$docfile" \
647 "$(DESTDIR)${etcdocdir}"; \
648 ${INSTALL_DATA} etc
/$${docfile} "$(DESTDIR)${etcdocdir}/$${docfile}"; \
649 $(set_installuser
); \
650 chown
$${installuser} "$(DESTDIR)${etcdocdir}/$${docfile}" || true
; \
654 ## If info/dir is missing, but we have install-info, we should let
655 ## that handle it. If info/dir is present and we do not have install-info,
656 ## we should check for missing entries and add them by hand.
658 umask
022; ${MKDIR_P} "$(DESTDIR)${infodir}"
660 thisdir
=`/bin/pwd`; \
661 exp_infodir
=`cd "$(DESTDIR)${infodir}" && /bin/pwd`; \
662 if
[ "`cd ${srcdir}/info && /bin/pwd`" = "$$exp_infodir" ]; then \
665 [ -f
"$(DESTDIR)${infodir}/dir" ] || \
666 [ ! -f
${srcdir}/info/dir ] || \
667 ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \
668 info_misc
=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \
669 cd
${srcdir}/info ; \
670 for elt in
${INFO_NONMISC} $${info_misc}; do \
671 for f in
`ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
673 ${INSTALL_DATA} ${srcdir}/info/$$f "$(DESTDIR)${infodir}/$$f"); \
674 [ -n
"${GZIP_PROG}" ] || continue
; \
675 rm -f
"$(DESTDIR)${infodir}/$$f.gz"; \
676 ${GZIP_PROG} -9n
"$(DESTDIR)${infodir}/$$f"; \
679 ${INSTALL_INFO} --info-dir
="$(DESTDIR)${infodir}" "$(DESTDIR)${infodir}/$$elt"); \
683 ## "gzip || true" is because some gzips exit with non-zero status
684 ## if compression would not reduce the file size. Eg, the gzip in
685 ## OpenBSD 4.9 seems to do this (2013/03). In Emacs, this can
686 ## only happen with the tiny ctags.1 manpage. We don't really care if
687 ## ctags.1 is compressed or not. "gzip -f" is another option here,
688 ## but not sure if portable.
690 umask
022; ${MKDIR_P} "$(DESTDIR)${man1dir}"
691 thisdir
=`/bin/pwd`; \
693 for page in
*.1; do \
694 test "$$page" = ChangeLog
.1 && continue
; \
695 dest
=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
697 ${INSTALL_DATA} ${mansrcdir}/$${page} "$(DESTDIR)${man1dir}/$${dest}"); \
698 [ -n
"${GZIP_PROG}" ] || continue
; \
699 rm -f
"$(DESTDIR)${man1dir}/$${dest}.gz"; \
700 ${GZIP_PROG} -9n
"$(DESTDIR)${man1dir}/$${dest}" || true
; \
703 ## Install those items from etc/ that need to end up elsewhere.
705 ## If you prefer, choose "emacs22" at installation time.
706 ## Note: emacs22 does not have all the resolutions.
710 umask
022; ${MKDIR_P} "$(DESTDIR)${desktopdir}"
711 tmp
=etc
/emacs.tmpdesktop
; rm -f
$${tmp}; \
712 sed
-e
"/^Exec=emacs/ s/emacs/${EMACS_NAME}/" \
713 -e
"/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \
714 ${srcdir}/etc
/emacs.desktop
> $${tmp}; \
715 ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"; \
717 tmp
=etc
/emacsclient.tmpdesktop
; rm -f
$${tmp}; \
718 client_name
=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
719 sed
-e
"/^Exec=emacsclient/ s|emacsclient|${bindir}/$${client_name}|" \
720 -e
"/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \
721 ${srcdir}/etc
/emacsclient.desktop
> $${tmp}; \
722 ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}.desktop"; \
724 umask
022; ${MKDIR_P} "$(DESTDIR)${appdatadir}"
725 tmp
=etc
/emacs.tmpappdata
; rm -f
$${tmp}; \
726 sed
-e
"s/emacs\.desktop/${EMACS_NAME}.desktop/" \
727 ${srcdir}/etc
/emacs.appdata.xml
> $${tmp}; \
728 ${INSTALL_DATA} $${tmp} "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"; \
730 umask
022; $(MKDIR_P
) "$(DESTDIR)$(systemdunitdir)"
731 tmp
=etc
/emacs.tmpservice
; rm -f
$${tmp}; \
732 client_name
=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
734 -e
"/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \
735 -e
"/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \
736 -e
"/^ExecStop/ s|emacsclient|${bindir}/$${client_name}|" \
737 ${srcdir}/etc
/emacs.service
> $${tmp}; \
738 $(INSTALL_DATA
) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \
740 thisdir
=`/bin/pwd`; \
741 cd
${iconsrcdir} || exit
1; umask
022 ; \
742 for
dir in
*/*/apps
*/*/mimetypes
; do \
743 [ -d
$${dir} ] || continue
; \
744 ( cd
"$${thisdir}"; ${MKDIR_P} "$(DESTDIR)${icondir}/$${dir}" ) ; \
745 for icon in
$${dir}/${EMACS_ICON}[.
-]*; do \
746 [ -r
$${icon} ] || continue
; \
747 ext
=`echo "$${icon}" | sed -e 's|.*\.||'`; \
748 dest
=`echo "$${icon}" | sed -e 's|.*/||' -e "s|\\.$${ext}\$$||" -e 's/$(EMACS_ICON)/emacs/' -e '$(TRANSFORM)'`.
$${ext} ; \
749 ( cd
"$${thisdir}"; \
750 ${INSTALL_DATA} ${iconsrcdir}/$${icon} "$(DESTDIR)${icondir}/$${dir}/$${dest}" ) \
755 ### Install native compiled Lisp files.
757 ifeq ($(HAVE_NATIVE_COMP
),yes
)
758 find native-lisp
-type d
-exec
$(MKDIR_P
) "$(ELN_DESTDIR){}" \
; ; \
759 find native-lisp
-type f
-exec
${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \
;
762 ### Build Emacs and install it, stripping binaries while installing them.
764 $(MAKE
) INSTALL_STRIP
=-s
install
766 ### Delete all the installed files that the 'install' target would
767 ### create (but not the noninstalled files such as 'make all' would create).
769 ### Don't delete the lisp and etc directories if they're in the source tree.
770 uninstall: uninstall-
$(NTDIR
) uninstall-doc
771 rm -f
"$(DESTDIR)$(includedir)/emacs-module.h"
772 $(MAKE
) -C lib-src
uninstall
774 for
dir in
"$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do \
775 if
[ -d
"$${dir}" ]; then \
776 case
`cd "$${dir}" ; /bin/pwd` in \
777 "`cd ${srcdir} ; /bin/pwd`"* ) ;; \
778 * ) rm -rf
"$${dir}" ;; \
781 "$(DESTDIR)${datadir}/emacs/${version}"/* ) \
782 rm -rf
"$(DESTDIR)${datadir}/emacs/${version}" \
787 -rm -rf
"$(DESTDIR)${libexecdir}/emacs/${version}"
788 thisdir
=`/bin/pwd`; \
789 (info_misc
=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \
790 if cd
"$(DESTDIR)${infodir}"; then \
791 for elt in
${INFO_NONMISC} $${info_misc}; do \
793 $(INSTALL_INFO
) --remove
--info-dir
="$(DESTDIR)${infodir}" "$(DESTDIR)${infodir}/$$elt"); \
794 if
[ -n
"${GZIP_PROG}" ]; then \
795 ext
=.gz
; else ext
=; fi
; \
796 rm -f
$$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
799 (if
[ -n
"${GZIP_PROG}" ]; then \
800 ext
=.gz
; else ext
=; fi
; \
801 if cd
${mansrcdir}; then \
802 for page in
*.1; do \
803 rm -f
"$(DESTDIR)${man1dir}"/`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1$$ext; done
; \
805 rm -f
"$(DESTDIR)${bindir}/$(EMACS)" "$(DESTDIR)${bindir}/$(EMACSFULL)"
806 (if cd
"$(DESTDIR)${icondir}"; then \
807 rm -f hicolor
/*x
*/apps
/"${EMACS_NAME}.png" \
808 "hicolor/scalable/apps/${EMACS_NAME}.svg" \
809 "hicolor/scalable/apps/${EMACS_NAME}.ico" \
810 "hicolor/scalable/mimetypes/${EMACS_NAME}-document.svg" \
811 "hicolor/scalable/mimetypes/${EMACS_NAME}-document23.svg"; \
813 -rm -f
"$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
814 -rm -f
"$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"
815 -rm -f
"$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"
816 ifneq (,$(use_gamedir
))
817 for file in snake-scores tetris-scores
; do \
818 file
="$(DESTDIR)${gamedir}/$${file}"; \
819 [ -s
"$${file}" ] ||
rm -f
"$$file"; \
823 ### Windows-specific uninstall target for removing programs produced
824 ### in nt/, and its Posix do-nothing shadow.
827 $(MAKE
) -C
$(NTDIR
) uninstall
829 # ==================== Cleaning up and miscellanea ====================
831 .PHONY
: mostlyclean clean distclean bootstrap-clean maintainer-clean extraclean
836 define submake_template
839 $$(MAKE
) -C
$(1) $(2)
843 ### Like 'clean', but may refrain from deleting a few files that people
844 ### normally don't want to recompile. For example, the 'mostlyclean'
845 ### target for GCC does not delete 'libgcc.a', because recompiling it
846 ### is rarely necessary and takes a lot of time.
847 mostlyclean_dirs
= src oldXMenu lwlib lib lib-src nt doc
/emacs doc
/misc \
848 doc
/lispref doc
/lispintro
test
850 $(foreach dir,$(mostlyclean_dirs
),$(eval
$(call submake_template
,$(dir),mostlyclean)))
852 mostlyclean: $(mostlyclean_dirs
:=_mostlyclean
)
855 ### Delete all files from the current directory that are normally
856 ### created by building the program. Don't delete the files that
857 ### record the configuration. Also preserve files that could be made
858 ### by building, but normally aren't because the distribution comes
861 ### Delete '.dvi' files here if they are not part of the distribution.
862 clean_dirs
= $(mostlyclean_dirs
) nextstep admin
/charsets admin
/unidata
864 $(foreach dir,$(clean_dirs
),$(eval
$(call submake_template
,$(dir),clean)))
866 clean: $(clean_dirs
:=_clean
)
867 -rm -f .
/*.tmp etc
/*.tmp
*
872 ### Delete all files that need to be remade for a clean bootstrap.
874 rm -f config.cache config.log
${srcdir}/doc
/man
/emacs
.1
877 ### Delete all files from the current directory that are created by
878 ### configuring or building the program. If you have unpacked the
879 ### source and built the program without creating any other files,
880 ### 'make distclean' should leave only the files that were in the
884 rm -f config.status config.log~ \
885 Makefile makefile lib
/gnulib.mk
${SUBDIR_MAKEFILES}
887 distclean_dirs
= $(clean_dirs
) leim lisp admin
/grammars
889 $(foreach dir,$(distclean_dirs
),$(eval
$(call submake_template
,$(dir),distclean)))
891 distclean: $(distclean_dirs
:=_distclean
)
894 ### 'bootstrap-clean'
895 ### Delete everything that can be reconstructed by 'make' and that
896 ### needs to be deleted in order to force a bootstrap from a clean state.
897 $(foreach dir,$(distclean_dirs
),$(eval
$(call submake_template
,$(dir),bootstrap-clean
)))
899 bootstrap-clean
: $(distclean_dirs
:=_bootstrap-clean
)
900 [ ! -f config.log
] || mv
-f config.log config.log~
901 rm -rf
${srcdir}/info
902 rm -f
${srcdir}/etc
/refcards
/emacsver.
tex
905 ### 'maintainer-clean'
906 ### Delete everything from the current directory that can be
907 ### reconstructed with this Makefile. This typically includes
908 ### everything deleted by distclean, plus more: C source files
909 ### produced by Bison, tags tables, info files, and so on.
911 ### One exception, however: 'make maintainer-clean' should not delete
912 ### 'configure' even if 'configure' can be remade using a rule in the
913 ### Makefile. More generally, 'make maintainer-clean' should not delete
914 ### anything that needs to exist in order to run 'configure' and then
915 ### begin to build the program.
916 top_maintainer_clean
=\
918 rm -fr
${srcdir}/autom4te.cache
920 $(foreach dir,$(distclean_dirs
),$(eval
$(call submake_template
,$(dir),maintainer-clean
)))
922 maintainer-clean
: $(distclean_dirs
:=_maintainer-clean
)
923 rm -rf
${srcdir}/info
924 rm -f
${srcdir}/etc
/refcards
/emacsver.
tex
925 ${top_maintainer_clean}
927 ### This doesn't actually appear in the coding standards, but Karl
928 ### says GCC supports it, and that's where the configuration part of
929 ### the coding standards seem to come from. It's like distclean, but
930 ### it deletes backup and autosave files too.
931 extraclean
: maintainer-clean
932 -rm -f config-tmp-
* ${srcdir}/aclocal.m4
${srcdir}/configure \
933 ${srcdir}/src
/config.in
934 -[ "${srcdir}" = "." ] || \
935 find
${srcdir} '(' -name
'*~' -o
-name
'#*' ')' ${FIND_DELETE}
936 -find .
'(' -name
'*~' -o
-name
'#*' ')' ${FIND_DELETE}
938 # The src subdir knows how to do the right thing
939 # even when the build directory and source dir are different.
941 # FIXME: We used to include `src` in the dependencies, not sure why.
942 # I removed it because it causes `make tags` to build Emacs.
943 TAGS
tags: lib lib-src
# src
945 $(MAKE
) -C doc
/emacs
tags
946 $(MAKE
) -C doc
/lispintro
tags
947 $(MAKE
) -C doc
/lispref
tags
948 $(MAKE
) -C doc
/misc
tags
950 CHECK_TARGETS
= check check-maybe check-expensive check-all
951 .PHONY
: $(CHECK_TARGETS
)
952 $(CHECK_TARGETS
): all
960 cd
${srcdir}; .
/make-dist
962 DVIS
= lispref-dvi lispintro-dvi emacs-dvi misc-dvi
963 HTMLS
= lispref-html lispintro-html emacs-html misc-html
964 INFOS
= lispref-info lispintro-info emacs-info misc-info
965 PDFS
= lispref-pdf lispintro-pdf emacs-pdf misc-pdf
966 PSS
= lispref-ps lispintro-ps emacs-ps misc-ps
968 DOCS
= $(DVIS
) $(HTMLS
) $(INFOS
) $(PDFS
) $(PSS
)
970 $(MAKE
) -C doc
/$(subst -, ,$@
)
972 .PHONY
: $(DOCS
) docs pdf ps
973 .PHONY
: info dvi dist html info-dir check-info
975 ## TODO add etc/refcards.
979 info: $(INFOS
) info-dir
983 # This dependency is due to those doc/misc/ manuals that use .org sources.
984 # Depending on src is sufficient, but ends up being slow, since the
985 # uncompiled lisp/org/*.el files are used to build the .texi files
986 # (which can be slow even with the elc files).
988 # Using src rather than lisp because one is less likely to get unnecessary
989 # rebuilds of stuff that is not strictly necessary for generating manuals.
990 misc-dvi misc-html misc-pdf misc-ps
: src
992 info-dir
: ${srcdir}/info/dir
994 texi_misc
= $(shell MAKEFLAGS
= ${MAKE} --no-print-directory
-s
-C doc
/misc echo-sources
)
996 srcdir_doc_info_dir_inputs
= \
997 ${srcdir}/doc
/emacs
/emacs.texi \
998 ${srcdir}/doc
/lispintro
/emacs-lisp-intro.texi \
999 ${srcdir}/doc
/lispref
/elisp.texi \
1000 $(addprefix ${srcdir}/doc
/misc
/,${texi_misc})
1002 ..
/build-aux
/dir_top \
1003 $(subst ${srcdir}/doc
/,,${srcdir_doc_info_dir_inputs})
1005 ${srcdir}/build-aux
/make-info-dir \
1006 ${srcdir}/build-aux
/dir_top \
1007 ${srcdir_doc_info_dir_inputs}
1009 ## It would be much simpler if info/dir was only created in the
1010 ## installation location by the install-info rule, but we also
1011 ## need one in the source directory for people running uninstalled.
1012 ## FIXME it would be faster to use the install-info program if we have it,
1013 ## but then we would need to depend on ${INFOS}, which would
1014 ## slow down parallelization.
1015 ${srcdir}/info/dir: ${info_dir_deps}
1016 $(AM_V_at
)${MKDIR_P} ${srcdir}/info
1017 $(AM_V_GEN
)(cd
${srcdir}/doc
&& \
1018 AWK
='${AWK}' ..
/build-aux
/make-info-dir
${info_dir_inputs} \
1019 ) >$@.tmp
&& mv
$@.tmp
$@
1021 INSTALL_DVI
= install-emacs-dvi install-lispref-dvi \
1022 install-lispintro-dvi install-misc-dvi
1023 INSTALL_HTML
= install-emacs-html install-lispref-html \
1024 install-lispintro-html install-misc-html
1025 INSTALL_PDF
= install-emacs-pdf install-lispref-pdf \
1026 install-lispintro-pdf install-misc-pdf
1027 INSTALL_PS
= install-emacs-ps install-lispref-ps \
1028 install-lispintro-ps install-misc-ps
1029 INSTALL_DOC
= $(INSTALL_DVI
) $(INSTALL_HTML
) $(INSTALL_PDF
) $(INSTALL_PS
)
1031 ## Install non .info forms of the documentation.
1032 ## TODO add etc/refcards.
1034 $(MAKE
) -C doc
/$(subst -, install-
,$(subst install-
,,$@
))
1036 .PHONY
: $(INSTALL_DOC
) install-doc
1037 .PHONY
: install-dvi install-html install-pdf install-ps
1039 install-doc
: $(INSTALL_DOC
)
1040 install-dvi
: $(INSTALL_DVI
)
1041 install-html
: $(INSTALL_HTML
)
1042 install-pdf
: $(INSTALL_PDF
)
1043 install-ps
: $(INSTALL_PS
)
1046 UNINSTALL_DVI
= uninstall-emacs-dvi uninstall-lispref-dvi \
1047 uninstall-lispintro-dvi uninstall-misc-dvi
1048 UNINSTALL_HTML
= uninstall-emacs-html uninstall-lispref-html \
1049 uninstall-lispintro-html uninstall-misc-html
1050 UNINSTALL_PDF
= uninstall-emacs-pdf uninstall-lispref-pdf \
1051 uninstall-lispintro-pdf uninstall-misc-pdf
1052 UNINSTALL_PS
= uninstall-emacs-ps uninstall-lispref-ps \
1053 uninstall-lispintro-ps uninstall-misc-ps
1054 UNINSTALL_DOC
= $(UNINSTALL_DVI
) $(UNINSTALL_HTML
) $(UNINSTALL_PDF
) $(UNINSTALL_PS
)
1057 $(MAKE
) -C doc
/$(subst -, uninstall-
,$(subst uninstall-
,,$@
))
1059 .PHONY
: $(UNINSTALL_DOC
) uninstall-doc
1060 .PHONY
: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
1062 uninstall-doc
: $(UNINSTALL_DOC
)
1063 uninstall-dvi
: $(UNINSTALL_DVI
)
1064 uninstall-html
: $(UNINSTALL_HTML
)
1065 uninstall-pdf
: $(UNINSTALL_PDF
)
1066 uninstall-ps
: $(UNINSTALL_PS
)
1068 ## build-aux/make-info-dir expects only certain dircategories.
1073 test -f
"$${file}" || continue
; \
1075 *-[0-9]*|COPYING|
dir) continue
;; \
1077 cat
=`sed -n 's/^INFO-DIR-SECTION //p' $${file}`; \
1079 "Texinfo documentation system" |
"Emacs"|
"Emacs lisp" | \
1080 "Emacs editing modes" |
"Emacs network features" | \
1081 "Emacs misc features" |
"Emacs lisp libraries" ) : ;; \
1082 *) bad
="$${bad} $${file}" ;; \
1085 if
test -n
"$${bad}"; then \
1086 echo
"Unexpected dircategory in: $${bad}" ; \
1089 echo
"info files are OK"
1093 ### This first cleans the lisp subdirectory, removing all compiled
1094 ### Lisp files. Then re-run make to build all the files anew.
1098 # Bootstrapping does the following:
1099 # * Remove files to start from a bootstrap-clean slate.
1101 # * Rebuild Makefile, to update the build procedure itself.
1102 # * Do the actual build.
1103 bootstrap
: bootstrap-clean
1104 cd
$(srcdir) && .
/autogen.sh autoconf
1105 $(MAKE
) MAKEFILE_NAME
=force-Makefile force-Makefile
1108 .PHONY
: ChangeLog change-history change-history-commit change-history-nocommit
1109 .PHONY
: preferred-branch-is-current unchanged-history-files
1111 CHANGELOG
= ChangeLog
1112 emacslog
= build-aux
/gitlog-to-emacslog
1113 # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
1114 # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX). $(CHANGELOG_N) stands for
1115 # the newest (highest-numbered) ChangeLog history file.
1116 CHANGELOG_HISTORY_INDEX_MAX
= 3
1117 CHANGELOG_N
= ChangeLog.
$(CHANGELOG_HISTORY_INDEX_MAX
)
1119 # Convert git commit log to ChangeLog file. make-dist uses this.
1120 # I guess this is PHONY so it always updates?
1122 $(AM_V_GEN
)cd
$(srcdir) && \
1123 .
/$(emacslog
) -o
$(CHANGELOG
) -n
$(CHANGELOG_HISTORY_INDEX_MAX
)
1125 # Check that we are in a good state for changing history.
1126 PREFERRED_BRANCH
= emacs-27
1127 preferred-branch-is-current
:
1128 git branch | grep
-q
'^\* $(PREFERRED_BRANCH)$$'
1129 unchanged-history-files
:
1130 x
=$$(git diff-files
--name-only
$(CHANGELOG_N
) $(emacslog
)) && \
1133 # Regular expression that matches the newest commit covered by a ChangeLog.
1134 new_commit_regexp
= ^commit
[0123456789abcdef
]* (inclusive
)
1136 # Copy newer commit messages to the start of the ChangeLog history file,
1137 # and consider them to be older.
1138 change-history-nocommit
: preferred-branch-is-current unchanged-history-files
1139 -rm -f ChangeLog.tmp
1140 $(MAKE
) ChangeLog CHANGELOG
=ChangeLog.tmp
1141 sed
'/^This file records repository revisions/,$$d' \
1142 ChangeLog.tmp
>$(CHANGELOG_N
).tmp
1143 new_commit_line
=`grep '$(new_commit_regexp)' ChangeLog.tmp` && \
1144 sed
's/$(new_commit_regexp).*/'"$$new_commit_line/" \
1145 $(CHANGELOG_N
) >>$(CHANGELOG_N
).tmp
1147 mv
$(CHANGELOG_N
).tmp
$(CHANGELOG_N
)
1149 change-history
: change-history-nocommit
1152 # If 'make change-history' fails because the newest ChangeLog history
1153 # file contains invalid text, fix the file by hand and then run
1154 # 'make change-history-commit'.
1155 change-history-commit
:
1156 git commit
-m
'; make $@' $(CHANGELOG_N
) $(emacslog
)
1158 .PHONY
: check-declare
1161 @if
[ ! -f
$(srcdir)/src
/emacs
]; then \
1162 echo
"You must build Emacs to use this command"; \
1170 GITMERGE_EMACS
= .
/src
/emacs
${EXEEXT}
1174 ${GITMERGE_EMACS} -batch
--no-site-file
--no-site-lisp \
1175 -l
${srcdir}/admin
/gitmerge.el \
1176 --eval
'(setq gitmerge-minimum-missing ${GITMERGE_NMIN})' -f gitmerge