(x_draw_image_glyph_string): Adjust stipple origin when
[bpt/emacs.git] / src / makefile.w32-in
index c2a6e4a..6611efb 100644 (file)
@@ -1,11 +1,12 @@
-#  Makefile for GNU Emacs on the Microsoft W32 API.
-#  Copyright (c) 2000-2001 Free Software Foundation, Inc.
+#  -*- 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 2, or (at your option)
+#  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,
@@ -15,8 +16,8 @@
 #
 #  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., 59 Temple Place - Suite 330,
-#  Boston, MA 02111-1307, USA.
+#  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#  Boston, MA 02110-1301, USA.
 #
 
 ALL = emacs
@@ -42,6 +43,8 @@ TOBJ            = $(BLD)/firstfile.$(O)
 TRES           = $(BLD)/emacs.res
 TLASTLIB       = $(BLD)/lastfile.$(A)
 
+DOC            = $(OBJDIR)/etc/DOC-X
+
 FULL_LINK_FLAGS      = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
 
 #
@@ -135,7 +138,7 @@ LIBS =  $(TLIB0)    \
        $(TLIB1)        \
        $(TLIBW32)      \
        $(TLASTLIB)     \
-       $(WINMM)    \
+       $(WINMM)        \
        $(ADVAPI32)     \
        $(GDI32)        \
        $(COMDLG32)     \
@@ -143,6 +146,7 @@ LIBS =  $(TLIB0)    \
        $(MPR)          \
        $(SHELL32)      \
        $(WINSPOOL)     \
+       $(OLE32)        \
        $(libc)
 
 #
@@ -153,7 +157,7 @@ all:            $(ALL)
 #
 # The dumped executable
 #
-emacs:          $(BLD) $(EMACS)
+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
@@ -164,10 +168,14 @@ $(EMACS):       $(DOC) $(TEMACS)
 # If preload runs out of memory, increase the last argument to addsection
 # (it is the preload heap size in MB).
 #
-temacs:         $(BLD) $(TEMACS)
-$(TEMACS):      $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
+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
+       echo $(OBJ0) > $(BLD)/buildobj.lst
+       echo $(OBJ1) >> $(BLD)/buildobj.lst
+       echo $(WIN32OBJ) >> $(BLD)/buildobj.lst
 
 bootstrap: bootstrap-emacs
 
@@ -175,8 +183,10 @@ bootstrap: bootstrap-emacs
 # Build a temacs with a sufficiently large PURESIZE to load the
 # Lisp files from loadup.el in source form.
 #
+# 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:
-       $(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
+       $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
 
 #
 # Dump an Emacs executable named bootstrap-emacs containing the
@@ -201,8 +211,8 @@ bootstrap-clean:
 # The resource file.  NT 3.10 requires the use of cvtres; even though
 # it is not necessary on later versions, it is still ok to use it.
 #
-$(TRES): ../nt/emacs.rc
-       $(RC) $(RC_INCLUDE)../nt $(RC_OUT)$@ $(ALL_DEPS)
+$(TRES): ../nt/emacs.rc stamp_BLD
+       $(RC) $(RC_INCLUDE)../nt $(RC_OUT)$@ ../nt/emacs.rc
 
 #
 # Build the library.  Split up the build into two phases...otherwise we
@@ -237,10 +247,13 @@ install:        $(ALL)
 #
 # Maintenance
 #
+# We used to delete *~, s/*~, m/*~ here, but that might inadvertently
+# remove precious files if it happens to match their short 8+3 aliases.
 clean:
-       - $(DEL) *~ "s/*~" "m/*~"
+       - $(DEL) "s/*.h~" "m/*.h~"
        - $(DEL) $(COMPILER_TEMP_FILES)
        - $(DEL_TREE) $(OBJDIR)
+       - $(DEL) stamp_BLD
 
 distclean:     clean
        - $(DEL) config.h epaths.h
@@ -590,6 +603,7 @@ $(BLD)/emacs.$(O) : \
        $(SRC)/termhooks.h \
        $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
+       $(SRC)/w32heap.h \
        $(SRC)/window.h
 
 $(BLD)/eval.$(O) : \
@@ -668,6 +682,8 @@ $(BLD)/fns.$(O) : \
        $(EMACS_ROOT)/src/s/ms-w32.h \
        $(EMACS_ROOT)/src/m/intel386.h \
        $(EMACS_ROOT)/src/config.h \
+       $(EMACS_ROOT)/nt/inc/langinfo.h \
+       $(EMACS_ROOT)/nt/inc/nl_types.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
@@ -983,6 +999,8 @@ $(BLD)/w32proc.$(O) : \
        $(SRC)/w32proc.c \
        $(SRC)/s/ms-w32.h \
        $(SRC)/m/intel386.h \
+       $(EMACS_ROOT)/nt/inc/langinfo.h \
+       $(EMACS_ROOT)/nt/inc/nl_types.h \
        $(SRC)/config.h \
        $(SRC)/process.h \
        $(SRC)/syssignal.h \
@@ -1425,6 +1443,7 @@ $(BLD)/w32select.$(O): \
        $(SRC)/systime.h \
        $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
+       $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32reg.$(O): \
@@ -1472,4 +1491,7 @@ $(BLD)/w32bdf.$(O): \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
-# arch-tag: 9fd7aba8-f826-4111-b3c0-497a8e7db9a0
+# 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