emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115169: Fix some dependency problems that cause unn


From: Paul Eggert
Subject: [Emacs-diffs] trunk r115169: Fix some dependency problems that cause unnecessary recompiles.
Date: Thu, 21 Nov 2013 07:51:17 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115169
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2013-11-20 23:50:57 -0800
message:
  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.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/Makefile.in                makefile.in-20091113204419-o5vbwnq5f7feedwu-631
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-11-20 01:50:37 +0000
+++ b/ChangeLog 2013-11-21 07:50:57 +0000
@@ -1,3 +1,10 @@
+2013-11-21  Paul Eggert  <address@hidden>
+
+       Fix some dependency problems that cause unnecessary recompiles.
+       * configure.ac (OLDXMENU_TARGET, OLDXMENU, LIBXMENU, OLDXMENU_DEPS):
+       Remove.
+       (LIBXMENU_DIR, LIBXMENU_BASE): New vars.
+
 2013-11-20  Glenn Morris  <address@hidden>
 
        * make-dist: Distribute build-aux/msys-to-w32.

=== modified file 'configure.ac'
--- a/configure.ac      2013-11-17 03:58:30 +0000
+++ b/configure.ac      2013-11-21 07:50:57 +0000
@@ -4598,56 +4598,34 @@
 if test "${opsys}" != "mingw32"; then
   if test "$USE_X_TOOLKIT" = "none"; then
     LIBXT_OTHER="\$(LIBXSM)"
-    OLDXMENU_TARGET="really-oldXMenu"
   else
     LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
-    OLDXMENU_TARGET="really-lwlib"
   fi
 fi
 AC_SUBST(LIBXT_OTHER)
 
-## The X Menu stuff is present in the X10 distribution, but missing
-## from X11.  If we have X10, just use the installed library;
-## otherwise, use our own copy.
 if test "${HAVE_X11}" = "yes" ; then
   AC_DEFINE(HAVE_X11, 1,
-           [Define to 1 if you want to use version 11 of X windows.
-            Otherwise, Emacs expects to use version 10.])
-
-  if test "$USE_X_TOOLKIT" = "none"; then
-    OLDXMENU="\${oldXMenudir}/libXMenu11.a"
-  else
-    OLDXMENU="\${lwlibdir}/liblw.a"
-  fi
-  LIBXMENU="\$(OLDXMENU)"
+           [Define to 1 if you want to use version 11 of X windows.])
   LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
-  OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
 else
-  ## For a syntactically valid Makefile; not actually used for anything.
-  ## See comments in src/Makefile.in.
-  OLDXMENU=nothing
-  ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
-  if test "${HAVE_X_WINDOWS}" = "yes"; then
-    LIBXMENU="-lXMenu"
-  else
-    LIBXMENU=
-  fi
   LIBX_OTHER=
-  OLDXMENU_DEPS=
-fi
-
-if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
-  OLDXMENU_TARGET=
-  OLDXMENU=nothing
-  LIBXMENU=
-  OLDXMENU_DEPS=
-fi
-
-AC_SUBST(OLDXMENU_TARGET)
-AC_SUBST(OLDXMENU)
-AC_SUBST(LIBXMENU)
+fi
 AC_SUBST(LIBX_OTHER)
-AC_SUBST(OLDXMENU_DEPS)
+
+if test "$HAVE_GTK" = yes ||
+   test "$HAVE_MENUS" != yes || test "$HAVE_X11" != yes; then
+  LIBXMENU_DIR=
+  LIBXMENU_BASE=
+elif test "$USE_X_TOOLKIT" = none; then
+  LIBXMENU_DIR='$(oldXMenudir)/'
+  LIBXMENU_BASE='libXMenu11.a'
+else
+  LIBXMENU_DIR='$(lwlibdir)/'
+  LIBXMENU_BASE='liblw.a'
+fi
+AC_SUBST(LIBXMENU_DIR)
+AC_SUBST(LIBXMENU_BASE)
 
 if test "${HAVE_MENUS}" = "yes" ; then
   AC_DEFINE(HAVE_MENUS, 1,

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-21 06:46:59 +0000
+++ b/src/ChangeLog     2013-11-21 07:50:57 +0000
@@ -1,5 +1,17 @@
 2013-11-21  Paul Eggert  <address@hidden>
 
+       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>.
+       * 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.
+
        Fix recently introduced bool vector overrun.
        This was due to an optimization that went awry.
        Reported by Glenn Morris in

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2013-11-02 23:49:54 +0000
+++ b/src/Makefile.in   2013-11-21 07:50:57 +0000
@@ -179,31 +179,13 @@
 address@hidden@
 
 ## If !HAVE_X11 || USE_GTK, empty.
-## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu.
address@hidden@
-
-## If !HAVE_X11 || USE_GTK, empty.
 ## Else if USE_X_TOOLKIT, $(lwlibdir)/liblw.a.
 ## Else $(oldXMenudir)/libXMenu11.a.
-## (Actually, rather than being empty, it is set to "nothing".
-## It is never actually used for anything in this case.
-## This is done because there is a rule with target $(OLDXMENU) below,
-## and I think it might be a syntax error with some makes to have
-## an empty target, even if the associated rule is never run.
-## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html
-## The alternative would be to put that rule in a makefile fragment.)
address@hidden@
-
-## If HAVE_X11 && !USE_GTK, $(OLDXMENU) ../src/$(OLDXMENU); else empty.
-## We use stamp-xmenu with these two deps to both ensure that lwlib
-## gets remade based on its dependencies in its own makefile,
-## and remake temacs if lwlib gets changed by this.
address@hidden@
-
-## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible).
-## Else if !HAVE_X11 || USE_GTK, empty.
-## Else $(OLDXMENU).
address@hidden@
+## LIBXMENU_DIR is the directory part, including any slash;
+## LIBXMENU_BASE is the rest.
address@hidden@
address@hidden@
+LIBXMENU=$(LIBXMENU_DIR)$(LIBXMENU_BASE)
 
 ## xmenu.o if HAVE_X_WINDOWS, else empty.
 address@hidden@
@@ -504,7 +486,7 @@
 ## existence when setting Vinstallation_directory (FIXME?).
 ## This goes on to affect various things, and the emacs binary fails
 ## to start if Vinstallation_directory has the wrong value.
-temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \
+temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
                 $(lib)/libgnu.a $(EMACSRES)
        $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
          -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES)
@@ -514,29 +496,17 @@
          test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
 
 ## The following oldxmenu-related rules are only (possibly) used if
-## HAVE_X11 && !USE_GTK, but there is no harm in always defining them
-## (provided we take a little care that OLDXMENU is never empty).
-really-lwlib: globals.h
-       cd $(lwlibdir); $(MAKE) $(MFLAGS) \
-    CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)'
-       @true  # make -t should not create really-lwlib.
-.PHONY: really-lwlib
-
-really-oldXMenu:
-       cd $(oldXMenudir); $(MAKE) $(MFLAGS) \
-    CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)'
-       @true  # make -t should not create really-oldXMenu.
-.PHONY: really-oldXMenu
-
-## We do not really need this when OLDXMENU_DEPS is empty, but as
-## things stand we need something to satisfy the temacs dependency.
-stamp-oldxmenu: $(OLDXMENU_DEPS)
-       touch stamp-oldxmenu
-
-## Supply an ordering for parallel make.
-../src/$(OLDXMENU): $(OLDXMENU)
-
-$(OLDXMENU): $(OLDXMENU_TARGET)
+## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.
+$(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE
+       cd $(lwlibdir) && \
+         $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \
+           liblw.a
+$(oldXMenudir)/libXMenu11.a: FORCE
+       cd $(oldXMenudir) && \
+         $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \
+           libXMenu11.a
+FORCE:
+.PHONY: FORCE
 
 ../config.status: config.in epaths.in
        @echo "The file ${?:.in=.h} needs to be set up from $?."
@@ -572,7 +542,7 @@
 ## It should remove all files generated during a compilation/bootstrap,
 ## but not things like config.status or TAGS.
 bootstrap-clean: clean
-       rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu
+       rm -f epaths.h config.h config.stamp stamp-h1
        if test -f ./.gdbinit; then \
          mv ./.gdbinit ./.gdbinit.save; \
          if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]