diff options
| author | Paul Eggert | 2013-11-20 23:50:57 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-11-20 23:50:57 -0800 |
| commit | 7e8ed4f7f95f6f63198b0dd106f11cbff8e6aae2 (patch) | |
| tree | eab135c758ec641e45ea8de31f87fc1da5ad5ba0 /src | |
| parent | 75360f19c3994ab7a532124b7f5eb92bfe7c82ed (diff) | |
| download | emacs-7e8ed4f7f95f6f63198b0dd106f11cbff8e6aae2.tar.gz emacs-7e8ed4f7f95f6f63198b0dd106f11cbff8e6aae2.zip | |
Fix some dependency problems that cause unnecessary recompiles.
Problem reported by RMS in
<http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
* configure.ac (OLDXMENU_TARGET, OLDXMENU, LIBXMENU, OLDXMENU_DEPS):
Remove.
(LIBXMENU_DIR, LIBXMENU_BASE): New vars.
* src/Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
(really-lwlib, really-oldXMenu, stamp-oldxmenu)
(../src/$(OLDXMENU), $(OLDXMENU)): Remove.
(LIBXMENU_DIR, LIBXMENU_BASE): New macros.
(LIBXMENU): Use them.
(temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
(boostrap-clean): No need to remove stamp-oldxmenu.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/Makefile.in | 66 |
2 files changed, 30 insertions, 48 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 925f6389bf8..1a8ac2190a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,17 @@ | |||
| 1 | 2013-11-21 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2013-11-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Fix some dependency problems that cause unnecessary recompiles. | ||
| 4 | Problem reported by RMS in | ||
| 5 | <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>. | ||
| 6 | * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS) | ||
| 7 | (really-lwlib, really-oldXMenu, stamp-oldxmenu) | ||
| 8 | (../src/$(OLDXMENU), $(OLDXMENU)): Remove. | ||
| 9 | (LIBXMENU_DIR, LIBXMENU_BASE): New macros. | ||
| 10 | (LIBXMENU): Use them. | ||
| 11 | (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu. | ||
| 12 | ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets. | ||
| 13 | (boostrap-clean): No need to remove stamp-oldxmenu. | ||
| 14 | |||
| 3 | Fix recently introduced bool vector overrun. | 15 | Fix recently introduced bool vector overrun. |
| 4 | This was due to an optimization that went awry. | 16 | This was due to an optimization that went awry. |
| 5 | Reported by Glenn Morris in | 17 | Reported by Glenn Morris in |
diff --git a/src/Makefile.in b/src/Makefile.in index ca0b25a2f69..c110f3158d9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -179,31 +179,13 @@ LIBXTR6=@LIBXTR6@ | |||
| 179 | LIBXT_OTHER=@LIBXT_OTHER@ | 179 | LIBXT_OTHER=@LIBXT_OTHER@ |
| 180 | 180 | ||
| 181 | ## If !HAVE_X11 || USE_GTK, empty. | 181 | ## If !HAVE_X11 || USE_GTK, empty. |
| 182 | ## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu. | ||
| 183 | OLDXMENU_TARGET=@OLDXMENU_TARGET@ | ||
| 184 | |||
| 185 | ## If !HAVE_X11 || USE_GTK, empty. | ||
| 186 | ## Else if USE_X_TOOLKIT, $(lwlibdir)/liblw.a. | 182 | ## Else if USE_X_TOOLKIT, $(lwlibdir)/liblw.a. |
| 187 | ## Else $(oldXMenudir)/libXMenu11.a. | 183 | ## Else $(oldXMenudir)/libXMenu11.a. |
| 188 | ## (Actually, rather than being empty, it is set to "nothing". | 184 | ## LIBXMENU_DIR is the directory part, including any slash; |
| 189 | ## It is never actually used for anything in this case. | 185 | ## LIBXMENU_BASE is the rest. |
| 190 | ## This is done because there is a rule with target $(OLDXMENU) below, | 186 | LIBXMENU_DIR=@LIBXMENU_DIR@ |
| 191 | ## and I think it might be a syntax error with some makes to have | 187 | LIBXMENU_BASE=@LIBXMENU_BASE@ |
| 192 | ## an empty target, even if the associated rule is never run. | 188 | LIBXMENU=$(LIBXMENU_DIR)$(LIBXMENU_BASE) |
| 193 | ## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html | ||
| 194 | ## The alternative would be to put that rule in a makefile fragment.) | ||
| 195 | OLDXMENU=@OLDXMENU@ | ||
| 196 | |||
| 197 | ## If HAVE_X11 && !USE_GTK, $(OLDXMENU) ../src/$(OLDXMENU); else empty. | ||
| 198 | ## We use stamp-xmenu with these two deps to both ensure that lwlib | ||
| 199 | ## gets remade based on its dependencies in its own makefile, | ||
| 200 | ## and remake temacs if lwlib gets changed by this. | ||
| 201 | OLDXMENU_DEPS=@OLDXMENU_DEPS@ | ||
| 202 | |||
| 203 | ## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible). | ||
| 204 | ## Else if !HAVE_X11 || USE_GTK, empty. | ||
| 205 | ## Else $(OLDXMENU). | ||
| 206 | LIBXMENU=@LIBXMENU@ | ||
| 207 | 189 | ||
| 208 | ## xmenu.o if HAVE_X_WINDOWS, else empty. | 190 | ## xmenu.o if HAVE_X_WINDOWS, else empty. |
| 209 | XMENU_OBJ=@XMENU_OBJ@ | 191 | XMENU_OBJ=@XMENU_OBJ@ |
| @@ -504,7 +486,7 @@ $(lib)/libgnu.a: $(config_h) | |||
| 504 | ## existence when setting Vinstallation_directory (FIXME?). | 486 | ## existence when setting Vinstallation_directory (FIXME?). |
| 505 | ## This goes on to affect various things, and the emacs binary fails | 487 | ## This goes on to affect various things, and the emacs binary fails |
| 506 | ## to start if Vinstallation_directory has the wrong value. | 488 | ## to start if Vinstallation_directory has the wrong value. |
| 507 | temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \ | 489 | temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \ |
| 508 | $(lib)/libgnu.a $(EMACSRES) | 490 | $(lib)/libgnu.a $(EMACSRES) |
| 509 | $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ | 491 | $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ |
| 510 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) | 492 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) |
| @@ -514,29 +496,17 @@ temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \ | |||
| 514 | test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) | 496 | test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) |
| 515 | 497 | ||
| 516 | ## The following oldxmenu-related rules are only (possibly) used if | 498 | ## The following oldxmenu-related rules are only (possibly) used if |
| 517 | ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them | 499 | ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them. |
| 518 | ## (provided we take a little care that OLDXMENU is never empty). | 500 | $(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE |
| 519 | really-lwlib: globals.h | 501 | cd $(lwlibdir) && \ |
| 520 | cd $(lwlibdir); $(MAKE) $(MFLAGS) \ | 502 | $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \ |
| 521 | CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' | 503 | liblw.a |
| 522 | @true # make -t should not create really-lwlib. | 504 | $(oldXMenudir)/libXMenu11.a: FORCE |
| 523 | .PHONY: really-lwlib | 505 | cd $(oldXMenudir) && \ |
| 524 | 506 | $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \ | |
| 525 | really-oldXMenu: | 507 | libXMenu11.a |
| 526 | cd $(oldXMenudir); $(MAKE) $(MFLAGS) \ | 508 | FORCE: |
| 527 | CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' | 509 | .PHONY: FORCE |
| 528 | @true # make -t should not create really-oldXMenu. | ||
| 529 | .PHONY: really-oldXMenu | ||
| 530 | |||
| 531 | ## We do not really need this when OLDXMENU_DEPS is empty, but as | ||
| 532 | ## things stand we need something to satisfy the temacs dependency. | ||
| 533 | stamp-oldxmenu: $(OLDXMENU_DEPS) | ||
| 534 | touch stamp-oldxmenu | ||
| 535 | |||
| 536 | ## Supply an ordering for parallel make. | ||
| 537 | ../src/$(OLDXMENU): $(OLDXMENU) | ||
| 538 | |||
| 539 | $(OLDXMENU): $(OLDXMENU_TARGET) | ||
| 540 | 510 | ||
| 541 | ../config.status: config.in epaths.in | 511 | ../config.status: config.in epaths.in |
| 542 | @echo "The file ${?:.in=.h} needs to be set up from $?." | 512 | @echo "The file ${?:.in=.h} needs to be set up from $?." |
| @@ -572,7 +542,7 @@ clean: mostlyclean | |||
| 572 | ## It should remove all files generated during a compilation/bootstrap, | 542 | ## It should remove all files generated during a compilation/bootstrap, |
| 573 | ## but not things like config.status or TAGS. | 543 | ## but not things like config.status or TAGS. |
| 574 | bootstrap-clean: clean | 544 | bootstrap-clean: clean |
| 575 | rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu | 545 | rm -f epaths.h config.h config.stamp stamp-h1 |
| 576 | if test -f ./.gdbinit; then \ | 546 | if test -f ./.gdbinit; then \ |
| 577 | mv ./.gdbinit ./.gdbinit.save; \ | 547 | mv ./.gdbinit ./.gdbinit.save; \ |
| 578 | if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \ | 548 | if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \ |