]> code.delx.au - gnu-emacs/blobdiff - nt/makefile.w32-in
(mode-line-format): Adjust spacing around vc-mode.
[gnu-emacs] / nt / makefile.w32-in
index ccf86719dcc92d44042b0ebd27575557c6d97695..5e8de8bdf6511d07a90d9d1098d5a0a169597723 100644 (file)
@@ -1,22 +1,25 @@
+#  -*- 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
 #\r
 #  Top level makefile for building GNU Emacs on Windows NT\r
 #\r
 #  This file is part of GNU Emacs.\r
-#  \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
+#\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
+#\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., 59 Temple Place - Suite 330,\r
-#  Boston, MA 02111-1307, USA.\r
+#  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
+#  Boston, MA 02110-1301, USA.\r
 \r
 ALL            = addpm ddeclient runemacs cmdproxy addsection preprep\r
 \r
@@ -67,9 +70,9 @@ which-sh:
 #\r
 # Build emacs\r
 #\r
-all:   which-sh $(BLD) $(ALL) all-other-dirs-$(SHELLTYPE)\r
+all:   which-sh $(BLD) $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
 \r
-all-other-dirs-CMD:\r
+all-other-dirs-nmake:\r
        cd ..\lib-src\r
        $(MAKE) $(MFLAGS) all\r
        cd ..\src\r
@@ -80,65 +83,121 @@ all-other-dirs-CMD:
        $(MAKE) $(MFLAGS) all\r
        cd ..\nt\r
 \r
-all-other-dirs-SH:\r
+all-other-dirs-gmake:\r
        $(MAKE) $(MFLAGS) -C ../lib-src all\r
        $(MAKE) $(MFLAGS) -C ../src all\r
        $(MAKE) $(MFLAGS) -C ../lisp all\r
        $(MAKE) $(MFLAGS) -C ../leim all\r
 \r
-bootstrap:     $(BLD) $(ALL) bootstrap-$(SHELLTYPE)\r
+recompile:     recompile-$(MAKETYPE)\r
+\r
+recompile-nmake:\r
+       cd ..\lisp\r
+       $(MAKE) $(MFLAGS) recompile\r
+       cd ..\nt\r
+\r
+recompile-gmake:\r
+       $(MAKE) $(MFLAGS) -C ../lisp recompile\r
+\r
+#### Bootstrapping.\r
+\r
+### This is meant for Emacs maintainers only.  It first cleans the\r
+### lisp subdirectory, removing all compiled Lisp files.  Then a\r
+### special emacs executable is built from Lisp sources, which is then\r
+### used to compile Lisp files.  The last step is a "normal" make.\r
+\r
+maybe-bootstrap: maybe-bootstrap-$(SHELLTYPE)\r
+\r
+# dummy target to force other targets to be evaluated.\r
+doit:\r
+\r
+maybe-bootstrap-CMD:   doit\r
+       @echo .\r
+       @if not EXIST ..\lisp\abbrev.elc echo Essential Lisp files seem to be missing.  You should either\r
+       @if not EXIST ..\lisp\abbrev.elc echo do 'make bootstrap' or create 'lisp/abbrev.elc' somehow\r
+       @echo .\r
+       @if not EXIST ..\lisp\abbrev.elc exit -1\r
+\r
+maybe-bootstrap-SH: doit\r
+       @if [ ! -f ../lisp/abbrev.elc ] ; then \\r
+         echo; \\r
+         echo "Essential Lisp files seem to be missing.  You should either"; \\r
+         echo "do \`make bootstrap' or create \`lisp/abbrev.elc' somehow.";  \\r
+         echo; \\r
+         exit -1; \\r
+       fi\r
 \r
-bootstrap-CMD:\r
+bootstrap:     addsection bootstrap-$(MAKETYPE) all\r
+\r
+bootstrap-nmake:\r
+       cd ..\lisp\r
+       $(MAKE) $(MFLAGS) bootstrap-clean\r
+       cd ..\src\r
+       $(MAKE) $(MFLAGS) clean\r
+       cd ..\lib-src\r
+       $(MAKE) $(MFLAGS) clean\r
        cd ..\src\r
        $(MAKE) $(MFLAGS) bootstrap\r
        $(MAKE) $(MFLAGS) bootstrap-clean\r
        cd ..\lisp\r
-       $(MAKE) $(MFLAGS) bootstrap\r
+       $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap\r
+       cd ..\lib-src\r
+       $(MAKE) $(MFLAGS) DOC\r
        cd ..\nt\r
 \r
-bootstrap-SH:\r
+bootstrap-gmake:\r
+       $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
+       $(MAKE) $(MFLAGS) -C ../src clean\r
+       $(MAKE) $(MFLAGS) -C ../lib-src clean\r
        $(MAKE) $(MFLAGS) -C ../src bootstrap\r
        $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
        $(MAKE) $(MFLAGS) -C ../lisp bootstrap\r
+       $(MAKE) $(MFLAGS) -C ../lib-src DOC\r
 \r
-bootstrap-clean: bootstrap-clean-$(SHELLTYPE)\r
+bootstrap-clean: bootstrap-clean-$(MAKETYPE)\r
 \r
-bootstrap-clean-CMD:\r
+bootstrap-clean-nmake:\r
        cd ..\src\r
        $(MAKE) $(MFLAGS) bootstrap-clean\r
        cd ..\lisp\r
        $(MAKE) $(MFLAGS) bootstrap-clean\r
 \r
-bootstrap-clean-SH:\r
+bootstrap-clean-gmake:\r
        $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
        $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
 \r
 $(INSTALL_DIR):\r
        - mkdir "$(INSTALL_DIR)"\r
 \r
-$(INSTALL_DIR)/bin:\r
+$(INSTALL_DIR)/bin: $(INSTALL_DIR)\r
        - mkdir "$(INSTALL_DIR)/bin"\r
 \r
 #\r
 # Build and install emacs in INSTALL_DIR\r
 #\r
-install: all $(INSTALL_DIR)/bin install-other-dirs-$(SHELLTYPE)\r
+install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)\r
        - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin\r
        - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin\r
        - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin\r
        - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin\r
-       - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin\r
-       - "$(INSTALL_DIR)/bin/addpm" /q\r
+       - "$(INSTALL_DIR)/bin/addpm" -q\r
        - $(DEL) ../same-dir.tst\r
        - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
-       - mkdir "$(INSTALL_DIR)/etc/icons"\r
-       - $(CP_DIR) icons $(INSTALL_DIR)/etc/icons\r
        echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"\r
-       $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) real_install $(ENDIF)\r
+       - mkdir "$(INSTALL_DIR)/etc"\r
+       - mkdir "$(INSTALL_DIR)/info"\r
+       - mkdir "$(INSTALL_DIR)/lock"\r
+       - mkdir "$(INSTALL_DIR)/data"\r
+       - mkdir "$(INSTALL_DIR)/site-lisp"\r
+       - mkdir "$(INSTALL_DIR)/etc/icons"\r
+       $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)\r
+       $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)\r
+       - $(CP_DIR) icons $(INSTALL_DIR)/etc\r
+       $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)\r
        - $(DEL) ../same-dir.tst\r
        - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
 \r
-install-other-dirs-CMD:\r
+install-other-dirs-nmake:\r
        cd ..\lib-src\r
        $(MAKE) $(MFLAGS) install\r
        cd ..\src\r
@@ -149,54 +208,73 @@ install-other-dirs-CMD:
        $(MAKE) $(MFLAGS) install\r
        cd ..\nt\r
 \r
-install-other-dirs-SH:\r
+install-other-dirs-gmake:\r
        $(MAKE) $(MFLAGS) -C ../lib-src install\r
        $(MAKE) $(MFLAGS) -C ../src install\r
        $(MAKE) $(MFLAGS) -C ../lisp install\r
        $(MAKE) $(MFLAGS) -C ../leim install\r
 \r
-real_install:\r
-       - $(DEL) ../same-dir.tst\r
-       - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
-       echo SameDirTest > $(INSTALL_DIR)/same-dir.tst\r
-       - mkdir "$(INSTALL_DIR)/etc"\r
-       - mkdir "$(INSTALL_DIR)/info"\r
-       - mkdir "$(INSTALL_DIR)/lock"\r
-       - mkdir "$(INSTALL_DIR)/data"\r
-       - mkdir "$(INSTALL_DIR)/site-lisp"\r
-       - mkdir "$(INSTALL_DIR)/etc/icons"\r
-       - $(CP_DIR) icons $(INSTALL_DIR)/etc/icons\r
-       $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR)/etc $(ENDIF)\r
-       $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR)/info $(ENDIF)\r
-       - $(DEL) ../same-dir.tst\r
-       - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
+force-info:\r
+# Note that man/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
+       $(MAKE) $(MFLAGS) info\r
+       cd ..\lispref\r
+       $(MAKE) $(MFLAGS) info\r
+       cd ..\lispintro\r
+       $(MAKE) $(MFLAGS) info\r
 \r
+info-gmake:\r
+       $(MAKE) $(MFLAGS) -C ../man info\r
+       $(MAKE) $(MFLAGS) -C ../lispref info\r
+       $(MAKE) $(MFLAGS) -C ../lispintro info\r
 #\r
 # Maintenance\r
-# \r
-clean: clean-other-dirs-$(SHELLTYPE)\r
-       - $(DEL) *~ *.pdb\r
+#\r
+clean: clean-other-dirs-$(MAKETYPE)\r
+       - $(DEL) *~ $(COMPILER_TEMP_FILES)\r
        - $(DEL_TREE) $(OBJDIR)\r
        - $(DEL) ../etc/DOC ../etc/DOC-X\r
 \r
-clean-other-dirs-CMD:\r
+clean-other-dirs-nmake:\r
        cd ..\lib-src\r
        $(MAKE) $(MFLAGS) clean\r
        cd ..\src\r
        $(MAKE) $(MFLAGS) clean\r
        cd ..\lisp\r
        $(MAKE) $(MFLAGS) clean\r
+       cd ..\lispintro\r
+       $(MAKE) $(MFLAGS) clean\r
+       cd ..\lispref\r
+       $(MAKE) $(MFLAGS) clean\r
        cd ..\leim\r
        $(MAKE) $(MFLAGS) clean\r
+       cd ..\man\r
+       $(MAKE) $(MFLAGS) clean\r
        cd ..\nt\r
 \r
-clean-other-dirs-SH:\r
+clean-other-dirs-gmake:\r
        $(MAKE) $(MFLAGS) -C ../lib-src clean\r
        $(MAKE) $(MFLAGS) -C ../src clean\r
        $(MAKE) $(MFLAGS) -C ../lisp clean\r
        $(MAKE) $(MFLAGS) -C ../leim clean\r
 \r
-cleanall: clean\r
+cleanall-other-dirs-nmake:\r
+       cd ..\lib-src\r
+       $(MAKE) $(MFLAGS) cleanall\r
+       cd ..\src\r
+       $(MAKE) $(MFLAGS) cleanall\r
+       cd ..\nt\r
+\r
+cleanall-other-dirs-gmake:\r
+       $(MAKE) $(MFLAGS) -C ../lib-src cleanall\r
+       $(MAKE) $(MFLAGS) -C ../src cleanall\r
+\r
+cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
         - $(DEL_TREE) obj\r
         - $(DEL_TREE) obj-spd\r
         - $(DEL_TREE) oo\r