]> code.delx.au - gnu-emacs/blobdiff - nt/makefile.w32-in
Dupport an use an observer flag in (vc-dispatcher-selection-set).
[gnu-emacs] / nt / makefile.w32-in
index cc707cd30bb4b29e84f9c1316d286437cb4acb79..026b8ab58033c97ba2ebf69cdb34238b93029aa7 100644 (file)
@@ -1,34 +1,38 @@
-#  -*- 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
+# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.\r
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,\r
+#    2008 Free Software Foundation, Inc.\r
 #\r
-#  Top level makefile for building GNU Emacs on Windows NT\r
+# Top level makefile for building GNU Emacs on Windows NT\r
 #\r
-#  This file is part of GNU Emacs.\r
-#\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
-#  any later version.\r
-#\r
-#  GNU Emacs is distributed in the hope that it will be useful,\r
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-#  GNU General Public License for more details.\r
-#\r
-#  You should have received a copy of the GNU General Public License\r
-#  along with GNU Emacs; see the file COPYING.  If not, write to\r
-#  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
-#  Boston, MA 02110-1301, USA.\r
+# This file is part of GNU Emacs.\r
 \r
-ALL            = addpm ddeclient runemacs cmdproxy addsection preprep\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 3 of the License, or\r
+# (at your option) any later version.\r
 \r
-.PHONY: $(ALL)\r
+# GNU Emacs is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+# GNU General Public License for more details.\r
+\r
+# You should have received a copy of the GNU General Public License\r
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.\r
+\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
 TRES           = $(BLD)/emacs.res\r
+CLIENTRES      = $(BLD)/emacsclient.res\r
 \r
 XMFLAGS                =\r
 \r
+ALL            = addpm ddeclient runemacs cmdproxy addsection preprep\r
+\r
+.PHONY: $(ALL)\r
+\r
+\r
 addpm:           stamp_BLD $(BLD)/addpm.exe\r
 $(BLD)/addpm.exe: $(BLD)/addpm.$(O)\r
                  $(LINK) $(LINK_OUT)$@ \\r
@@ -58,8 +62,11 @@ $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
 # The resource file.  NT 3.10 requires the use of cvtres; even though\r
 # 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
+$(TRES):       emacs.rc icons/emacs.ico emacs.manifest stamp_BLD\r
+               $(RC) $(RC_OUT)$(TRES) emacs.rc\r
+\r
+$(CLIENTRES):  emacsclient.rc stamp_BLD\r
+               $(RC) $(RC_OUT)$(CLIENTRES) emacsclient.rc\r
 \r
 runemacs:        stamp_BLD $(BLD)/runemacs.exe\r
 $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)\r
@@ -78,7 +85,7 @@ $(BLD)/addpm.$(O) $(BLD)/ddeclient.$(O) $(BLD)/runemacs.$(O) $(BLD)/cmdproxy.$(O
 #\r
 # Build emacs\r
 #\r
-all:   which-sh stamp_BLD $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
+all:   which-sh stamp_BLD $(ALL) $(CLIENTRES) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
 \r
 all-other-dirs-nmake: addsection\r
        cd ..\lib-src\r
@@ -135,10 +142,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 +157,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 +215,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 +238,32 @@ 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 ..\misc\r
        $(MAKE) $(MFLAGS) info\r
        cd ..\lispref\r
        $(MAKE) $(MFLAGS) info\r
        cd ..\lispintro\r
        $(MAKE) $(MFLAGS) info\r
+       cd $(MAKEDIR)\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
@@ -255,23 +273,26 @@ clean-other-dirs-nmake:
        $(MAKE) $(MFLAGS) clean\r
        cd ..\src\r
        $(MAKE) $(MFLAGS) clean\r
-       cd ..\lisp\r
+       cd ..\doc\lispintro\r
        $(MAKE) $(MFLAGS) clean\r
-       cd ..\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
 clean-other-dirs-gmake:\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean\r
-       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp clean\r
        $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref clean\r
 \r
 cleanall-other-dirs-nmake:\r
        cd ..\lib-src\r
@@ -284,11 +305,85 @@ 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
         - $(DEL_TREE) oo\r
         - $(DEL_TREE) oo-spd\r
 \r
+top-distclean:\r
+       - $(DEL) $(COMPILER_TEMP_FILES)\r
+       - $(DEL_TREE) obj\r
+       - $(DEL_TREE) obj-spd\r
+       - $(DEL_TREE) oo\r
+       - $(DEL_TREE) oo-spd\r
+       - $(DEL) stamp_BLD\r
+       - $(DEL) ../etc/DOC ../etc/DOC-X\r
+       - $(DEL) config.log Makefile\r
+\r
+distclean: distclean-other-dirs-$(MAKETYPE) top-distclean\r
+\r
+distclean-other-dirs-nmake:\r
+       cd ..\lib-src\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\src\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\lisp\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\leim\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\doc\emacs\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\doc\misc\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\doc\lispintro\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\doc\lispref\r
+       $(MAKE) $(MFLAGS) distclean\r
+       cd ..\nt\r
+\r
+distclean-other-dirs-gmake:\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro distclean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref distclean\r
+\r
+maintainer-clean: maintainer-clean-other-dirs-$(MAKETYPE) top-distclean\r
+\r
+maintainer-clean-other-dirs-nmake:\r
+       cd ..\lib-src\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\src\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\lisp\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\leim\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\doc\emacs\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\doc\misc\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\doc\lispintro\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\doc\lispref\r
+       $(MAKE) $(MFLAGS) maintainer-clean\r
+       cd ..\nt\r
+\r
+maintainer-clean-other-dirs-gmake:\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro maintainer-clean\r
+       $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref maintainer-clean\r
+\r
 realclean: cleanall\r
        - $(DEL_TREE) ../bin\r