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 | |
| 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.
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | configure.ac | 50 | ||||
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/Makefile.in | 66 |
4 files changed, 51 insertions, 84 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-11-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix some dependency problems that cause unnecessary recompiles. | ||
| 4 | * configure.ac (OLDXMENU_TARGET, OLDXMENU, LIBXMENU, OLDXMENU_DEPS): | ||
| 5 | Remove. | ||
| 6 | (LIBXMENU_DIR, LIBXMENU_BASE): New vars. | ||
| 7 | |||
| 1 | 2013-11-20 Glenn Morris <rgm@gnu.org> | 8 | 2013-11-20 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * make-dist: Distribute build-aux/msys-to-w32. | 10 | * make-dist: Distribute build-aux/msys-to-w32. |
diff --git a/configure.ac b/configure.ac index a9baf608bf3..f01fa4c079a 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -4598,56 +4598,34 @@ AC_SUBST(TOOLKIT_LIBW) | |||
| 4598 | if test "${opsys}" != "mingw32"; then | 4598 | if test "${opsys}" != "mingw32"; then |
| 4599 | if test "$USE_X_TOOLKIT" = "none"; then | 4599 | if test "$USE_X_TOOLKIT" = "none"; then |
| 4600 | LIBXT_OTHER="\$(LIBXSM)" | 4600 | LIBXT_OTHER="\$(LIBXSM)" |
| 4601 | OLDXMENU_TARGET="really-oldXMenu" | ||
| 4602 | else | 4601 | else |
| 4603 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | 4602 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" |
| 4604 | OLDXMENU_TARGET="really-lwlib" | ||
| 4605 | fi | 4603 | fi |
| 4606 | fi | 4604 | fi |
| 4607 | AC_SUBST(LIBXT_OTHER) | 4605 | AC_SUBST(LIBXT_OTHER) |
| 4608 | 4606 | ||
| 4609 | ## The X Menu stuff is present in the X10 distribution, but missing | ||
| 4610 | ## from X11. If we have X10, just use the installed library; | ||
| 4611 | ## otherwise, use our own copy. | ||
| 4612 | if test "${HAVE_X11}" = "yes" ; then | 4607 | if test "${HAVE_X11}" = "yes" ; then |
| 4613 | AC_DEFINE(HAVE_X11, 1, | 4608 | AC_DEFINE(HAVE_X11, 1, |
| 4614 | [Define to 1 if you want to use version 11 of X windows. | 4609 | [Define to 1 if you want to use version 11 of X windows.]) |
| 4615 | Otherwise, Emacs expects to use version 10.]) | ||
| 4616 | |||
| 4617 | if test "$USE_X_TOOLKIT" = "none"; then | ||
| 4618 | OLDXMENU="\${oldXMenudir}/libXMenu11.a" | ||
| 4619 | else | ||
| 4620 | OLDXMENU="\${lwlibdir}/liblw.a" | ||
| 4621 | fi | ||
| 4622 | LIBXMENU="\$(OLDXMENU)" | ||
| 4623 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | 4610 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" |
| 4624 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | ||
| 4625 | else | 4611 | else |
| 4626 | ## For a syntactically valid Makefile; not actually used for anything. | ||
| 4627 | ## See comments in src/Makefile.in. | ||
| 4628 | OLDXMENU=nothing | ||
| 4629 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). | ||
| 4630 | if test "${HAVE_X_WINDOWS}" = "yes"; then | ||
| 4631 | LIBXMENU="-lXMenu" | ||
| 4632 | else | ||
| 4633 | LIBXMENU= | ||
| 4634 | fi | ||
| 4635 | LIBX_OTHER= | 4612 | LIBX_OTHER= |
| 4636 | OLDXMENU_DEPS= | ||
| 4637 | fi | 4613 | fi |
| 4614 | AC_SUBST(LIBX_OTHER) | ||
| 4638 | 4615 | ||
| 4639 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | 4616 | if test "$HAVE_GTK" = yes || |
| 4640 | OLDXMENU_TARGET= | 4617 | test "$HAVE_MENUS" != yes || test "$HAVE_X11" != yes; then |
| 4641 | OLDXMENU=nothing | 4618 | LIBXMENU_DIR= |
| 4642 | LIBXMENU= | 4619 | LIBXMENU_BASE= |
| 4643 | OLDXMENU_DEPS= | 4620 | elif test "$USE_X_TOOLKIT" = none; then |
| 4621 | LIBXMENU_DIR='$(oldXMenudir)/' | ||
| 4622 | LIBXMENU_BASE='libXMenu11.a' | ||
| 4623 | else | ||
| 4624 | LIBXMENU_DIR='$(lwlibdir)/' | ||
| 4625 | LIBXMENU_BASE='liblw.a' | ||
| 4644 | fi | 4626 | fi |
| 4645 | 4627 | AC_SUBST(LIBXMENU_DIR) | |
| 4646 | AC_SUBST(OLDXMENU_TARGET) | 4628 | AC_SUBST(LIBXMENU_BASE) |
| 4647 | AC_SUBST(OLDXMENU) | ||
| 4648 | AC_SUBST(LIBXMENU) | ||
| 4649 | AC_SUBST(LIBX_OTHER) | ||
| 4650 | AC_SUBST(OLDXMENU_DEPS) | ||
| 4651 | 4629 | ||
| 4652 | if test "${HAVE_MENUS}" = "yes" ; then | 4630 | if test "${HAVE_MENUS}" = "yes" ; then |
| 4653 | AC_DEFINE(HAVE_MENUS, 1, | 4631 | AC_DEFINE(HAVE_MENUS, 1, |
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; \ |