XEmacs 21.4.9 "Informed Management".
[chise/xemacs-chise.git.1] / nt / xemacs.mak
index a43c94c..db8534b 100644 (file)
@@ -46,6 +46,8 @@ 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
@@ -120,6 +122,9 @@ HAVE_XPM=0
 !if !defined(HAVE_PNG)
 HAVE_PNG=0
 !endif
+!if !defined(HAVE_ZLIB)
+HAVE_ZLIB=$(HAVE_PNG)
+!endif
 !if !defined(HAVE_TIFF)
 HAVE_TIFF=0
 !endif
@@ -160,20 +165,11 @@ QUICK_BUILD=0
 USE_UNION_TYPE=0
 !endif
 !if !defined(USE_MINITAR)
-USE_MINITAR=1
-!endif
-!if !defined(USE_MINIMAL_TAGBITS)
-USE_MINIMAL_TAGBITS=0
-!endif
-!if !defined(USE_INDEXED_LRECORD_IMPLEMENTATION)
-USE_INDEXED_LRECORD_IMPLEMENTATION=0
+USE_MINITAR=$(HAVE_ZLIB)
 !endif
 !if !defined(USE_PORTABLE_DUMPER)
 USE_PORTABLE_DUMPER=0
 !endif
-!if !defined(GUNG_HO)
-GUNG_HO=0
-!endif
 
 # A little bit of adhockery. Default to use system malloc and
 # DLL version of the C runtime library when using portable
@@ -202,6 +198,9 @@ EMACS_CONFIGURATION=ppc-pc-win32
 !else
 ! error Unknown processor architecture type $(PROCESSOR_ARCHITECTURE)
 !endif
+STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_)
+STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_)
+PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER)
 
 #
 # Conf error checks
@@ -297,14 +296,6 @@ CONFIG_ERROR=1
 !endif
 
 #
-# Handle GUNG_HO
-#
-!if defined(GUNG_HO)
-USE_MINIMAL_TAGBITS=$(GUNG_HO)
-USE_INDEXED_LRECORD_IMPLEMENTATION=$(GUNG_HO)
-!endif
-
-#
 # Whether to use dependency information generated by make-src-depend
 #
 !if !defined(DEPEND)
@@ -322,7 +313,7 @@ DEPEND=0
 # much backslash quoting.  This does not happen, of course, with a non-
 # Cygwin Perl, so in that circumstance, you'd be screwed and would have
 # to fix this Makefile to not have a special Cygwin case.
-! if defined(_)
+! if defined(_) || [perl -e "exit 1 if $$^O == 'cygwin';"]==1
 !  if [perl -p -e "s/^\\x23if defined(.+)/!if defined$$1/; s/^\\x23e/!e/;" \
        -e "s/([\\s=^])([\\w\\d\\.\\-^]+\\.[ch^])/$$1$(SRC:\=\\\\)\\\\$$2/g;" \
        -e "s/^(.+)\\.o:(.+)/$(OUTDIR:\=\\\\)\\\\$$1.obj:$$2/;" \
@@ -423,7 +414,6 @@ MSW_LIBS=$(MSW_LIBS) "$(COMPFACE_DIR)\libcompface.lib"
 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
 MSW_TOOLBAR_SRC=$(SRC)\toolbar.c $(SRC)\toolbar-msw.c
 MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
-MSW_LIBS=$(MSW_LIBS) comctl32.lib
 !endif
 !if $(HAVE_DIALOGS)
 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
@@ -433,6 +423,9 @@ MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
 !if $(HAVE_WIDGETS)
 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS
 !endif
+!if $(HAVE_TOOLBARS) || $(HAVE_WIDGETS)
+MSW_LIBS=$(MSW_LIBS) comctl32.lib
+!endif
 !if $(HAVE_NATIVE_SOUND)
 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
 !endif
@@ -451,12 +444,6 @@ DEBUG_FLAGS=-debug:full
 QUICK_DEFINES=-DQUICK_BUILD
 !endif
 
-!if $(USE_MINIMAL_TAGBITS)
-TAGBITS_DEFINES=-DUSE_MINIMAL_TAGBITS
-!endif
-!if $(USE_INDEXED_LRECORD_IMPLEMENTATION)
-LRECORD_DEFINES=-DUSE_INDEXED_LRECORD_IMPLEMENTATION
-!endif
 !if $(USE_UNION_TYPE)
 UNION_DEFINES=-DUSE_UNION_TYPE
 !endif
@@ -485,8 +472,7 @@ PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
 
 INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR)
 
-DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \
-       $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \
+DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
        $(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \
        -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
        -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
@@ -501,6 +487,7 @@ XEMACS_INCLUDES=\
  $(SRC)\Emacs.ad.h \
  $(SRC)\paths.h
 
+# #### Copying is cheap, we should just force these
 $(SRC)\config.h:       config.h
        copy config.h $(SRC)
 
@@ -554,6 +541,11 @@ $(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
        $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no
        cd $(NT)
 
+$(LIB_SRC)/winclient.exe: $(LIB_SRC)/winclient.c
+       cd $(LIB_SRC)
+       $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** user32.lib -link -incremental:no
+       cd $(NT)
+
 $(LIB_SRC)/minitar.exe : $(NT)/minitar.c
        $(CCV) $(CFLAGS) -I$(ZLIB_DIR) -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no
 
@@ -561,6 +553,7 @@ LIB_SRC_TOOLS = \
        $(LIB_SRC)/etags.exe            \
        $(LIB_SRC)/hexl.exe             \
        $(LIB_SRC)/i.exe                \
+       $(LIB_SRC)/winclient.exe        \
        $(LIB_SRC)/make-docfile.exe     \
        $(LIB_SRC)/mmencode.exe         \
        $(LIB_SRC)/movemail.exe         \
@@ -862,6 +855,7 @@ TEMACS_CPP_FLAGS=-c \
  -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
  -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
  $(EMACS_BETA_VERSION) \
+ $(EMACS_PATCH_LEVEL) \
  -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
  -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
  -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
@@ -1431,34 +1425,56 @@ install:        all
 
 mostlyclean:
        $(DEL) $(XEMACS)\Installation
-       $(DEL) $(OUTDIR)\*.lib $(OUTDIR)\*.obj $(OUTDIR)\*.pdb
-       $(DEL) $(OUTDIR)\*.res $(OUTDIR)\*.sbr
-       $(DEL) $(SRC)\*.exe $(SRC)\*.map $(SRC)\*.bsc $(SRC)\*.pdb
-       $(DEL) $(LIB_SRC)\*.exe $(LIB_SRC)\*.obj $(LIB_SRC)\*.pdb
+       $(DEL) $(OUTDIR)\*.lib
+       $(DEL) $(OUTDIR)\*.obj
+       $(DEL) $(OUTDIR)\*.pdb
+       $(DEL) $(OUTDIR)\*.res
+       $(DEL) $(OUTDIR)\*.sbr
+       $(DEL) $(SRC)\*.exe
+       $(DEL) $(SRC)\*.map
+       $(DEL) $(SRC)\*.bsc
+       $(DEL) $(SRC)\*.pdb
+       $(DEL) $(LIB_SRC)\*.exe
+       $(DEL) $(LIB_SRC)\*.obj
+       $(DEL) $(LIB_SRC)\*.pdb
        $(DEL) $(LIB_SRC)\*.res
 
 clean: mostlyclean versionclean
        $(DEL) $(XEMACS)\TAGS
 
 nicenclean: clean
-       $(DEL) $(NT)\*.bak $(NT)\*.orig $(NT)\*.rej $(NT)\*.tmp
-       $(DEL) $(LIB_SRC)\*.bak $(LIB_SRC)\*.orig $(LIB_SRC)\*.rej
+       $(DEL) $(NT)\*.bak
+       $(DEL) $(NT)\*.orig
+       $(DEL) $(NT)\*.rej
+       $(DEL) $(NT)\*.tmp
+       $(DEL) $(LIB_SRC)\*.bak
+       $(DEL) $(LIB_SRC)\*.orig
+       $(DEL) $(LIB_SRC)\*.rej
        $(DEL) $(LIB_SRC)\*.tmp
-       $(DEL) $(SRC)\*.bak $(SRC)\*.orig $(SRC)\*.rej $(SRC)\*.tmp
-       $(DEL) /s $(LISP)\*.bak $(LISP)\*.orig $(LISP)\*.rej $(LISP)\*.tmp
+       $(DEL) $(SRC)\*.bak
+       $(DEL) $(SRC)\*.orig
+       $(DEL) $(SRC)\*.rej
+       $(DEL) $(SRC)\*.tmp
+       $(DEL) $(LISP)\*.bak
+       $(DEL) $(LISP)\*.orig
+       $(DEL) $(LISP)\*.rej
+       $(DEL) $(LISP)\*.tmp
 
 ## This is used in making a distribution.
 ## Do not use it on development directories!
 distclean: nicenclean
-       $(DEL) $(SRC)\config.h $(SRC)\paths.h $(SRC)\Emacs.ad.h
-       $(DEL) $(LIB_SRC)\$(CONFIG_VALUES)
+       $(DEL) $(SRC)\config.h
+       $(DEL) $(SRC)\paths.h
+       $(DEL) $(SRC)\Emacs.ad.h
+       $(DEL) $(CONFIG_VALUES)
        $(DEL) $(INFODIR)\*.info*
-       $(DEL) /s /q $(LISP)\*.elc
+       $(DEL) $(LISP)\*.elc
 
 realclean: distclean
 
 versionclean:
-       $(DEL) $(SRC)\xemacs.exe $(LIB_SRC)\DOC
+       $(DEL) $(SRC)\xemacs.exe
+       $(DEL) $(LIB_SRC)\DOC
 
 #not sure about those wildcards.  DOS wildcards are stupid compared to Unix,
 #and could end up deleting *everything* instead of just backup files or
@@ -1474,7 +1490,9 @@ depend:
 $(XEMACS)\Installation::       installation
 
 installation::
-       @type > $(XEMACS)\Installation <<
+       @echo OS version:>$(XEMACS)\Installation
+       @ver >> $(XEMACS)\Installation
+       @type >> $(XEMACS)\Installation <<
 !if defined(OS)
 OS: $(OS)
 !endif
@@ -1560,12 +1578,6 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_
   WARNING: expense of an additional ~4KB of code.
   --------------------------------------------------------------------
 !endif
-!if $(USE_MINIMAL_TAGBITS)
-  Using minimal tagbits.
-!endif
-!if $(USE_INDEXED_LRECORD_IMPLEMENTATION)
-  Using indexed lrecord implementation.
-!endif
 !if $(USE_UNION_TYPE)
   Using union type for Lisp object storage.
 !endif