summaryrefslogtreecommitdiff
path: root/src/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-11-20 23:50:57 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-11-20 23:50:57 -0800
commit7e8ed4f7f95f6f63198b0dd106f11cbff8e6aae2 (patch)
treeeab135c758ec641e45ea8de31f87fc1da5ad5ba0 /src/Makefile.in
parent75360f19c3994ab7a532124b7f5eb92bfe7c82ed (diff)
downloademacs-7e8ed4f7f95f6f63198b0dd106f11cbff8e6aae2.tar.gz
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/Makefile.in')
-rw-r--r--src/Makefile.in66
1 files changed, 18 insertions, 48 deletions
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@
LIBXT_OTHER=@LIBXT_OTHER@
## If !HAVE_X11 || USE_GTK, empty.
-## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu.
-OLDXMENU_TARGET=@OLDXMENU_TARGET@
-
-## 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.)
-OLDXMENU=@OLDXMENU@
-
-## 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.
-OLDXMENU_DEPS=@OLDXMENU_DEPS@
-
-## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible).
-## Else if !HAVE_X11 || USE_GTK, empty.
-## Else $(OLDXMENU).
-LIBXMENU=@LIBXMENU@
+## LIBXMENU_DIR is the directory part, including any slash;
+## LIBXMENU_BASE is the rest.
+LIBXMENU_DIR=@LIBXMENU_DIR@
+LIBXMENU_BASE=@LIBXMENU_BASE@
+LIBXMENU=$(LIBXMENU_DIR)$(LIBXMENU_BASE)
## xmenu.o if HAVE_X_WINDOWS, else empty.
XMENU_OBJ=@XMENU_OBJ@
@@ -504,7 +486,7 @@ $(lib)/libgnu.a: $(config_h)
## 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 @@ temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \
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 @@ clean: mostlyclean
## 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; \