Merge from emacs--rel--22
[bpt/emacs.git] / nt / makefile.w32-in
index cc707cd..5cb13a7 100644 (file)
@@ -1,6 +1,6 @@
 #  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.\r
 #  Copyright (C) 2000, 2001, 2002, 2003, 2004,\r
-#    2005, 2006 Free Software Foundation, Inc.\r
+#    2005, 2006, 2007 Free Software Foundation, Inc.\r
 #\r
 #  Top level makefile for building GNU Emacs on Windows NT\r
 #\r
@@ -8,7 +8,7 @@
 #\r
 #  GNU Emacs is free software; you can redistribute it and/or modify\r
 #  it under the terms of the GNU General Public License as published by\r
-#  the Free Software Foundation; either version 2, or (at your option)\r
+#  the Free Software Foundation; either version 3, or (at your option)\r
 #  any later version.\r
 #\r
 #  GNU Emacs is distributed in the hope that it will be useful,\r
@@ -21,6 +21,9 @@
 #  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
 #  Boston, MA 02110-1301, USA.\r
 \r
+# FIXME: This file uses DOS EOLs.  Convert to Unix after 22.1 is out\r
+#        (and remove or replace this comment).\r
+\r
 ALL            = addpm ddeclient runemacs cmdproxy addsection preprep\r
 \r
 .PHONY: $(ALL)\r
@@ -59,7 +62,7 @@ $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
 # it is not necessary on later versions, it is still ok to use it.\r
 #\r
 $(TRES):       emacs.rc stamp_BLD\r
-               $(RC) $(RC_OUT)$(BLD)/emacs.res $<\r
+               $(RC) $(RC_OUT)$(BLD)/emacs.res emacs.rc\r
 \r
 runemacs:        stamp_BLD $(BLD)/runemacs.exe\r
 $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)\r
@@ -135,10 +138,12 @@ maybe-bootstrap-SH: doit
          exit -1; \\r
        fi\r
 \r
-bootstrap:     addsection bootstrap-$(MAKETYPE)\r
+# Bootstrap depends on cmdproxy because some Lisp functions\r
+# loaded during bootstrap may need to run shell commands.\r
+bootstrap:     addsection cmdproxy bootstrap-$(MAKETYPE)\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) all\r
 \r
-bootstrap-nmake: addsection\r
+bootstrap-nmake: addsection cmdproxy\r
        cd ..\lisp\r
        $(MAKE) $(MFLAGS) bootstrap-clean\r
        cd ..\src\r
@@ -148,18 +153,21 @@ bootstrap-nmake: addsection
        cd ..\src\r
        $(MAKE) $(MFLAGS) bootstrap\r
        $(MAKE) $(MFLAGS) bootstrap-clean\r
+       cd ..\nt\r
+       $(CP) $(BLD)/cmdproxy.exe ../bin\r
        cd ..\lisp\r
        $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap\r
        cd ..\lib-src\r
        $(MAKE) $(MFLAGS) DOC\r
        cd ..\nt\r
 \r
-bootstrap-gmake: addsection\r
+bootstrap-gmake: addsection cmdproxy\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean\r
+       $(CP) $(BLD)/cmdproxy.exe ../bin\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC\r
 \r
@@ -203,6 +211,8 @@ install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
        $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)\r
        - $(CP_DIR) icons $(INSTALL_DIR)/etc\r
        $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)\r
+       $(IFNOTSAMEDIR) $(CP) ../COPYING $(INSTALL_DIR) $(ENDIF)\r
+       - $(CP) ../COPYING $(INSTALL_DIR)/bin\r
        - $(DEL) ../same-dir.tst\r
        - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
 \r
@@ -224,28 +234,31 @@ install-other-dirs-gmake:
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install\r
 \r
 force-info:\r
-# Note that man/makefile knows how to\r
+# Note that doc/emacs/makefile knows how to\r
 # put the info files in $(infodir),\r
 # so we can do ok running make in the build dir.\r
 info: force-info info-$(MAKETYPE)\r
 \r
 info-nmake:\r
-       cd ..\man\r
+       cd ..\doc\emacs\r
        $(MAKE) $(MFLAGS) info\r
-       cd ..\lispref\r
+       cd ..\doc\misc\r
        $(MAKE) $(MFLAGS) info\r
-       cd ..\lispintro\r
+       cd ..\doc\lispref\r
+       $(MAKE) $(MFLAGS) info\r
+       cd ..\doc\lispintro\r
        $(MAKE) $(MFLAGS) info\r
 \r
 info-gmake:\r
-       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../man info\r
-       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispref info\r
-       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispintro info\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs info\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc info\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref info\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro info\r
 #\r
 # Maintenance\r
 #\r
 clean: clean-other-dirs-$(MAKETYPE)\r
-       - $(DEL) *~ $(COMPILER_TEMP_FILES)\r
+       - $(DEL) $(COMPILER_TEMP_FILES)\r
        - $(DEL_TREE) $(OBJDIR)\r
        - $(DEL) stamp_BLD\r
        - $(DEL) ../etc/DOC ../etc/DOC-X\r
@@ -257,13 +270,15 @@ clean-other-dirs-nmake:
        $(MAKE) $(MFLAGS) clean\r
        cd ..\lisp\r
        $(MAKE) $(MFLAGS) clean\r
-       cd ..\lispintro\r
+       cd ..\doc\lispintro\r
        $(MAKE) $(MFLAGS) clean\r
-       cd ..\lispref\r
+       cd ..\doc\lispref\r
        $(MAKE) $(MFLAGS) clean\r
        cd ..\leim\r
        $(MAKE) $(MFLAGS) clean\r
-       cd ..\man\r
+       cd ..\doc\emacs\r
+       $(MAKE) $(MFLAGS) clean\r
+       cd ..\doc\misc\r
        $(MAKE) $(MFLAGS) clean\r
        cd ..\nt\r
 \r
@@ -284,6 +299,8 @@ cleanall-other-dirs-gmake:
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall\r
 \r
+# We used to delete *~ here, but that might inadvertently remove\r
+# precious files if it happens to match their short 8+3 aliases.\r
 cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
         - $(DEL_TREE) obj\r
         - $(DEL_TREE) obj-spd\r