Renamed lisp/epa-file-hook.el to lisp/epa-hook.el.
[bpt/emacs.git] / src / Makefile.in
index 11e4d00..80df9a6 100644 (file)
@@ -1,6 +1,7 @@
 # Makefile for GNU Emacs.
 # Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
-#               2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+#               2003, 2004, 2005, 2006, 2007, 2008
+#               Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
 
 # Don't try to replace the cpp processing using autoconf facilities,
 # says rms.
+# Replacing a particular part of the conditionals to work via autoconf
+# is OK.
+# Some of the conditionals might be dead now.  Finding them and
+# deleting them would be fine.
+
 
 # Here are the things that we expect ../configure to edit.
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
@@ -72,7 +78,6 @@ C_SWITCH_SYSTEM=
 SHELL=/bin/sh
 
 #define THIS_IS_MAKEFILE
-#define NO_SHORTNAMES
 #define NOT_C_CODE
 #include "config.h"
 
@@ -99,10 +104,6 @@ SHELL=/bin/sh
 MAKE = MAKE_COMMAND
 #endif
 
-#ifdef C_COMPILER
-CC = C_COMPILER
-#endif
-
 /* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
    GNU/Linux is an exception because it uses a funny variant of GNU libc.  */
 #ifdef __GNU_LIBRARY__
@@ -143,11 +144,11 @@ CC = C_COMPILER
 
 /* Some s/SYSTEM.h files define this to request special switches in ld.  */
 #ifndef LD_SWITCH_SYSTEM
-#if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)))
+#if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
 #define LD_SWITCH_SYSTEM -X
-#else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
+#else /* (defined (BSD_SYSTEM) && !defined (COFF)) */
 #define LD_SWITCH_SYSTEM
-#endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD_SYSTEM) && !defined (COFF)) */
+#endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */
 #endif /* LD_SWITCH_SYSTEM */
 
 /* This holds special options for linking temacs
@@ -217,16 +218,12 @@ CC = C_COMPILER
 #ifndef ORDINARY_LINK
 
 #ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM
+#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
 #endif
 
 #ifndef START_FILES
 #ifdef NO_REMAP
-#ifdef COFF_ENCAPSULATE
-#define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o
-#else /* ! defined (COFF_ENCAPSULATE) */
 #define START_FILES pre-crt0.o /lib/crt0.o
-#endif /* ! defined (COFF_ENCAPSULATE) */
 #else /* ! defined (NO_REMAP) */
 #define START_FILES ecrt0.o
 #endif /* ! defined (NO_REMAP) */
@@ -243,24 +240,10 @@ STARTFILES = START_FILES
 #endif /* not ORDINARY_LINK */
 
 
-/* cc switches needed to make ``asm'' keyword work.
-   Nothing special needed on most machines.  */
-#ifndef C_SWITCH_ASM
-#define C_SWITCH_ASM
-#endif
-
-#if HAVE_GTK
-#define USE_GTK
-TOOLKIT_DEFINES = -DUSE_GTK
-#endif
-
-#ifdef USE_X_TOOLKIT
-#define USE_@X_TOOLKIT_TYPE@
-TOOLKIT_DEFINES = -DUSE_@X_TOOLKIT_TYPE@
-#else
-#ifndef USE_GTK
-TOOLKIT_DEFINES =
-#endif
+#ifdef HAVE_DBUS
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_OBJ = dbusbind.o
 #endif
 
 /* DO NOT use -R.  There is a special hack described in lastfile.c
@@ -276,22 +259,10 @@ TOOLKIT_DEFINES =
 
 /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
    since it may have -I options that should override those two.  */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@
 .c.o:
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
 
-#ifndef LIBX10_MACHINE
-#define LIBX10_MACHINE
-#endif
-
-#ifndef LIBX11_MACHINE
-#define LIBX11_MACHINE
-#endif
-
-#ifndef LIBX10_SYSTEM
-#define LIBX10_SYSTEM
-#endif
-
 #ifndef LIBX11_SYSTEM
 #define LIBX11_SYSTEM
 #endif
@@ -337,29 +308,23 @@ LIBXMENU=
 #endif /* not HAVE_MENUS */
 
 #ifdef USE_X_TOOLKIT
-#define @X_TOOLKIT_TYPE@
-#if defined (LUCID) || defined (ATHENA)
-#if HAVE_XAW3D
-LIBW= -lXaw3d
-#else
-LIBW= -lXaw
-#endif
-#endif
-#ifdef MOTIF
-#if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
-#define LIB_MOTIF_EXTRA -lXp
-#else
-#define LIB_MOTIF_EXTRA
-#endif
-#ifdef LIB_MOTIF
-LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
-#else
-LIBW= -lXm LIB_MOTIF_EXTRA
-#endif
-#endif
-#ifdef OPEN_LOOK
-LIBW= -lXol
-#endif
+# define @X_TOOLKIT_TYPE@
+# if HAVE_XAW3D
+LUCID_LIBW= -lXaw3d
+# else
+LUCID_LIBW= -lXaw
+# endif
+# if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
+#  define LIB_MOTIF_EXTRA -lXp
+# else
+#  define LIB_MOTIF_EXTRA
+# endif
+# ifdef LIB_MOTIF
+MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
+# else
+MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA
+# endif
+LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
 
 #ifdef HAVE_X11XTR6
 #ifdef NEED_LIBW
@@ -445,9 +410,9 @@ XFT_LIBS=@XFT_LIBS@
 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
    options for where to find X libraries, but before those libraries.  */
 X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
-LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM $(XFT_LIBS)
+LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS)
 #else /* not HAVE_X11 */
-LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
+LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
 #endif /* not HAVE_X11 */
 #else /* not HAVE_X_WINDOWS */
 #endif /* not HAVE_X_WINDOWS */
@@ -478,8 +443,6 @@ RSVG_CFLAGS= @RSVG_CFLAGS@
 /* Fix linking if compiled with GCC.  */
 #ifdef __GNUC__
 
-#if __GNUC__ > 1
-
 #ifdef LINKER
 #define LINKER_WAS_SPECIFIED
 #endif
@@ -515,37 +478,20 @@ GNULIB_VAR = LIB_GCC
 #define YMF_PASS_LDFLAGS(flags) flags
 #endif
 
-#else /* __GNUC__ < 2 */
-
-#ifndef LIB_GCC
-#define LIB_GCC /usr/local/lib/gcc-gnulib
-#endif /* not LIB_GCC */
-GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi`
-#endif /* __GNUC__ < 2 */
 #else /* not __GNUC__ */
 GNULIB_VAR =
 
 #endif /* not __GNUC__ */
 #endif /* not ORDINARY_LINK */
 
-/* Specify address for ld to start loading at,
-   if requested by configuration.  */
-#ifdef LD_TEXT_START_ADDR
-STARTFLAGS = -T LD_TEXT_START_ADDR -e __start
-#endif
-
 #ifdef ORDINARY_LINK
 LD = $(CC)
 #else
-#ifdef COFF_ENCAPSULATE
-LD=$(CC) -nostdlib
-#else /* not ORDINARY_LINK */
 #ifdef LINKER
 LD=LINKER
 #else /* not LINKER */
 LD=ld
 #endif /* not LINKER */
-#endif /* not COFF_ENCAPSULATE */
 #endif /* not ORDINARY_LINK */
 
 /* Flags to pass to LD only for temacs.  */
@@ -588,14 +534,14 @@ CYGWIN_OBJ = sheap.o
 
 #ifdef HAVE_CARBON
 mac = $(dot)$(dot)/mac/
-MAC_OBJ = mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o fringe.o image.o
+MAC_OBJ = mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o fringe.o image.o mactoolbox.o
 emacsapp = $(PWD)/$(mac)Emacs.app/
 emacsappsrc = ${srcdir}/../mac/Emacs.app/
 #endif
 
 #ifdef HAVE_WINDOW_SYSTEM
-#ifdef USE_FONT_BACKEND
 FONTSRC = font.h
+#ifdef USE_FONT_BACKEND
 #ifdef HAVE_X_WINDOWS
 #if defined (HAVE_XFT)
 FONTOBJ = font.o xfont.o ftfont.o xftfont.o ftxfont.o
@@ -607,21 +553,23 @@ FONTOBJ = font.o xfont.o
 #else /* ! HAVE_X_WINDOWS */
 FONTOBJ = font.o
 #endif /* ! HAVE_X_WINDOWS */
-#endif /* USE_FONT_BACKEND */
+#else  /* ! USE_FONT_BACKEND */
+FONTOBJ = font.o
+#endif /* ! USE_FONT_BACKEND */
 #endif /* HAVE_WINDOW_SYSTEM */
 
 /* lastfile must follow all files
    whose initialized data areas should be dumped as pure by dump-emacs.  */
 obj=    dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
        charset.o coding.o category.o ccl.o character.o chartab.o \
-       cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ)\
+       cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
        emacs.o keyboard.o macros.o keymap.o sysdep.o \
        buffer.o filelock.o insdel.o marker.o \
        minibuf.o fileio.o dired.o filemode.o \
        cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
        alloc.o data.o doc.o editfns.o callint.o \
        eval.o floatfns.o fns.o print.o lread.o \
-       abbrev.o syntax.o UNEXEC bytecode.o \
+       syntax.o UNEXEC bytecode.o \
        process.o callproc.o \
        region-cache.o sound.o atimer.o \
        doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
@@ -630,7 +578,7 @@ obj=    dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \
 /* Object files used on some machine or other.
    These go in the DOC file on all machines
    in case they are needed there.  */
-SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \
+SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
   xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
   mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o \
   w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \
@@ -789,10 +737,7 @@ lisp= \
        ${lispsource}language/chinese.el \
        ${lispsource}language/cyrillic.el \
        ${lispsource}language/indian.el \
-       ${lispsource}language/devanagari.el \
-       ${lispsource}language/kannada.el \
-       ${lispsource}language/malayalam.el \
-       ${lispsource}language/tamil.el \
+       ${lispsource}language/sinhala.el \
        ${lispsource}language/english.el \
        ${lispsource}language/ethiopic.elc \
        ${lispsource}language/european.elc \
@@ -804,6 +749,7 @@ lisp= \
        ${lispsource}language/japanese.el \
        ${lispsource}language/korean.el \
        ${lispsource}language/lao.el \
+       ${lispsource}language/cham.el \
        ${lispsource}language/tai-viet.el \
        ${lispsource}language/thai.el \
        ${lispsource}language/tibetan.elc \
@@ -811,10 +757,13 @@ lisp= \
        ${lispsource}language/misc-lang.el \
        ${lispsource}language/utf-8-lang.el \
        ${lispsource}language/georgian.el \
+       ${lispsource}language/khmer.el \
+       ${lispsource}language/burmese.el \
        ${lispsource}paths.el \
        ${lispsource}register.elc \
        ${lispsource}replace.elc \
        ${lispsource}simple.elc \
+       ${lispsource}minibuffer.elc \
        ${lispsource}startup.elc \
        ${lispsource}subr.elc \
        ${lispsource}term/tty-colors.elc \
@@ -830,6 +779,7 @@ lisp= \
        ${lispsource}jka-cmpr-hook.elc \
        ${lispsource}vc-hooks.elc \
        ${lispsource}ediff-hook.elc \
+       ${lispsource}epa-hook.elc \
        TOOLTIP_SUPPORT \
        VMS_SUPPORT \
        MSDOS_SUPPORT \
@@ -878,10 +828,7 @@ shortlisp= \
        ../lisp/language/chinese.el \
        ../lisp/language/cyrillic.el \
        ../lisp/language/indian.el \
-       ../lisp/language/devanagari.el \
-       ../lisp/language/kannada.el \
-       ../lisp/language/malayalam.el \
-       ../lisp/language/tamil.el \
+       ../lisp/language/sinhala.el \
        ../lisp/language/english.el \
        ../lisp/language/ethiopic.elc \
        ../lisp/language/european.elc \
@@ -893,6 +840,7 @@ shortlisp= \
        ../lisp/language/japanese.el \
        ../lisp/language/korean.el \
        ../lisp/language/lao.el \
+       ../lisp/language/cham.el \
        ../lisp/language/tai-viet.el \
        ../lisp/language/thai.el \
        ../lisp/language/tibetan.elc \
@@ -900,11 +848,14 @@ shortlisp= \
        ../lisp/language/misc-lang.el \
        ../lisp/language/utf-8-lang.el \
        ../lisp/language/georgian.el \
+       ../lisp/language/khmer.el \
+       ../lisp/language/burmese.el \
        ../lisp/menu-bar.elc \
        ../lisp/paths.el \
        ../lisp/register.elc \
        ../lisp/replace.elc \
        ../lisp/simple.elc \
+       ../lisp/minibuffer.elc \
        ../lisp/startup.elc \
        ../lisp/subr.elc \
        ../lisp/term/tty-colors.elc \
@@ -920,6 +871,7 @@ shortlisp= \
        ../lisp/vc-hooks.elc \
        ../lisp/jka-cmpr-hook.elc \
        ../lisp/ediff-hook.elc \
+       ../lisp/epa-hook.elc \
        ../lisp/widget.elc \
        ../lisp/window.elc \
        ../lisp/version.el
@@ -931,7 +883,7 @@ shortlisp= \
    for the sake of systems which can''t handle large ones.  */
 SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
   ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
-  ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
+  VMS_SUPPORT \
   ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
   ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc \
   ${dotdot}/lisp/disp-table.elc ${dotdot}/lisp/dos-vars.elc \
@@ -949,10 +901,10 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
    Note that SunOS needs -lm to come before -lc; otherwise, you get
    duplicated symbols.  If the standard libraries were compiled
    with GCC, we might need gnulib again after them.  */
-LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) LIBGPM \
-   LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
+LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
+   LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
    LIBS_DEBUG $(GETLOADAVG_LIBS) \
-   @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ \
+   @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
 
 /* Enable recompilation of certain other files depending on system type.  */
@@ -998,22 +950,7 @@ ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${shortlisp} ${SOME_MACHINE_LIS
 ${libsrc}make-docfile${EXEEXT}:
        cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
 
-#ifdef HAVE_UNIDATA
-UNIDATA=${admindir}unidata/UnicodeData.txt
-
-${lispsource}international/charprop.el: temacs${EXEEXT} ${UNIDATA}
-       RUNEMACS="$(RUN_TEMACS)"; \
-       cd ${admindir}unidata; \
-       $(MAKE) $(MFLAGS) \
-         RUNEMACS="$${RUNEMACS}" DSTDIR=${lispsource}international
-#endif
-
-/* Some systems define this to cause parallel Make-ing.  */
-#ifndef MAKE_PARALLEL
-#define MAKE_PARALLEL
-#endif
-
-temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
+temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT}
        echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst
        $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
     -o temacs ${STARTFILES} ${obj} ${otherobj}  \
@@ -1025,12 +962,7 @@ temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} $
 prefix-args${EXEEXT}: prefix-args.c $(config_h)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
 
-/* Do not lose if this was not defined.  */
-#ifndef OLDXMENU_OPTIONS
-#define OLDXMENU_OPTIONS
-#endif
-
-#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (HAVE_GTK)
+#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
 
 /* We use stamp-xmenu with these two deps
    to both ensure that lwlib gets remade based on its dependencies
@@ -1041,9 +973,6 @@ stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
 /* Supply an ordering for parallel make.  */
 ../src/$(OLDXMENU): ${OLDXMENU}
 
-#ifdef USE_X_TOOLKIT
-$(OLDXMENU): really-lwlib
-
 /* Encode the values of these two macros in Make variables,
    so we can use $(...) to substitute their values within "...".  */
 C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
@@ -1052,6 +981,10 @@ C_SWITCH_SITE_1 = C_SWITCH_SITE
 C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
 C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
 C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
+
+#ifdef USE_X_TOOLKIT
+$(OLDXMENU): really-lwlib
+
 really-lwlib:
        cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
     CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
@@ -1066,16 +999,8 @@ really-lwlib:
 #else /* not USE_X_TOOLKIT */
 $(OLDXMENU): really-oldXMenu
 
-/* Encode the values of these two macros in Make variables,
-   so we can use $(...) to substitute their values within "...".  */
-C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE
-C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM
-C_SWITCH_SITE_1 = C_SWITCH_SITE
-C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE
-C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
-C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
 really-oldXMenu:
-       cd ${oldXMenudir}; ${MAKE} ${MFLAGS} OLDXMENU_OPTIONS \
+       cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
     CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
     "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
     "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
@@ -1086,12 +1011,12 @@ really-oldXMenu:
        @true  /* make -t should not create really-oldXMenu.  */
 .PHONY: really-oldXMenu
 #endif /* not USE_X_TOOLKIT */
-#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */
+#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
 
 /* We don''t really need this, but satisfy the dependency.  */
 stamp-oldxmenu:
        touch stamp-oldxmenu
-#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */
+#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
 
 ../config.status:: epaths.in
        @echo "The file epaths.h needs to be set up from epaths.in."
@@ -1264,16 +1189,17 @@ xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
    systime.h gtkutil.h msdos.h coding.h $(config_h)
 xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
    dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
-   keyboard.h gnu.h character.h charset.h ccl.h fontset.h composite.h \
+   keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \
    coding.h process.h gtkutil.h $(FONTSRC) $(config_h)
 xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
   buffer.h atimer.h systime.h termhooks.h $(config_h)
 xrdb.o: xrdb.c $(config_h) epaths.h
 xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \
   lisp.h termopts.h
-gtkutil.o:  gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
+gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
   blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \
   charset.h coding.h
+dbusbind.o: dbusbind.c termhooks.h $(config_h)
 
 hftctl.o: hftctl.c $(config_h)
 sound.o: sound.c dispextern.h $(config_h)
@@ -1311,10 +1237,8 @@ composite.o: composite.c buffer.h  character.h $(INTERVAL_SRC) $(config_h)
    OTHER_FILES and OBJECTS_MACHINE
    select which of these should be compiled.  */
 
-sunfns.o: sunfns.c buffer.h window.h dispextern.h termhooks.h $(config_h)
-
 #ifdef HAVE_CARBON
-abbrev.o buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
+buffer.o callint.o cmds.o dispnew.o editfns.o fileio.o frame.o \
   fontset.o indent.o insdel.o keyboard.o macros.o minibuf.o msdos.o process.o \
   scroll.o sysdep.o term.o terminal.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \
   xterm.o xselect.o sound.o: macgui.h
@@ -1327,10 +1251,13 @@ macmenu.o: macmenu.c termhooks.h frame.h window.h dispextern.h macgui.h \
   keyboard.h blockinput.h atimer.h systime.h buffer.h macterm.h $(config_h)
 macterm.o: blockinput.h atimer.h systime.h syssignal.h macterm.h macgui.h \
   frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \
-  termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
+  termchar.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \
   process.h coding.h $(config_h)
 macselect.o: blockinput.h atimer.h systime.h macterm.h macgui.h frame.h \
   keymap.h $(config_h)
+mactoolbox.o: blockinput.h atimer.h systime.h macterm.h macgui.h frame.h \
+  charset.h coding.h ccl.h dispextern.h fontset.h termhooks.h buffer.h \
+  window.h keyboard.h $(config_h)
 
 ${emacsapp}Contents/Resources/English.lproj:
        mkdir -p $@
@@ -1365,7 +1292,7 @@ mostlyclean:
        rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
        rm -f buildobj.lst
 clean: mostlyclean
-       rm -f emacs-*${EXEEXT} emacs${EXEEXT}
+       rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
 /**/# This is used in making a distribution.
 /**/# Do not use it on development directories!
 distclean: clean
@@ -1378,7 +1305,7 @@ maintainer-clean: distclean
        @echo "it deletes files that may require special tools to rebuild."
        rm -f TAGS
 versionclean:
-       -rm -f emacs${EXEEXT} emacs-* ../etc/DOC*
+       -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
 extraclean: distclean
        -rm -f *~ \#* m/?*~ s/?*~