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.
This commit is contained in:
parent
75360f19c3
commit
7e8ed4f7f9
4 changed files with 52 additions and 85 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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 <rgm@gnu.org>
|
||||
|
||||
* make-dist: Distribute build-aux/msys-to-w32.
|
||||
|
|
52
configure.ac
52
configure.ac
|
@ -4598,56 +4598,34 @@ AC_SUBST(TOOLKIT_LIBW)
|
|||
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)
|
||||
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,
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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
|
||||
|
|
|
@ -178,32 +178,14 @@ LIBXTR6=@LIBXTR6@
|
|||
## Only used if HAVE_X_WINDOWS.
|
||||
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; \
|
||||
|
|
Loading…
Add table
Reference in a new issue