aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.in')
-rw-r--r--src/Makefile.in40
1 files changed, 14 insertions, 26 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 5bed189f16a..748f38e55bd 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
1### @configure_input@ 1### @configure_input@
2 2
3# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014 Free Software 3# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014
4# Foundation, Inc. 4# Free Software Foundation, Inc.
5 5
6# This file is part of GNU Emacs. 6# This file is part of GNU Emacs.
7 7
@@ -594,40 +594,28 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
594## such as loaddefs.el or *.elc can typically be produced by any old 594## such as loaddefs.el or *.elc can typically be produced by any old
595## Emacs executable, so we would like to avoid rebuilding them whenever 595## Emacs executable, so we would like to avoid rebuilding them whenever
596## we build a new Emacs executable. 596## we build a new Emacs executable.
597##
598## (In other words, changing a single file src/foo.c would force
599## dumping a new bootstrap-emacs, then re-byte-compiling all preloaded
600## elisp files, and only then dump the actual src/emacs, which is not
601## wrong, but is overkill in 99.99% of the cases.)
602##
597## To solve the circularity, we use 2 different Emacs executables, 603## To solve the circularity, we use 2 different Emacs executables,
598## "emacs" is the main target and "bootstrap-emacs" is the one used 604## "emacs" is the main target and "bootstrap-emacs" is the one used
599## to build the *.elc and loaddefs.el files. 605## to build the *.elc and loaddefs.el files.
600## To solve the freshness issue, we used to use a third file "witness-emacs" 606## To solve the freshness issue, in the past we tried various clever tricks,
601## which was used to witness the fact that there is a bootstrap-emacs 607## but now that we require GNU make, we can simply specify
602## executable, and then have dependencies on witness-emacs rather than 608## bootstrap-emacs$(EXEEXT) as an order-only prerequisite.
603## bootstrap-emacs, but that lead to problems in parallel builds (because
604## witness-emacs needed to be free from dependencies (to avoid rebuilding
605## it), so it was compiled in parallel, leading typically to having 2
606## processes dumping bootstrap-emacs at the same time).
607## So instead, we replace the witness-emacs dependencies by conditional
608## bootstrap-dependencies (via $(BOOTSTRAPEMACS)). Of course, since we do
609## not want to rely on GNU Make features, we have to rely on an external
610## script to do the conditional part of the dependency
611## (i.e. see the $(SUBDIR) rule ../Makefile.in).
612
613.SUFFIXES: .elc .el
614
615## These suffix rules do not allow additional dependencies, sadly, so
616## instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
617## separately below.
618## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"
619.el.elc:
620 @$(MAKE) -C ../lisp compile-onefile THEFILE=$< EMACS="$(bootstrap_exe)"
621 609
622## Since the .el.elc rule cannot specify an extra dependency, we do it here. 610%.elc: %.el | bootstrap-emacs$(EXEEXT)
623$(lisp): $(BOOTSTRAPEMACS) 611 @$(MAKE) -C ../lisp compile-onefile THEFILE=$< EMACS="$(bootstrap_exe)"
624 612
625## VCSWITNESS points to the file that holds info about the current checkout. 613## VCSWITNESS points to the file that holds info about the current checkout.
626## We use it as a heuristic to decide when to rebuild loaddefs.el. 614## We use it as a heuristic to decide when to rebuild loaddefs.el.
627## If empty it is ignored; the parent makefile can set it to some other value. 615## If empty it is ignored; the parent makefile can set it to some other value.
628VCSWITNESS = 616VCSWITNESS =
629 617
630$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) 618$(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT)
631 $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)" 619 $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)"
632 620
633## Dump an Emacs executable named bootstrap-emacs containing the 621## Dump an Emacs executable named bootstrap-emacs containing the