X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=nt%2Fxemacs.mak;h=79ad8384d96b887b32d75da9e62dc19c64db4735;hb=6e110e97764836d0867a87c63007870c32605ab3;hp=bc7c9170559846b14fdc4194361e5250ce51528b;hpb=762383636a99307282c2d93d26c35c046ec24da1;p=chise%2Fxemacs-chise.git.1 diff --git a/nt/xemacs.mak b/nt/xemacs.mak index bc7c917..79ad838 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -1,6 +1,6 @@ # Makefile for Microsoft NMAKE # Copyright (C) 1995 Board of Trustees, University of Illinois. -# Copyright (C) 1995, 1996 Ben Wing. +# Copyright (C) 1995, 1996, 2000, 2005 Ben Wing. # Copyright (C) 1995 Sun Microsystems, Inc. # Copyright (C) 1998 Free Software Foundation, Inc. # @@ -26,7 +26,14 @@ default: all -XEMACS=.. +# APA: Since there seems to be no way to determine the directory where +# xemacs.mak is located (from within nmake) we just insist on the user +# to invoke nmake in the directory where xemacs.mak is. +!if !exist("$(MAKEDIR)\xemacs.mak") +!error Please run nmake from the directory of this makefile (xemacs\nt). +!endif + +XEMACS=$(MAKEDIR)\.. LISP=$(XEMACS)\lisp LIB_SRC=$(XEMACS)\lib-src MODULES=$(XEMACS)\modules @@ -37,14 +44,25 @@ LWLIB_SRCDIR=$(XEMACS)\lwlib MAKEDIRSTRING=$(MAKEDIR:\=\\) XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=) - -# Define a variable for the 'del' command to use -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) @@ -62,10 +80,13 @@ PROGRAM_DEFINES=-DINFODOCK \ -DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \ -DINFODOCK_BUILD_VERSION=$(infodock_build_version) !else +XEMACS_VERSION_STRING=$(emacs_major_version).$(emacs_minor_version) !if "$(emacs_beta_version)" != "" -XEMACS_VERSION_STRING=$(emacs_major_version).$(emacs_minor_version)-b$(emacs_beta_version) +!if "$(emacs_is_beta)" != "" +XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING)-b$(emacs_beta_version) !else -XEMACS_VERSION_STRING=$(emacs_major_version).$(emacs_minor_version) +XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING).$(emacs_beta_version) +!endif !endif PROGRAM_DEFINES= \ -DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \ @@ -87,17 +108,24 @@ INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING) !if !defined(HAVE_MULE) HAVE_MULE=0 !endif + +# If PACKAGE_PATH was defined, use it. If PACKAGE_PATH was not defined, +# but PACKAGE_PREFIX was, use PACKAGE_PREFIX to generate a package path. +# If neither PACKAGE_PATH nor PACKAGE_PREFIX was defined, +# do not define a package path. !if !defined(PACKAGE_PATH) -! if !defined(PACKAGE_PREFIX) -PACKAGE_PREFIX=c:\Program Files\XEmacs -! endif -! if $(HAVE_MULE) +! if defined(PACKAGE_PREFIX) +! if $(HAVE_MULE) PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\mule-packages;$(PACKAGE_PREFIX)\xemacs-packages -! else +! else PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages +! endif ! endif !endif +!if defined(PACKAGE_PATH) PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)" +!endif + !if !defined(HAVE_MS_WINDOWS) HAVE_MS_WINDOWS=1 !endif @@ -110,6 +138,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 @@ -122,6 +153,9 @@ HAVE_XFACE=0 !if !defined(HAVE_GIF) HAVE_GIF=1 !endif +!if !defined(HAVE_GTK) +HAVE_GTK=0 +!endif !if !defined(HAVE_TOOLBARS) HAVE_TOOLBARS=$(HAVE_XPM) !endif @@ -147,24 +181,20 @@ 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 +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 @@ -189,6 +219,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 @@ -223,6 +256,10 @@ CONFIG_ERROR=1 !message Specified X11 directory does not contain "$(X11_DIR)\LIB\X11.LIB" CONFIG_ERROR=1 !endif +!if $(HAVE_MS_WINDOWS) && $(HAVE_GTK) && !defined(GTK_DIR) +!message Please specify root directory for your GTK installation: GTK_DIR=path +CONFIG_ERROR=1 +!endif !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR) !message Please specify root directory for your XPM installation: XPM_DIR=path CONFIG_ERROR=1 @@ -280,30 +317,35 @@ 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) 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 # #### here, it doesn't seem to matter if we double ^'s! # results are the same with all single ^ and all double ^^! # see comment below. -! if [perl -p -e "s/^\x23ifdef (.+)/!if defined($$1)/; s/^\x23e/!e/;" \ +# #### Yuuuuuuuuuuck!!! Cygwin is too smart for its own good. If we are +# being run from within Cygwin, a Cygwin Perl seems to require twice as +# 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(_) || [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/;" \ + < $(SRC)\depend > $(OUTDIR)\depend.tmp] +! endif +! else +! 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 $(NT:\=\\)\\config.inc/;" \ + -e "s/^(.+)\.o:(.+)/$(OUTDIR:\=\\)\\$$1.obj:$$2/;" \ < $(SRC)\depend > $(OUTDIR)\depend.tmp] +! endif ! endif ! include "$(OUTDIR)\depend.tmp" !else @@ -311,6 +353,16 @@ DEPEND=0 ! endif !endif +!if $(USE_INTEL_COMPILER) +CC=icl +# Use static library if possible +INTEL_LIBS=libircmt.lib libmmt.lib +# Debugging requires DLL version of libm +!if $(DEBUG_XEMACS) +INTEL_LIBS=libircmt.lib libmmd.lib +!endif +!endif + # # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation. # @@ -342,7 +394,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 @@ -393,7 +446,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 @@ -403,6 +455,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 @@ -421,12 +476,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 @@ -453,10 +502,9 @@ 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) \ - $(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) @@ -471,13 +519,17 @@ XEMACS_INCLUDES=\ $(SRC)\Emacs.ad.h \ $(SRC)\paths.h +# #### 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) #------------------------------------------------------------------------------ @@ -506,8 +558,10 @@ CONFIG_VALUES = $(LIB_SRC)\config.values !endif !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "$(MAKEDIR:\=\\)\\$(LISP:\=\\)">>$(CONFIG_VALUES)] !endif +!if defined(PATH_PACKAGEPATH) # PATH_PACKAGEPATH is already a quoted string. -!if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)] +! if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)] +! endif !endif # Inferred rule @@ -523,13 +577,20 @@ $(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS) cd $(LIB_SRC) $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no cd $(NT) -$(LIB_SRC)/minitar.exe : $(NT)/minitar.mak $(NT)/minitar.c - nmake -nologo -f minitar.mak ZLIB="$(ZLIB_DIR)" NT="$(NT)" LIB_SRC="$(LIB_SRC)" + +$(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_NO_LIB) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) -MD -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no 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 \ @@ -630,7 +691,6 @@ DOC=$(LIB_SRC)\DOC DOC_SRC1=\ $(SRC)\abbrev.c \ $(SRC)\alloc.c \ - $(SRC)\alloca.c \ $(SRC)\blocktype.c \ $(SRC)\buffer.c \ $(SRC)\bytecode.c \ @@ -668,6 +728,7 @@ DOC_SRC3=\ $(SRC)\font-lock.c \ $(SRC)\frame.c \ $(SRC)\general.c \ + $(SRC)\getloadavg.c \ $(SRC)\glyphs.c \ $(SRC)\glyphs-eimage.c \ $(SRC)\glyphs-widget.c \ @@ -717,6 +778,7 @@ DOC_SRC5=\ $(SRC)\tparam.c \ $(SRC)\undo.c \ $(SRC)\window.c \ + $(SRC)\win32.c \ $(SRC)\widget.c !if $(HAVE_X_WINDOWS) @@ -801,8 +863,12 @@ DOC_SRC11=\ # This may not exist !if "$(emacs_beta_version)" != "" +!if "$(emacs_is_beta)" != "" EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version) -!ENDIF +!else +EMACS_PATCH_LEVEL=-DEMACS_PATCH_LEVEL=$(emacs_beta_version) +!endif +!endif !if !$(USE_PORTABLE_DUMPER) TEMACS_ENTRYPOINT=-entry:_start @@ -816,7 +882,8 @@ TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc TEMACS_SRC=$(SRC) TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \ oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \ - shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib $(LIBC_LIB) + shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib \ + $(INTEL_LIBS) $(LIBC_LIB) TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\ -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\ -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \ @@ -826,9 +893,12 @@ 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)\" +!if defined(PATH_PACKAGEPATH) + -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\" \ +!endif + -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" !if $(HAVE_X_WINDOWS) TEMACS_X_OBJS=\ @@ -917,7 +987,6 @@ TEMACS_OBJS= \ $(TEMACS_DUMP_OBJS)\ $(OUTDIR)\abbrev.obj \ $(OUTDIR)\alloc.obj \ - $(OUTDIR)\alloca.obj \ $(OUTDIR)\blocktype.obj \ $(OUTDIR)\buffer.obj \ $(OUTDIR)\bytecode.obj \ @@ -953,6 +1022,7 @@ TEMACS_OBJS= \ $(OUTDIR)\font-lock.obj \ $(OUTDIR)\frame.obj \ $(OUTDIR)\general.obj \ + $(OUTDIR)\getloadavg.obj \ $(OUTDIR)\glyphs.obj \ $(OUTDIR)\glyphs-eimage.obj \ $(OUTDIR)\glyphs-widget.obj \ @@ -999,7 +1069,8 @@ TEMACS_OBJS= \ $(OUTDIR)\tparam.obj \ $(OUTDIR)\undo.obj \ $(OUTDIR)\widget.obj \ - $(OUTDIR)\window.obj + $(OUTDIR)\window.obj \ + $(OUTDIR)\win32.obj # Rules @@ -1035,7 +1106,7 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res !if $(DEBUG_XEMACS) @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp - @$(DEL) bscmake.tmp + $(DEL) bscmake.tmp !endif !if $(USE_PORTABLE_DUMPER) @if exist $(SRC)\dump-id.c del $(SRC)\dump-id.c @@ -1131,7 +1202,7 @@ INFO_FILES= \ {$(MANDIR)}.texi{$(INFODIR)}.info: cd $(MANDIR) - $(MAKEINFO) $** + $(MAKEINFO) $(**F) XEMACS_SRCS = \ $(MANDIR)\xemacs\abbrevs.texi \ @@ -1290,11 +1361,11 @@ makeinfo-test: if exist "$(MAKEINFO)" goto test_done @$(XEMACS_BATCH) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))" @if not errorlevel 1 goto suggest_makeinfo -@echo XEmacs `info' cannot be built! -@echo Install XEmacs package `texinfo' (see README.packages). +@echo XEmacs 'info' cannot be built! +@echo Install XEmacs package 'texinfo' (see README.packages). :suggest_makeinfo @echo Consider specifying path to makeinfo program: MAKEINFO=path -@echo as this will build info docs faster than XEmacs using `texinfo'. +@echo as this will build info docs faster than XEmacs using 'texinfo'. @if errorlevel 1 exit 1 :test_done <$(TEMACS_DIR)\SATISFIED cd $(TEMACS_DIR) +!if defined(PACKAGE_PATH) set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH) +!else + set EMACSBOOTSTRAPLOADPATH=$(LISP) +!endif set EMACSBOOTSTRAPMODULEPATH=$(MODULES) - -1 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump + $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump !if $(USE_PORTABLE_DUMPER) rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc link.exe @<< @@ -1354,8 +1437,10 @@ $(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP << # Make the resource section read/write since almost all of it is the dump # data which needs to be writable. This avoids having to copy it. - editbin -nologo -section:.rsrc,rw xemacs.exe - del $(TEMACS_DIR)\xemacs.dmp + editbin -nologo -stack:0x800000 -section:.rsrc,rw xemacs.exe + $(DEL) $(TEMACS_DIR)\xemacs.dmp +!else + editbin -nologo -stack:0x800000 xemacs.exe !endif cd $(NT) @if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@ @@ -1364,18 +1449,19 @@ $(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP # use this rule to build the complete system all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ $(LIB_SRC_TOOLS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \ - update-auto-and-custom info + update-elc-2 update-auto-and-custom info 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)\" @xcopy /q PlaceHolder "$(INSTALL_DIR)\lock\" - @$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder" + $(DEL) "$(INSTALL_DIR)\lock\PlaceHolder" @xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @@ -1383,52 +1469,75 @@ install: all @xcopy /e /q $(XEMACS)\etc "$(INSTALL_DIR)\etc\" @xcopy /e /q $(XEMACS)\info "$(INSTALL_DIR)\info\" @xcopy /e /q $(XEMACS)\lisp "$(INSTALL_DIR)\lisp\" +!if defined(PACKAGE_PREFIX) @echo Making skeleton package tree in $(PACKAGE_PREFIX) ... @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\site-packages\" - @$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" + $(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\" - @$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" + $(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" @xcopy /q PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\" - @$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" - @$(DEL) PlaceHolder - -distclean: - $(DEL) *.bak - $(DEL) *.orig - $(DEL) *.rej - $(DEL) *.tmp + $(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" +!endif + $(DEL) PlaceHolder + +mostlyclean: $(DEL) $(XEMACS)\Installation - cd $(OUTDIR) - $(DEL) *.lib - $(DEL) *.obj - $(DEL) *.pdb - $(DEL) *.res - $(DEL) *.sbr - cd $(XEMACS)\$(TEMACS_DIR) - $(DEL) config.h - $(DEL) paths.h - $(DEL) Emacs.ad.h - $(DEL) *.bak - $(DEL) *.orig - $(DEL) *.rej - $(DEL) *.exe - $(DEL) *.map - $(DEL) *.bsc - $(DEL) *.pdb - cd $(LIB_SRC) - $(DEL) DOC - $(DEL) *.bak - $(DEL) *.orig - $(DEL) *.rej - $(DEL) *.exe - $(DEL) *.obj - $(DEL) *.pdb - $(DEL) *.res + $(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 + $(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 + $(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 + $(DEL) $(SRC)\paths.h + $(DEL) $(SRC)\Emacs.ad.h $(DEL) $(CONFIG_VALUES) - cd $(LISP) - $(DEL) /s /q *.bak *.elc *.orig *.rej - cd $(INFODIR) - $(DEL) *.info* + $(DEL) $(INFODIR)\*.info* + $(DEL) $(LISP)\*.elc + +realclean: distclean + +versionclean: + $(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 +#whatever. +#extraclean: realclean +# $(DEL) *~ *.*~ #* m\*~ m\#* s\*~ s\#* depend: cd $(SRC) @@ -1438,19 +1547,23 @@ 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 -XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_CONFIGURATION)'. +XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) configured for `$(EMACS_CONFIGURATION)'. - Building XEmacs in \"$(MAKEDIR:\=\\)\". + Building XEmacs in "$(MAKEDIR:\=\\)". !if defined(CCV) - Using compiler \"$(CC) $(CFLAGS)\". + Using compiler "$(CC) $(CFLAGS)". +!endif + Installing XEmacs in "$(INSTALL_DIR:\=\\)". +!if defined(PATH_PACKAGEPATH) + Package path is $(PATH_PACKAGEPATH). !endif - Installing XEmacs in \"$(INSTALL_DIR:\=\\)\". - Package path is $(PATH_PACKAGEPATH:"=\"). !if $(INFODOCK) Building InfoDock. !endif @@ -1463,6 +1576,14 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_ !if $(HAVE_MULE) Compiling in MULE. !endif +!if $(HAVE_GTK) + -------------------------------------------------------------------- + WARNING: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support. + WARNING: gtk-xemacs is not currently supported on MSWindows (mingw or msvc). + WARNING: Yes, we know that gtk has been ported to native MSWindows, but + WARNING: XEmacs is not yet ready to use that port. + -------------------------------------------------------------------- +!endif !if $(HAVE_XPM) Compiling in support for XPM images. !else @@ -1516,12 +1637,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 @@ -1545,16 +1660,23 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_ @type $(XEMACS)\Installation @echo -------------------------------------------------------------------- -# Update auto-autoloads.el and custom-load.el similar to what -# XEmacs.rules does for xemacs-packages. +# Update out-of-date .elcs, other than needed for dumping. +update-elc-2: + $(XEMACS_BATCH) -l update-elc-2.el -f batch-update-elc-2 $(LISP) + +# Update auto-autoloads.el and custom-load.el, similar to what +# XEmacs.rules does for xemacs-packages. This used to delete +# auto-autoloads.el first, but that's a bad idea, because it forces +# rebuilding from scratch, which is time-consuming; and the autoload +# code is specifically written to do in-place updating. However, if +# your auto-autoload file is messed up and you want it rebuilt from +# scratch, delete it from the command line and then nmake with this +# target. update-auto-and-custom: -# Don't delete this, because it forces rebuilding from scratch, -# which is time-consuming; and the autoload code is specifically -# written to do in-place updating. -# @$(DEL) $(LISP)\auto-autoloads.el # Combine into one invocation to avoid repeated startup penalty. - $(XEMACS_BATCH) -l autoload -f batch-update-one-directory $(LISP) -f batch-byte-compile-one-file $(LISP)\auto-autoloads.el -l cus-dep -f Custom-make-dependencies $(LISP) - @$(DEL) $(LISP)\auto-autoloads.el~ + $(XEMACS_BATCH) -l autoload -f batch-update-one-directory $(LISP) -f batch-byte-compile-one-file $(LISP)\auto-autoloads.el -l cus-dep -f Custom-make-one-dependency $(LISP) -f batch-byte-compile-one-file $(LISP)\custom-load.el + $(DEL) $(LISP)\auto-autoloads.el~ + $(DEL) $(LISP)\custom-load.el~ # DO NOT DELETE THIS LINE -- make depend depends on it.