(x_set_alpha): Set alpha to -1 if nil given.
[bpt/emacs.git] / src / makefile.w32-in
index 65c5d87..a8df466 100644 (file)
@@ -1,24 +1,22 @@
-#  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-#  Copyright (C) 2000, 2001, 2002, 2003, 2004,
-#                2005, 2006, 2007 Free Software Foundation, Inc.
-#
-#  This file is part of GNU Emacs.
-#
-#  GNU Emacs is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 3, or (at your option)
-#  any later version.
-#
-#  GNU Emacs is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with GNU Emacs; see the file COPYING.  If not, write to the
-#  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-#  Boston, MA 02110-1301, USA.
-#
+# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#   2008  Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 
 ALL = emacs
 
@@ -31,7 +29,7 @@ EMACSLOADPATH=$(CURDIR)/../lisp
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
 # the emacs source tree.
 #
-LOCAL_FLAGS     = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I../nt/inc -D_UCHAR_T -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
+LOCAL_FLAGS     = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
 
 EMACS           = $(BLD)/emacs.exe
 TEMACS          = $(BLD)/temacs.exe
@@ -45,7 +43,7 @@ TLASTLIB      = $(BLD)/lastfile.$(A)
 
 DOC            = $(OBJDIR)/etc/DOC-X
 
-FULL_LINK_FLAGS      = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
+FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
 
 #
 # Split up the objects into two sets so that we don't run out of
@@ -56,42 +54,42 @@ FULL_LINK_FLAGS      = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
 #
 OBJ0 =  $(BLD)/emacs.$(O)
 
-OBJ1 =  $(BLD)/alloc.$(O)                      \
+OBJ1 =  $(BLD)/alloc.$(O)              \
        $(BLD)/atimer.$(O)                      \
        $(BLD)/buffer.$(O)                      \
-       $(BLD)/bytecode.$(O)                    \
-       $(BLD)/callint.$(O)                     \
-       $(BLD)/callproc.$(O)                    \
-       $(BLD)/casefiddle.$(O)                  \
-       $(BLD)/cm.$(O)                          \
+       $(BLD)/bytecode.$(O)            \
+       $(BLD)/callint.$(O)             \
+       $(BLD)/callproc.$(O)            \
+       $(BLD)/casefiddle.$(O)          \
+       $(BLD)/cm.$(O)                  \
        $(BLD)/cmds.$(O)                        \
        $(BLD)/data.$(O)                        \
        $(BLD)/dired.$(O)                       \
-       $(BLD)/dispnew.$(O)                     \
-       $(BLD)/doc.$(O)                         \
+       $(BLD)/dispnew.$(O)             \
+       $(BLD)/doc.$(O)                 \
        $(BLD)/doprnt.$(O)                      \
-       $(BLD)/editfns.$(O)                     \
+       $(BLD)/editfns.$(O)             \
        $(BLD)/eval.$(O)                        \
        $(BLD)/fileio.$(O)                      \
-       $(BLD)/filelock.$(O)                    \
-       $(BLD)/filemode.$(O)                    \
-       $(BLD)/fns.$(O)                         \
+       $(BLD)/filelock.$(O)            \
+       $(BLD)/filemode.$(O)            \
+       $(BLD)/fns.$(O)                 \
        $(BLD)/indent.$(O)                      \
        $(BLD)/insdel.$(O)                      \
-       $(BLD)/keyboard.$(O)                    \
+       $(BLD)/keyboard.$(O)            \
        $(BLD)/keymap.$(O)                      \
        $(BLD)/lread.$(O)                       \
        $(BLD)/macros.$(O)                      \
        $(BLD)/marker.$(O)                      \
-       $(BLD)/md5.$(O)                         \
-       $(BLD)/minibuf.$(O)                     \
-       $(BLD)/w32.$(O)                         \
-       $(BLD)/w32heap.$(O)                     \
-       $(BLD)/w32inevt.$(O)                    \
-       $(BLD)/w32proc.$(O)                     \
-       $(BLD)/w32console.$(O)                  \
+       $(BLD)/md5.$(O)                 \
+       $(BLD)/minibuf.$(O)             \
+       $(BLD)/w32.$(O)                 \
+       $(BLD)/w32heap.$(O)             \
+       $(BLD)/w32inevt.$(O)            \
+       $(BLD)/w32proc.$(O)             \
+       $(BLD)/w32console.$(O)          \
        $(BLD)/print.$(O)                       \
-       $(BLD)/process.$(O)                     \
+       $(BLD)/process.$(O)             \
        $(BLD)/regex.$(O)                       \
        $(BLD)/scroll.$(O)                      \
        $(BLD)/search.$(O)                      \
@@ -99,40 +97,45 @@ OBJ1 =  $(BLD)/alloc.$(O)                   \
        $(BLD)/syntax.$(O)                      \
        $(BLD)/sysdep.$(O)                      \
        $(BLD)/term.$(O)                        \
-       $(BLD)/termcap.$(O)                     \
+       $(BLD)/termcap.$(O)             \
        $(BLD)/tparam.$(O)                      \
        $(BLD)/undo.$(O)                        \
-       $(BLD)/unexw32.$(O)                     \
+       $(BLD)/unexw32.$(O)             \
        $(BLD)/window.$(O)                      \
        $(BLD)/xdisp.$(O)                       \
-       $(BLD)/casetab.$(O)                     \
-       $(BLD)/floatfns.$(O)                    \
+       $(BLD)/casetab.$(O)             \
+       $(BLD)/floatfns.$(O)            \
        $(BLD)/frame.$(O)                       \
-       $(BLD)/gmalloc.$(O)                     \
-       $(BLD)/intervals.$(O)                   \
-       $(BLD)/composite.$(O)                   \
+       $(BLD)/gmalloc.$(O)             \
+       $(BLD)/intervals.$(O)           \
+       $(BLD)/composite.$(O)           \
        $(BLD)/ralloc.$(O)                      \
-       $(BLD)/textprop.$(O)                    \
-       $(BLD)/vm-limit.$(O)                    \
+       $(BLD)/textprop.$(O)            \
+       $(BLD)/vm-limit.$(O)            \
        $(BLD)/region-cache.$(O)                \
-       $(BLD)/strftime.$(O)                    \
-       $(BLD)/charset.$(O)                     \
+       $(BLD)/strftime.$(O)            \
+       $(BLD)/charset.$(O)             \
+       $(BLD)/character.$(O)           \
+       $(BLD)/chartab.$(O)             \
        $(BLD)/coding.$(O)                      \
-       $(BLD)/category.$(O)                    \
-       $(BLD)/ccl.$(O)                         \
-       $(BLD)/fontset.$(O)                     \
+       $(BLD)/category.$(O)            \
+       $(BLD)/ccl.$(O)                 \
+       $(BLD)/font.$(O)                        \
+       $(BLD)/fontset.$(O)             \
        $(BLD)/fringe.$(O)                      \
        $(BLD)/image.$(O)                       \
-       $(BLD)/terminal.$(O)
+       $(BLD)/terminal.$(O)            \
+        $(BLD)/menu.$(O)
 
-WIN32OBJ = $(BLD)/w32term.$(O)                 \
-          $(BLD)/w32xfns.$(O)                  \
-          $(BLD)/w32fns.$(O)                   \
-          $(BLD)/xfaces.$(O)                   \
+WIN32OBJ = $(BLD)/w32term.$(O)         \
+          $(BLD)/w32xfns.$(O)          \
+          $(BLD)/w32fns.$(O)           \
+          $(BLD)/xfaces.$(O)           \
           $(BLD)/w32select.$(O)                \
-          $(BLD)/w32menu.$(O)                  \
-          $(BLD)/w32reg.$(O)                   \
-          $(BLD)/w32bdf.$(O)
+          $(BLD)/w32menu.$(O)          \
+          $(BLD)/w32reg.$(O)
+
+FONTOBJ = $(BLD)/w32font.$(O) $(BLD)/w32uniscribe.$(O)
 
 LIBS =  $(TLIB0)       \
        $(TLIB1)        \
@@ -143,11 +146,12 @@ LIBS =  $(TLIB0)  \
        $(GDI32)        \
        $(COMDLG32)     \
        $(USER32)       \
-       $(MPR)          \
+       $(MPR)  \
        $(SHELL32)      \
        $(WINSPOOL)     \
        $(OLE32)        \
        $(COMCTL32)     \
+       $(UNISCRIBE)    \
        $(libc)
 
 #
@@ -173,10 +177,11 @@ temacs:         stamp_BLD $(TEMACS)
 $(TEMACS):      $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
                  ../nt/$(BLD)/addsection.exe
        $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
-       "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16
+       "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21
        echo $(OBJ0) > $(BLD)/buildobj.lst
        echo $(OBJ1) >> $(BLD)/buildobj.lst
        echo $(WIN32OBJ) >> $(BLD)/buildobj.lst
+       echo $(FONTOBJ) >> $(BLD)/buildobj.lst
 
 bootstrap: bootstrap-emacs
 
@@ -225,7 +230,7 @@ $(TLIB0):       $(OBJ0)
 $(TLIB1):       $(OBJ1)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
-$(TLIBW32):    $(WIN32OBJ)
+$(TLIBW32):    $(WIN32OBJ) $(FONTOBJ)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
 
@@ -256,8 +261,11 @@ clean:
        - $(DEL_TREE) $(OBJDIR)
        - $(DEL) stamp_BLD
 
-distclean:     clean
-       - $(DEL) config.h epaths.h
+distclean:     cleanall
+       - $(DEL) config.h epaths.h Makefile
+
+maintainer-clean: distclean
+       - $(DEL) TAGS
 
 cleanall:      clean
        - $(DEL_TREE) obj
@@ -267,16 +275,30 @@ cleanall: clean
 
 ### DEPENDENCIES ###
 
-EMACS_ROOT     = ..
-SRC            = .
+EMACS_ROOT = ..
+SRC       = .
+CONFIG_H   = $(EMACS_ROOT)/src/s/ms-w32.h \
+            $(EMACS_ROOT)/src/m/intel386.h \
+            $(EMACS_ROOT)/src/config.h
+
+$(BLD)/abbrev.$(O) : \
+       $(SRC)/abbrev.c \
+       $(CONFIG_H) \
+       $(SRC)/buffer.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/commands.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/syntax.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/window.h
 
 $(BLD)/alloc.$(O) : \
        $(SRC)/alloc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -286,18 +308,12 @@ $(BLD)/alloc.$(O) : \
        $(SRC)/process.h \
        $(SRC)/puresize.h \
        $(SRC)/syssignal.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/atimer.$(O) : \
        $(SRC)/atimer.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/syssignal.h \
@@ -305,10 +321,8 @@ $(BLD)/atimer.$(O) : \
 
 $(BLD)/buffer.$(O) : \
        $(SRC)/buffer.c \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/charset.h \
@@ -321,15 +335,12 @@ $(BLD)/buffer.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/region-cache.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/bytecode.$(O) : \
        $(SRC)/bytecode.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/charset.h \
        $(SRC)/syntax.h \
@@ -337,28 +348,24 @@ $(BLD)/bytecode.$(O) : \
 
 $(BLD)/callint.$(O) : \
        $(SRC)/callint.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/callproc.$(O) : \
        $(SRC)/callproc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -373,10 +380,9 @@ $(BLD)/callproc.$(O) : \
 
 $(BLD)/casefiddle.$(O) : \
        $(SRC)/casefiddle.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -385,74 +391,80 @@ $(BLD)/casefiddle.$(O) : \
 
 $(BLD)/casetab.$(O) : \
        $(SRC)/casetab.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/charset.h
 
 $(BLD)/category.$(O) : \
        $(SRC)/category.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/keymap.h
 
 $(BLD)/ccl.$(O) : \
        $(SRC)/ccl.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h
 
+$(BLD)/character.$(O) : \
+       $(SRC)/character.c \
+       $(CONFIG_H) \
+       $(SRC)/buffer.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/disptab.h
+
 $(BLD)/charset.$(O) : \
        $(SRC)/charset.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/disptab.h
 
+$(BLD)/chartab.$(O) : \
+       $(SRC)/chartab.c \
+       $(CONFIG_H) \
+       $(SRC)/charset.h \
+       $(SRC)/character.h
+
 $(BLD)/cm.$(O) : \
        $(SRC)/cm.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/cm.h \
        $(SRC)/termhooks.h
 
 $(BLD)/cmds.$(O) : \
        $(SRC)/cmds.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/syntax.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/coding.$(O) : \
        $(SRC)/coding.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -460,29 +472,25 @@ $(BLD)/coding.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/frame.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/composite.$(O) : \
        $(SRC)/composite.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/data.$(O) : \
        $(SRC)/data.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
@@ -492,11 +500,10 @@ $(BLD)/data.$(O) : \
 
 $(BLD)/dired.$(O) : \
        $(SRC)/dired.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -506,14 +513,13 @@ $(BLD)/dired.$(O) : \
 
 $(BLD)/dispnew.$(O) : \
        $(SRC)/dispnew.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/cm.h \
        $(SRC)/commands.h \
@@ -530,37 +536,33 @@ $(BLD)/dispnew.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/doc.$(O) : \
        $(SRC)/doc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h
 
 $(BLD)/doprnt.$(O) : \
        $(SRC)/doprnt.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/character.h \
        $(SRC)/charset.c
 
 $(BLD)/editfns.$(O) : \
        $(SRC)/editfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -568,15 +570,12 @@ $(BLD)/editfns.$(O) : \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/emacs.$(O) : \
        $(SRC)/emacs.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/atimer.h \
@@ -593,35 +592,30 @@ $(BLD)/emacs.$(O) : \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/window.h
 
 $(BLD)/eval.$(O) : \
        $(SRC)/eval.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/fileio.$(O) : \
        $(SRC)/fileio.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -629,57 +623,45 @@ $(BLD)/fileio.$(O) : \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/filelock.$(O) : \
        $(SRC)/filelock.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/src/epaths.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/systime.h
 
 $(BLD)/filemode.$(O) : \
        $(SRC)/filemode.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h
+       $(CONFIG_H)
 
 $(BLD)/firstfile.$(O) : \
        $(SRC)/firstfile.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/floatfns.$(O) : \
        $(SRC)/floatfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/syssignal.h
 
 $(BLD)/fns.$(O) : \
        $(SRC)/fns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/langinfo.h \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -692,35 +674,43 @@ $(BLD)/fns.$(O) : \
        $(SRC)/md5.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
+$(BLD)/font.$(O) : \
+       $(SRC)/font.c \
+       $(CONFIG_H) \
+       $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
+       $(SRC)/window.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/font.h
+
 $(BLD)/fontset.$(O) : \
        $(SRC)/fontset.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/frame.$(O) : \
        $(SRC)/frame.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
@@ -730,39 +720,31 @@ $(BLD)/frame.$(O) : \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/fringe.$(O) : \
        $(SRC)/fringe.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/gmalloc.$(O) : \
        $(SRC)/gmalloc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
        $(SRC)/getpagesize.h
 
 $(BLD)/image.$(O): \
        $(SRC)/image.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/dispextern.h \
@@ -770,7 +752,6 @@ $(BLD)/image.$(O): \
        $(SRC)/frame.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
@@ -778,11 +759,10 @@ $(BLD)/image.$(O): \
 
 $(BLD)/indent.$(O) : \
        $(SRC)/indent.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -794,33 +774,28 @@ $(BLD)/indent.$(O) : \
        $(SRC)/region-cache.h \
        $(SRC)/termchar.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/insdel.$(O) : \
        $(SRC)/insdel.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
        $(SRC)/region-cache.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/intervals.$(O) : \
        $(SRC)/intervals.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -828,19 +803,17 @@ $(BLD)/intervals.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/puresize.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/keyboard.$(O) : \
        $(SRC)/keyboard.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -859,19 +832,17 @@ $(BLD)/keyboard.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/keymap.$(O) : \
        $(SRC)/keymap.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -882,25 +853,21 @@ $(BLD)/keymap.$(O) : \
        $(SRC)/puresize.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/lastfile.$(O) : \
        $(SRC)/lastfile.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/lread.$(O) : \
        $(SRC)/lread.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/src/epaths.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -909,41 +876,47 @@ $(BLD)/lread.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/macros.$(O) : \
        $(SRC)/macros.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/commands.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/macros.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/marker.$(O) : \
        $(SRC)/marker.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h
 
 $(BLD)/md5.$(O) : \
        $(SRC)/md5.c \
        $(SRC)/md5.h
 
+$(BLD)/menu.$(O) : \
+        $(SRC)/menu.c \
+        $(CONFIG_H) \
+        $(SRC)/keyboard.h \
+        $(SRC)/keymap.h \
+        $(SRC)/frame.h \
+        $(SRC)/termhooks.h \
+        $(SRC)/blockinput.h \
+        $(SRC)/dispextern.h \
+        $(SRC)/w32gui.h \
+        $(SRC)/w32term.h
+
 $(BLD)/minibuf.$(O) : \
        $(SRC)/minibuf.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -954,16 +927,13 @@ $(BLD)/minibuf.$(O) : \
        $(SRC)/keymap.h \
        $(SRC)/syntax.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/w32.$(O) : \
        $(SRC)/w32.c \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
        $(SRC)/ndir.h \
        $(SRC)/systime.h \
        $(SRC)/w32.h \
@@ -971,66 +941,56 @@ $(BLD)/w32.$(O) : \
 
 $(BLD)/w32heap.$(O) : \
        $(SRC)/w32heap.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(CONFIG_H) \
        $(SRC)/w32heap.h
 
 $(BLD)/w32inevt.$(O) : \
        $(SRC)/w32inevt.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32proc.$(O) : \
        $(SRC)/w32proc.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/langinfo.h \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
-       $(SRC)/config.h \
+       $(SRC)/character.h \
        $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/syswait.h \
        $(SRC)/w32.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32console.$(O) : \
        $(SRC)/w32console.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
+       $(CONFIG_H) \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
-       $(SRC)/config.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
        $(SRC)/frame.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32inevt.h
 
 $(BLD)/print.$(O) : \
        $(SRC)/print.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -1039,21 +999,19 @@ $(BLD)/print.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/process.h \
        $(SRC)/termchar.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/process.$(O) : \
        $(SRC)/process.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
@@ -1069,66 +1027,50 @@ $(BLD)/process.$(O) : \
        $(SRC)/syswait.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/ralloc.$(O) : \
        $(SRC)/ralloc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
        $(SRC)/getpagesize.h
 
 $(BLD)/regex.$(O) : \
        $(SRC)/regex.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
-       $(SRC)/config.h \
        $(SRC)/regex.h \
        $(SRC)/syntax.h
 
 $(BLD)/region-cache.$(O) : \
        $(SRC)/region-cache.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/region-cache.h
 
 $(BLD)/scroll.$(O) : \
        $(SRC)/scroll.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/search.$(O) : \
        $(SRC)/search.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -1138,29 +1080,25 @@ $(BLD)/search.$(O) : \
        $(SRC)/region-cache.h \
        $(SRC)/syntax.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/sound.$(O) : \
        $(SRC)/sound.c \
-       $(SRC)/lisp.h \
+       $(CONFIG_H) \
        $(SRC)/dispextern.h \
        $(SRC)/atimer.h \
        $(SRC)/syssignal.h
 
 $(BLD)/strftime.$(O) : \
        $(SRC)/strftime.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/syntax.$(O) : \
        $(SRC)/syntax.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -1168,14 +1106,11 @@ $(BLD)/syntax.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keymap.h \
        $(SRC)/syntax.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/sysdep.$(O) : \
        $(SRC)/sysdep.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
@@ -1196,16 +1131,14 @@ $(BLD)/sysdep.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/term.$(O) : \
        $(SRC)/term.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/cm.h \
        $(SRC)/coding.h \
@@ -1217,22 +1150,17 @@ $(BLD)/term.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/termcap.$(O) : \
        $(SRC)/termcap.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/sys/file.h
 
 $(BLD)/terminal.$(O) : \
        $(SRC)/terminal.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/frame.h \
@@ -1242,50 +1170,37 @@ $(BLD)/terminal.$(O) : \
 
 $(BLD)/textprop.$(O) : \
        $(SRC)/textprop.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/tparam.$(O) : \
        $(SRC)/tparam.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/undo.$(O) : \
        $(SRC)/undo.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/buffer.h \
        $(SRC)/commands.h
 
 $(BLD)/unexw32.$(O) : \
        $(SRC)/unexw32.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/w32heap.h
 
 $(BLD)/vm-limit.$(O) : \
        $(SRC)/vm-limit.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/mem-limits.h
 
 $(BLD)/window.$(O) : \
        $(SRC)/window.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -1300,26 +1215,25 @@ $(BLD)/window.$(O) : \
        $(SRC)/keymap.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/xdisp.$(O) : \
        $(SRC)/xdisp.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/indent.h \
@@ -1332,22 +1246,21 @@ $(BLD)/xdisp.$(O) : \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/xfaces.$(O): \
        $(SRC)/xfaces.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
@@ -1355,32 +1268,30 @@ $(BLD)/xfaces.$(O): \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/w32fns.$(O): \
        $(SRC)/w32fns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/epaths.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
@@ -1388,12 +1299,11 @@ $(BLD)/w32fns.$(O): \
 
 $(BLD)/w32menu.$(O): \
        $(SRC)/w32menu.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/dispextern.h \
@@ -1402,28 +1312,26 @@ $(BLD)/w32menu.$(O): \
        $(SRC)/keymap.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/w32term.$(O): \
        $(SRC)/w32term.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
-       $(SRC)/gnu.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
@@ -1432,7 +1340,6 @@ $(BLD)/w32term.$(O): \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
@@ -1440,13 +1347,12 @@ $(BLD)/w32term.$(O): \
 
 $(BLD)/w32select.$(O): \
        $(SRC)/w32select.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
@@ -1454,57 +1360,61 @@ $(BLD)/w32select.$(O): \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32reg.$(O): \
        $(SRC)/w32reg.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32xfns.$(O): \
        $(SRC)/w32xfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
-$(BLD)/w32bdf.$(O): \
-       $(SRC)/w32bdf.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/atimer.h \
-       $(SRC)/blockinput.h \
+$(BLD)/w32font.$(O): \
+       $(SRC)/w32font.c \
+       $(CONFIG_H) \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
-       $(SRC)/keyboard.h \
-       $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32font.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/w32term.h
+
+$(BLD)/w32uniscribe.$(O): \
+       $(SRC)/w32uniscribe.c \
+       $(CONFIG_H) \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/font.h \
+       $(SRC)/fontset.h \
+       $(SRC)/frame.h \
+       $(SRC)/w32font.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
 # Each object file depends on stamp_BLD, because in parallel builds we must
 # make sure $(BLD) exists before starting compilations.
 #
-$(OBJ0) $(OBJ1) $(WIN32OBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD
+$(OBJ0) $(OBJ1) $(WIN32OBJ) $(FONTOBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD