XEmacs 21.4.18 (Social Property).
[chise/xemacs-chise.git.1] / nt / xemacs.mak
index d0aff62..e1f5ad5 100644 (file)
@@ -1,6 +1,6 @@
 #   Makefile for Microsoft NMAKE
 #   Copyright (C) 1995 Board of Trustees, University of Illinois.
-#   Copyright (C) 1995, 1996, 2000 Ben Wing.
+#   Copyright (C) 1995, 1996, 2000, 2005 Ben Wing.
 #   Copyright (C) 1995 Sun Microsystems, Inc.
 #   Copyright (C) 1998 Free Software Foundation, Inc.
 #
@@ -44,16 +44,25 @@ LWLIB_SRCDIR=$(XEMACS)\lwlib
 MAKEDIRSTRING=$(MAKEDIR:\=\\)
 XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=)
 
-
-# Define a variable for the 'del' command to use
-# N.B. Windows Millenium Edition's ERASE can only handle one target (file or
-# wildcard) per invocation.  Make sure each use has only one target!
-DEL=-del
-
 # Program name and version
 
 !include "$(XEMACS)\version.sh"
 
+# Put these before including config.inc so they can be overridden there.
+# Note that some versions of some commands are deficient.
+
+# Define a variable for the 'del' command to use.
+# WinME's DEL command can only handle one argument and only has the /P flag.
+# So only delete one glob at a time.  Override flags in config.inc.
+DEL=-del
+
+# Tell COPY, MOVE, and XCOPY to suppress confirmation for overwriting
+# files.
+COPYCMD=/y
+# Define the 'copy' command to use.
+COPY=xcopy /q
+COPYDIR=xcopy /q /e
+
 !include "config.inc"
 
 !if !defined(INFODOCK)
@@ -168,12 +177,17 @@ USE_UNION_TYPE=0
 USE_MINITAR=$(HAVE_ZLIB)
 !endif
 !if !defined(USE_PORTABLE_DUMPER)
-USE_PORTABLE_DUMPER=0
+USE_PORTABLE_DUMPER=1
 !endif
 
 # A little bit of adhockery. Default to use system malloc and
 # DLL version of the C runtime library when using portable
 # dumping. These are the optimal settings.
+#
+# NOTE: The various graphics libraries are generally compiled to use
+# MSVCRT.DLL (the same that we use in USE_CRTDLL, more or less), so using
+# this is a good thing.
+
 !if !defined(USE_SYSTEM_MALLOC)
 USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
 !endif
@@ -301,7 +315,7 @@ CONFIG_ERROR=1
 !if !defined(DEPEND)
 DEPEND=0
 !endif
-!if $(DEPEND)
+!if $(DEPEND) && exist("$(SRC)\depend")
 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
 ! endif
 # generate an nmake-readable version of depend
@@ -363,7 +377,8 @@ C_LIBFLAG=-ML
 LIBC_LIB=libc.lib
 !endif
 
-CFLAGS=-nologo -W3 $(OPT) $(C_LIBFLAG)
+CFLAGS_NO_LIB=-nologo -W3 $(OPT)
+CFLAGS=$(CFLAGS_NO_LIB) $(C_LIBFLAG)
 
 !if $(HAVE_X_WINDOWS)
 X_DEFINES=-DHAVE_X_WINDOWS
@@ -470,7 +485,7 @@ PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
 
 # Generic variables
 
-INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR)
+INCLUDES=$(X_INCLUDES) -I$(NT)\inc -I$(SRC) $(MSW_INCLUDES) -I$(LWLIB_SRCDIR)
 
 DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
        $(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \
@@ -489,12 +504,15 @@ XEMACS_INCLUDES=\
 
 # #### Copying is cheap, we should just force these
 $(SRC)\config.h:       config.h
+       set COPYCMD=$(COPYCMD)
        copy config.h $(SRC)
 
 $(SRC)\Emacs.ad.h:     Emacs.ad.h
+       set COPYCMD=$(COPYCMD)
        copy Emacs.ad.h $(SRC)
 
 $(SRC)\paths.h:        paths.h
+       set COPYCMD=$(COPYCMD)
        copy paths.h $(SRC)
 
 #------------------------------------------------------------------------------
@@ -547,7 +565,7 @@ $(LIB_SRC)/winclient.exe: $(LIB_SRC)/winclient.c
        cd $(NT)
 
 $(LIB_SRC)/minitar.exe : $(NT)/minitar.c
-       $(CCV) $(CFLAGS) -I$(ZLIB_DIR) -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no
+       $(CCV) $(CFLAGS_NO_LIB) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) -MD -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no
 
 LIB_SRC_TOOLS = \
        $(LIB_SRC)/etags.exe            \
@@ -1162,7 +1180,7 @@ INFO_FILES= \
 
 {$(MANDIR)}.texi{$(INFODIR)}.info:
        cd $(MANDIR)
-       $(MAKEINFO) $**
+       $(MAKEINFO) $(**F)
 
 XEMACS_SRCS = \
        $(MANDIR)\xemacs\abbrevs.texi \
@@ -1404,6 +1422,7 @@ temacs: $(LASTFILE) $(TEMACS)
 # use this rule to install the system
 install:       all
        cd $(NT)
+       set COPYCMD=$(COPYCMD)
        @echo Installing in $(INSTALL_DIR) ...
        @echo PlaceHolder > PlaceHolder
        @xcopy /q PROBLEMS "$(INSTALL_DIR)\"