diff options
| author | Glenn Morris | 2014-06-26 20:41:23 -0400 |
|---|---|---|
| committer | Glenn Morris | 2014-06-26 20:41:23 -0400 |
| commit | da313ecaea3f2fad5eee6582dba5e0cc95ee5ea0 (patch) | |
| tree | 379952152ad42b2d76b06eb581c46a5a81e621c6 /src | |
| parent | 7ee4b70caae18bb2df0a184ecca7746629140ef4 (diff) | |
| download | emacs-da313ecaea3f2fad5eee6582dba5e0cc95ee5ea0.tar.gz emacs-da313ecaea3f2fad5eee6582dba5e0cc95ee5ea0.zip | |
Replace BOOTSTRAPEMACS with an order-only dependence on bootstrap-emacs
* Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
* src/Makefile.in (.el.elc): Replace suffix rule with pattern rule.
(%.elc): New pattern rule, with order-only prerequisite.
($(lisp)): No more need to depend on BOOTSTRAPEMACS.
($(lispsource)/loaddefs.el): Use an order-only prerequisite
in place of BOOTSTRAPEMACS.
Fixes: debbugs:2151
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/Makefile.in | 40 |
2 files changed, 24 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index da46ead2b93..b25e2d487d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-06-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand | ||
| 4 | with an order-only dependence on bootstrap-emacs. (Bug#2151) | ||
| 5 | (.el.elc): Replace suffix rule with pattern rule. | ||
| 6 | (%.elc): New pattern rule, with order-only prerequisite. | ||
| 7 | ($(lisp)): No more need to depend on BOOTSTRAPEMACS. | ||
| 8 | ($(lispsource)/loaddefs.el): Use an order-only prerequisite | ||
| 9 | in place of BOOTSTRAPEMACS. | ||
| 10 | |||
| 1 | 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru> | 11 | 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 12 | ||
| 3 | * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE. | 13 | * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE. |
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. |
| 628 | VCSWITNESS = | 616 | VCSWITNESS = |
| 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 |