Be more systematic about user-interface timestamps.
[bpt/emacs.git] / src / makefile.w32-in
index c938ae7..e19a196 100644 (file)
@@ -1,6 +1,5 @@
 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-#   2008, 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2000-2011  Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -29,7 +28,7 @@ EMACSLOADPATH=$(CURDIR)/../lisp
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
 # the emacs source tree.
 #
-LOCAL_FLAGS     = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
+LOCAL_FLAGS     = -Demacs=1 -DHAVE_CONFIG_H -I../lib -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
 
 SRC             = .
 EMACS           = $(BLD)/emacs.exe
@@ -37,10 +36,11 @@ TEMACS          = $(BLD)/temacs.exe
 TEMACS_TMP      = $(BLD)/temacs.bin
 TLIB0           = $(BLD)/temacs0.$(A)
 TLIB1           = $(BLD)/temacs1.$(A)
-TLIBW32         = $(BLD)/temacw32.$(A)
+TLIB2           = $(BLD)/temacs2.$(A)
 TOBJ            = $(BLD)/firstfile.$(O)
 TRES           = $(BLD)/emacs.res
 TLASTLIB       = $(BLD)/lastfile.$(A)
+GNULIB         = ../lib/$(BLD)/libgnu.$(A)
 
 DOC            = $(OBJDIR)/etc/DOC-X
 
@@ -72,7 +72,6 @@ OBJ1 =  $(BLD)/alloc.$(O)             \
        $(BLD)/eval.$(O)                \
        $(BLD)/fileio.$(O)              \
        $(BLD)/filelock.$(O)            \
-       $(BLD)/filemode.$(O)            \
        $(BLD)/fns.$(O)                 \
        $(BLD)/indent.$(O)              \
        $(BLD)/insdel.$(O)              \
@@ -81,7 +80,6 @@ OBJ1 =  $(BLD)/alloc.$(O)             \
        $(BLD)/lread.$(O)               \
        $(BLD)/macros.$(O)              \
        $(BLD)/marker.$(O)              \
-       $(BLD)/md5.$(O)                 \
        $(BLD)/minibuf.$(O)             \
        $(BLD)/w32.$(O)                 \
        $(BLD)/w32heap.$(O)             \
@@ -94,8 +92,9 @@ OBJ1 =  $(BLD)/alloc.$(O)             \
        $(BLD)/scroll.$(O)              \
        $(BLD)/search.$(O)              \
        $(BLD)/sound.$(O)               \
-       $(BLD)/syntax.$(O)              \
-       $(BLD)/sysdep.$(O)              \
+       $(BLD)/syntax.$(O)
+
+OBJ2 =  $(BLD)/sysdep.$(O)             \
        $(BLD)/term.$(O)                \
        $(BLD)/tparam.$(O)              \
        $(BLD)/undo.$(O)                \
@@ -106,13 +105,13 @@ OBJ1 =  $(BLD)/alloc.$(O)         \
        $(BLD)/floatfns.$(O)            \
        $(BLD)/frame.$(O)               \
        $(BLD)/gmalloc.$(O)             \
+       $(BLD)/gnutls.$(O)              \
        $(BLD)/intervals.$(O)           \
        $(BLD)/composite.$(O)           \
        $(BLD)/ralloc.$(O)              \
        $(BLD)/textprop.$(O)            \
        $(BLD)/vm-limit.$(O)            \
        $(BLD)/region-cache.$(O)        \
-       $(BLD)/strftime.$(O)            \
        $(BLD)/bidi.$(O)                \
        $(BLD)/charset.$(O)             \
        $(BLD)/character.$(O)           \
@@ -125,33 +124,34 @@ OBJ1 =  $(BLD)/alloc.$(O)         \
        $(BLD)/fringe.$(O)              \
        $(BLD)/image.$(O)               \
        $(BLD)/terminal.$(O)            \
-        $(BLD)/menu.$(O)
-
-WIN32OBJ = $(BLD)/w32term.$(O)         \
-          $(BLD)/w32xfns.$(O)          \
-          $(BLD)/w32fns.$(O)           \
-          $(BLD)/xfaces.$(O)           \
-          $(BLD)/w32select.$(O)        \
-          $(BLD)/w32menu.$(O)          \
-          $(BLD)/w32reg.$(O)
-
-FONTOBJ = $(BLD)/w32font.$(O) $(BLD)/w32uniscribe.$(O)
+       $(BLD)/menu.$(O)                \
+       $(BLD)/w32term.$(O)             \
+       $(BLD)/w32xfns.$(O)             \
+       $(BLD)/w32fns.$(O)              \
+       $(BLD)/xfaces.$(O)              \
+       $(BLD)/w32select.$(O)           \
+       $(BLD)/w32menu.$(O)             \
+       $(BLD)/w32reg.$(O)              \
+       $(BLD)/w32font.$(O)             \
+       $(BLD)/w32uniscribe.$(O)
 
 LIBS =  $(TLIB0)       \
        $(TLIB1)        \
-       $(TLIBW32)      \
+       $(TLIB2)        \
        $(TLASTLIB)     \
+       $(GNULIB)       \
        $(WINMM)        \
        $(ADVAPI32)     \
        $(GDI32)        \
        $(COMDLG32)     \
        $(USER32)       \
-       $(MPR)  \
+       $(MPR)          \
        $(SHELL32)      \
        $(WINSPOOL)     \
        $(OLE32)        \
        $(COMCTL32)     \
        $(UNISCRIBE)    \
+       $(USER_LIBS)    \
        $(libc)
 
 #
@@ -165,7 +165,7 @@ all:            $(ALL)
 emacs:          stamp_BLD $(EMACS)
 $(EMACS):       $(DOC) $(TEMACS)
        "$(THISDIR)/$(BLD)/temacs.exe" -batch -l loadup dump
-       -"$(THISDIR)/$(BLD)/emacs.exe" -q -batch -f list-load-path-shadows
+       -"$(THISDIR)/$(BLD)/emacs.exe" -batch -f list-load-path-shadows
 
 #
 # The undumped executable
@@ -174,8 +174,8 @@ $(EMACS):       $(DOC) $(TEMACS)
 # (it is the preload heap size in MB).
 #
 temacs:         stamp_BLD $(TEMACS)
-$(TEMACS):      $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
-                 ../nt/$(BLD)/addsection.exe
+$(TEMACS):      $(TLIB0) $(TLIB1) $(TLIB2) $(TLASTLIB) $(TOBJ) $(TRES) \
+                 ../nt/$(BLD)/addsection.exe $(GNULIB)
        $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
        "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21
 
@@ -190,18 +190,52 @@ make-buildobj-CMD:
        echo #define BUILDOBJ ^"\> buildobj.h
        echo $(OBJ0)            \>> buildobj.h
        echo $(OBJ1)            \>> buildobj.h
-       echo $(WIN32OBJ)        \>> buildobj.h
-       echo $(FONTOBJ)         \>> buildobj.h
+       echo $(OBJ2)            \>> buildobj.h
        echo ^">> buildobj.h
 
+# "
+# The above line is here to countermand the single quote
+# on the last "echo" command above, wrt font-lock.
 make-buildobj-SH:
        echo '#define BUILDOBJ $(DQUOTE)\'  > buildobj.h
        echo $(OBJ0)                   '\' >> buildobj.h
        echo $(OBJ1)                   '\' >> buildobj.h
-       echo $(WIN32OBJ)               '\' >> buildobj.h
-       echo $(FONTOBJ)                '\' >> buildobj.h
+       echo $(OBJ2)                   '\' >> buildobj.h
        echo '$(DQUOTE)'                   >> buildobj.h
 
+GLOBAL_SOURCES =   dosfns.c msdos.c \
+       xterm.c xfns.c xmenu.c xselect.c xrdb.c xsmfns.c fringe.c image.c \
+       fontset.c menu.c dbusbind.c \
+       w32.c w32console.c w32fns.c w32heap.c w32inevt.c \
+       w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c \
+       font.c w32font.c w32uniscribe.c \
+       dispnew.c frame.c scroll.c xdisp.c window.c bidi.c \
+       charset.c coding.c category.c ccl.c character.c chartab.c \
+       cm.c term.c terminal.c xfaces.c \
+       emacs.c keyboard.c macros.c keymap.c sysdep.c \
+       buffer.c filelock.c insdel.c marker.c \
+       minibuf.c fileio.c dired.c \
+       cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \
+       alloc.c data.c doc.c editfns.c callint.c \
+       eval.c floatfns.c fns.c print.c lread.c \
+       syntax.c bytecode.c \
+       process.c callproc.c unexw32.c \
+       region-cache.c sound.c atimer.c \
+       doprnt.c intervals.c textprop.c composite.c
+SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
+       xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o
+obj = $(GLOBAL_SOURCES:.c=.o)
+
+globals.h: gl-stamp
+       @cmd /c rem true
+
+gl-stamp: ../lib-src/$(BLD)/make-docfile.exe $(GLOBAL_SOURCES)
+       - $(DEL) gl-tmp
+       "../lib-src/$(BLD)/make-docfile" -d . -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp
+       cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h"
+       - $(DEL) gl-tmp
+       echo timestamp > $@
+
 bootstrap: bootstrap-emacs
 
 #
@@ -210,9 +244,15 @@ bootstrap: bootstrap-emacs
 #
 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
-bootstrap-temacs:
+bootstrap-temacs-CMD:
+       $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(ESC_CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
+
+bootstrap-temacs-SH:
        $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
 
+bootstrap-temacs:
+       $(MAKE) $(MFLAGS) bootstrap-temacs-$(SHELLTYPE)
+
 #
 # Dump an Emacs executable named bootstrap-emacs containing the
 # files from loadup.el in source form.
@@ -249,7 +289,7 @@ $(TLIB0):       $(OBJ0)
 $(TLIB1):       $(OBJ1)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
-$(TLIBW32):    $(WIN32OBJ) $(FONTOBJ)
+$(TLIB2):      $(OBJ2)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
 
@@ -278,7 +318,7 @@ clean:
        - $(DEL) "s/*.h~" "m/*.h~"
        - $(DEL) $(COMPILER_TEMP_FILES)
        - $(DEL_TREE) $(OBJDIR)
-       - $(DEL) stamp_BLD
+       - $(DEL) stamp_BLD gl-stamp globals.h
        - $(DEL) buildobj.h
 
 distclean:     cleanall
@@ -293,6 +333,52 @@ cleanall:  clean
        - $(DEL_TREE) oo
        - $(DEL_TREE) oo-spd
 
+## Arrange to make a tags table TAGS-LISP for ../lisp,
+## plus TAGS for the C files, which includes ../lisp/TAGS by reference.
+##
+## This works only with GNU Make.
+
+TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
+       $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
+
+TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2)
+       $(MAKE) $(MFLAGS) TAGS-LISP-$(MAKETYPE)
+
+TAGS-gmake:
+       ../lib-src/$(BLD)/etags.exe --include=TAGS-LISP --include=../nt/TAGS \
+         --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ0))
+       ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
+       ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2)) \
+         $(CURDIR)/*.h $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
+
+TAGS-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+frc:
+TAGS-LISP-gmake: frc
+       $(MAKE) $(MFLAGS) -C ../lisp TAGS-LISP DEST=../src
+
+TAGS-LISP-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+../nt/TAGS: frc
+       $(MAKE) $(MFLAGS) nt-TAGS-$(MAKETYPE)
+
+nt-TAGS-gmake:
+       $(MAKE) $(MFLAGS) -C ../nt TAGS
+
+nt-TAGS-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+full-tags: TAGS TAGS-LISP ../nt/TAGS
+.PHONY: full-tags
+
 ### DEPENDENCIES ###
 
 EMACS_ROOT = ..
@@ -300,13 +386,20 @@ CONFIG_H   = $(EMACS_ROOT)/src/s/ms-w32.h \
             $(EMACS_ROOT)/src/m/intel386.h \
             $(EMACS_ROOT)/src/config.h \
             $(EMACS_ROOT)/nt/inc/sys/stat.h
+LISP_H     = $(SRC)/lisp.h \
+            $(SRC)/globals.h \
+            $(EMACS_ROOT)/nt/inc/inttypes.h \
+            $(EMACS_ROOT)/nt/inc/stdint.h
+PROCESS_H  = $(SRC)/process.h \
+            $(EMACS_ROOT)/nt/inc/unistd.h \
+            $(SRC)/gnutls.h
 
 $(BLD)/alloc.$(O) : \
        $(SRC)/alloc.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -317,7 +410,6 @@ $(BLD)/alloc.$(O) : \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
-       $(SRC)/process.h \
        $(SRC)/puresize.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
@@ -331,7 +423,7 @@ $(BLD)/atimer.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/syssignal.h \
@@ -340,7 +432,7 @@ $(BLD)/atimer.$(O) : \
 $(BLD)/bidi.$(O) : \
        $(SRC)/bidi.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/bidimirror.h \
        $(SRC)/biditype.h \
        $(SRC)/buffer.h \
@@ -354,7 +446,7 @@ $(BLD)/buffer.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -376,7 +468,7 @@ $(BLD)/buffer.$(O) : \
 $(BLD)/bytecode.$(O) : \
        $(SRC)/bytecode.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/dispextern.h \
@@ -388,8 +480,9 @@ $(BLD)/callint.$(O) : \
        $(SRC)/callint.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -403,10 +496,11 @@ $(BLD)/callint.$(O) : \
 $(BLD)/callproc.$(O) : \
        $(SRC)/callproc.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -418,7 +512,6 @@ $(BLD)/callproc.$(O) : \
        $(SRC)/dispextern.h \
        $(SRC)/epaths.h \
        $(SRC)/frame.h \
-       $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
@@ -429,7 +522,7 @@ $(BLD)/callproc.$(O) : \
 $(BLD)/casefiddle.$(O) : \
        $(SRC)/casefiddle.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/commands.h \
@@ -440,14 +533,14 @@ $(BLD)/casefiddle.$(O) : \
 $(BLD)/casetab.$(O) : \
        $(SRC)/casetab.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h
 
 $(BLD)/category.$(O) : \
        $(SRC)/category.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
        $(SRC)/character.h \
@@ -457,7 +550,7 @@ $(BLD)/category.$(O) : \
 $(BLD)/ccl.$(O) : \
        $(SRC)/ccl.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
@@ -467,7 +560,7 @@ $(BLD)/ccl.$(O) : \
 $(BLD)/character.$(O) : \
        $(SRC)/character.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
@@ -478,7 +571,7 @@ $(BLD)/charset.$(O) : \
        $(SRC)/charset.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
@@ -489,7 +582,7 @@ $(BLD)/charset.$(O) : \
 $(BLD)/chartab.$(O) : \
        $(SRC)/chartab.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
        $(SRC)/charset.h
@@ -498,7 +591,7 @@ $(BLD)/cmds.$(O) : \
        $(SRC)/cmds.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/coding.h \
@@ -516,7 +609,7 @@ $(BLD)/cmds.$(O) : \
 $(BLD)/coding.$(O) : \
        $(SRC)/coding.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
@@ -532,7 +625,7 @@ $(BLD)/coding.$(O) : \
 $(BLD)/composite.$(O) : \
        $(SRC)/composite.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
@@ -550,7 +643,7 @@ $(BLD)/data.$(O) : \
        $(SRC)/data.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
@@ -574,7 +667,8 @@ $(BLD)/dired.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/dir.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/filemode.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -590,9 +684,9 @@ $(BLD)/dired.$(O) : \
 $(BLD)/dispnew.$(O) : \
        $(SRC)/dispnew.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -607,7 +701,6 @@ $(BLD)/dispnew.$(O) : \
        $(SRC)/indent.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
-       $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
@@ -624,7 +717,7 @@ $(BLD)/doc.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/coding.h \
@@ -637,7 +730,7 @@ $(BLD)/doprnt.$(O) : \
        $(SRC)/doprnt.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/character.h
 
 $(BLD)/editfns.$(O) : \
@@ -646,7 +739,9 @@ $(BLD)/editfns.$(O) : \
        $(EMACS_ROOT)/nt/inc/pwd.h \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/intprops.h \
+       $(EMACS_ROOT)/lib/strftime.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -663,10 +758,11 @@ $(BLD)/editfns.$(O) : \
 $(BLD)/emacs.$(O) : \
        $(SRC)/emacs.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -678,11 +774,11 @@ $(BLD)/emacs.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
-       $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
        $(SRC)/termhooks.h \
+       $(SRC)/unexec.h \
        $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
@@ -692,7 +788,7 @@ $(BLD)/eval.$(O) : \
        $(SRC)/eval.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/coding.h \
@@ -710,7 +806,7 @@ $(BLD)/fileio.$(O) : \
        $(EMACS_ROOT)/nt/inc/pwd.h \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -732,17 +828,13 @@ $(BLD)/filelock.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/systime.h
 
-$(BLD)/filemode.$(O) : \
-       $(SRC)/filemode.c \
-       $(CONFIG_H)
-
 $(BLD)/firstfile.$(O) : \
        $(SRC)/firstfile.c \
        $(CONFIG_H)
@@ -750,7 +842,7 @@ $(BLD)/firstfile.$(O) : \
 $(BLD)/floatfns.$(O) : \
        $(SRC)/floatfns.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/syssignal.h
 
 $(BLD)/fns.$(O) : \
@@ -760,7 +852,8 @@ $(BLD)/fns.$(O) : \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/md5.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -773,7 +866,6 @@ $(BLD)/fns.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
-       $(SRC)/md5.h \
        $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
@@ -781,7 +873,7 @@ $(BLD)/fns.$(O) : \
 $(BLD)/font.$(O) : \
        $(SRC)/font.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
@@ -799,7 +891,7 @@ $(BLD)/fontset.$(O) : \
        $(SRC)/fontset.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -824,7 +916,7 @@ $(BLD)/frame.$(O) : \
        $(SRC)/frame.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -849,7 +941,7 @@ $(BLD)/fringe.$(O) : \
        $(SRC)/fringe.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -866,12 +958,19 @@ $(BLD)/gmalloc.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(SRC)/getpagesize.h
 
+$(BLD)/gnutls.$(O) : \
+       $(SRC)/gnutls.c \
+       $(CONFIG_H) \
+       $(LISP_H) \
+       $(PROCESS_H) \
+       $(SRC)/w32.h
+
 $(BLD)/image.$(O) : \
        $(SRC)/image.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/ccl.h \
@@ -884,6 +983,7 @@ $(BLD)/image.$(O) : \
        $(SRC)/frame.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
+       $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
@@ -892,7 +992,7 @@ $(BLD)/indent.$(O) : \
        $(SRC)/indent.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
        $(SRC)/character.h \
@@ -915,7 +1015,7 @@ $(BLD)/insdel.$(O) : \
        $(SRC)/insdel.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -932,7 +1032,8 @@ $(BLD)/intervals.$(O) : \
        $(SRC)/intervals.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/intprops.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -947,10 +1048,10 @@ $(BLD)/intervals.$(O) : \
 $(BLD)/keyboard.$(O) : \
        $(SRC)/keyboard.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -965,7 +1066,6 @@ $(BLD)/keyboard.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/macros.h \
-       $(SRC)/process.h \
        $(SRC)/puresize.h \
        $(SRC)/syntax.h \
        $(SRC)/syssignal.h \
@@ -981,7 +1081,7 @@ $(BLD)/keymap.$(O) : \
        $(SRC)/keymap.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1011,7 +1111,7 @@ $(BLD)/lread.$(O) : \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1033,7 +1133,7 @@ $(BLD)/macros.$(O) : \
        $(SRC)/macros.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -1048,20 +1148,15 @@ $(BLD)/macros.$(O) : \
 $(BLD)/marker.$(O) : \
        $(SRC)/marker.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h
 
-$(BLD)/md5.$(O) : \
-       $(SRC)/md5.c \
-       $(CONFIG_H) \
-       $(SRC)/md5.h
-
 $(BLD)/menu.$(O) : \
        $(SRC)/menu.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/coding.h \
@@ -1081,7 +1176,7 @@ $(BLD)/minibuf.$(O) : \
        $(SRC)/minibuf.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/character.h \
        $(SRC)/coding.h \
@@ -1103,16 +1198,17 @@ $(BLD)/w32.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/grp.h \
        $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/socket.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/allocator.h \
+       $(EMACS_ROOT)/lib/careadlinkat.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/ndir.h \
-       $(SRC)/process.h \
        $(SRC)/systime.h \
        $(SRC)/w32.h \
        $(SRC)/w32gui.h \
@@ -1121,14 +1217,14 @@ $(BLD)/w32.$(O) : \
 $(BLD)/w32heap.$(O) : \
        $(SRC)/w32heap.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/w32heap.h
 
 $(BLD)/w32inevt.$(O) : \
        $(SRC)/w32inevt.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/coding.h \
@@ -1147,15 +1243,14 @@ $(BLD)/w32proc.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/langinfo.h \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
-       $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/syswait.h \
@@ -1167,7 +1262,7 @@ $(BLD)/w32proc.$(O) : \
 $(BLD)/w32console.$(O) : \
        $(SRC)/w32console.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -1182,9 +1277,11 @@ $(BLD)/w32console.$(O) : \
 $(BLD)/print.$(O) : \
        $(SRC)/print.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/ftoastr.h \
+       $(EMACS_ROOT)/lib/intprops.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1198,7 +1295,6 @@ $(BLD)/print.$(O) : \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
-       $(SRC)/process.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
@@ -1209,13 +1305,14 @@ $(BLD)/process.$(O) : \
        $(SRC)/process.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/netdb.h \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/arpa/inet.h \
        $(EMACS_ROOT)/nt/inc/netinet/in.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/socket.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1226,7 +1323,6 @@ $(BLD)/process.$(O) : \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
-       $(SRC)/process.h \
        $(SRC)/sysselect.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
@@ -1243,7 +1339,7 @@ $(BLD)/ralloc.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/getpagesize.h \
@@ -1252,7 +1348,7 @@ $(BLD)/ralloc.$(O) : \
 $(BLD)/regex.$(O) : \
        $(SRC)/regex.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
        $(SRC)/character.h \
@@ -1262,7 +1358,7 @@ $(BLD)/regex.$(O) : \
 $(BLD)/region-cache.$(O) : \
        $(SRC)/region-cache.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/region-cache.h
 
@@ -1270,7 +1366,7 @@ $(BLD)/scroll.$(O) : \
        $(SRC)/scroll.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -1286,7 +1382,7 @@ $(BLD)/search.$(O) : \
        $(SRC)/search.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1308,22 +1404,17 @@ $(BLD)/sound.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/dispextern.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/w32gui.h
 
-$(BLD)/strftime.$(O) : \
-       $(SRC)/strftime.c \
-       $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/sys/time.h
-
 $(BLD)/syntax.$(O) : \
        $(SRC)/syntax.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
        $(SRC)/character.h \
@@ -1342,12 +1433,15 @@ $(BLD)/sysdep.$(O) : \
        $(EMACS_ROOT)/nt/inc/grp.h \
        $(EMACS_ROOT)/nt/inc/netdb.h \
        $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/socket.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(EMACS_ROOT)/lib/allocator.h \
+       $(EMACS_ROOT)/lib/careadlinkat.h \
+       $(EMACS_ROOT)/lib/ignore-value.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/cm.h \
@@ -1356,7 +1450,7 @@ $(BLD)/sysdep.$(O) : \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
-       $(SRC)/process.h \
+       $(SRC)/sysselect.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
@@ -1373,8 +1467,9 @@ $(BLD)/term.$(O) : \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1395,6 +1490,7 @@ $(BLD)/term.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
+       $(SRC)/tparam.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
@@ -1402,7 +1498,7 @@ $(BLD)/terminal.$(O) : \
        $(SRC)/terminal.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -1417,7 +1513,7 @@ $(BLD)/terminal.$(O) : \
 $(BLD)/textprop.$(O) : \
        $(SRC)/textprop.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -1428,12 +1524,13 @@ $(BLD)/textprop.$(O) : \
 $(BLD)/tparam.$(O) : \
        $(SRC)/tparam.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h
+       $(LISP_H) \
+       $(SRC)/tparam.h
 
 $(BLD)/undo.$(O) : \
        $(SRC)/undo.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/buffer.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
@@ -1443,19 +1540,20 @@ $(BLD)/undo.$(O) : \
 $(BLD)/unexw32.$(O) : \
        $(SRC)/unexw32.c \
        $(CONFIG_H) \
+       $(SRC)/unexec.h \
        $(SRC)/w32heap.h
 
 $(BLD)/vm-limit.$(O) : \
        $(SRC)/vm-limit.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/mem-limits.h
 
 $(BLD)/window.$(O) : \
        $(SRC)/window.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1479,9 +1577,9 @@ $(BLD)/window.$(O) : \
 $(BLD)/xdisp.$(O) : \
        $(SRC)/xdisp.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1501,11 +1599,11 @@ $(BLD)/xdisp.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/macros.h \
-       $(SRC)/process.h \
        $(SRC)/region-cache.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
+       $(SRC)/termopts.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
@@ -1514,7 +1612,7 @@ $(BLD)/xfaces.$(O) : \
        $(SRC)/xfaces.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1540,7 +1638,7 @@ $(BLD)/w32fns.$(O) : \
        $(SRC)/w32fns.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1569,7 +1667,7 @@ $(BLD)/w32menu.$(O) : \
        $(SRC)/w32menu.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1591,9 +1689,10 @@ $(BLD)/w32menu.$(O) : \
 $(BLD)/w32term.$(O) : \
        $(SRC)/w32term.c \
        $(CONFIG_H) \
-       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
+       $(PROCESS_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1610,7 +1709,6 @@ $(BLD)/w32term.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
-       $(SRC)/process.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
        $(SRC)/termchar.h \
@@ -1626,14 +1724,13 @@ $(BLD)/w32select.$(O) : \
        $(SRC)/w32select.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
-       $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
@@ -1643,7 +1740,7 @@ $(BLD)/w32reg.$(O) : \
        $(SRC)/w32reg.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/systime.h \
@@ -1654,7 +1751,7 @@ $(BLD)/w32xfns.$(O) : \
        $(SRC)/w32xfns.c \
        $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/time.h \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/charset.h \
@@ -1671,7 +1768,7 @@ $(BLD)/w32xfns.$(O) : \
 $(BLD)/w32font.$(O) : \
        $(SRC)/w32font.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
@@ -1688,7 +1785,7 @@ $(BLD)/w32font.$(O) : \
 $(BLD)/w32uniscribe.$(O) : \
        $(SRC)/w32uniscribe.c \
        $(CONFIG_H) \
-       $(SRC)/lisp.h \
+       $(LISP_H) \
        $(SRC)/ccl.h \
        $(SRC)/character.h \
        $(SRC)/charset.h \
@@ -1704,4 +1801,4 @@ $(BLD)/w32uniscribe.$(O) : \
 # Each object file depends on stamp_BLD, because in parallel builds we must
 # make sure $(BLD) exists before starting compilations.
 #
-$(OBJ0) $(OBJ1) $(WIN32OBJ) $(FONTOBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD
+$(OBJ0) $(OBJ1) $(OBJ2) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD