comparison nt/xemacs.mak @ 1330:4542b72c005e

[xemacs-hg @ 2003-03-01 07:25:26 by ben] build patch Makefile.in.in: Move src deletions to src/Makefile.in.in. dump-paths.el, dumped-lisp.el: Delete. Combine stuff into setup-paths.el. find-paths.el: Removed. Make this file contain generic routines only. Move stuff to compute Emacs roots to setup-paths.el. startup.el: Removed. Move these variables into setup-paths.el. setup-paths.el, startup.el: Removed. Combine all high-level code for computing the paths into setup-paths.el. Create new function startup-find-load-path to encapsulate all logic for computing `load-path'. Eliminate invocation-directory and invocation-name parameters since there is no point (false generality) -- the code references other globals, which cannot be specified. Eliminate some code duplicated between setup-paths.el and startup.el. Clean up the debug-paths code and output load-path in addition. Add logic to paths-emacs-root-p to support separated source and build trees. loadup.el, make-docfile.el, update-elc-2.el, update-elc.el: Rewrite to allow for separated source and build trees, as may occur in MS Windows. NOTE TO BUILD HACKERS: loadup.el, make-docfile.el, update-elc.el and update-elc-2.el made two assumptions that are no longer correct: (1) The source and build trees are in the same place. (2) They can make assumptions about where `.' is. These files now compute the locations of the source and build roots at the top of the file. *ALL* constant file names or path snippets must now be made absolute using expand-file-name and one of these roots. dumped-lisp.el, packages.el: Removed. Remove some unused lists of Lisp files. packages-hardcoded-lisp (empty, in any case) moved to dumped-lisp.el. startup.el: When a compiled init file is out-of-date wrt the uncompiled version, load the uncompiled version and issue a nasty warning. update-elc-2.el: Force touching of auto-autoloads files when REBUILD_AUTOLOADS was set. update-elc.el: Fix code that checks whether dumping is necessary to check against xemacs.dmp, not xemacs.exe, when Unix and pdump. lwlib-Xm.c: Fix compile warning. README, config.inc.samp, xemacs.mak: -- Major reorganization and cleanup. -- Add support for separated build tree and source tree. -- Delete all support for X Windows building, since it's totally bit-rotten and will never be fixed up. Instruct people to use Cygwin if they want such support. make-build-dir: New script to create a skeleton build tree for use with separated build and source tree compilation. m/acorn.h, m/alliant-2800.h, m/alliant.h, m/altos.h, m/amdahl.h, m/arm.h, m/att3b.h, m/aviion.h, m/clipper.h, m/cnvrgnt.h, m/convex.h, m/cydra5.h, m/delta.h, m/delta88k.h, m/dpx2.h, m/elxsi.h, m/ews4800r.h, m/gould.h, m/hp800.h, m/hp9000s300.h, m/i860.h, m/ibmps2-aix.h, m/ibmrs6000.h, m/ibmrt-aix.h, m/ibmrt.h, m/intel386.h, m/iris4d.h, m/iris5d.h, m/iris6d.h, m/irist.h, m/m68k.h, m/masscomp.h, m/mg1.h, m/mips-nec.h, m/mips-siemens.h, m/mips.h, m/nh3000.h, m/nh4000.h, m/ns32000.h, m/plexus.h, m/powerpc.h, m/sequent-ptx.h, m/sequent.h, m/sgi-challenge.h, m/stride.h, m/tad68k.h, m/targon31.h, m/tekxd88.h, m/template.h, m/tower32.h, m/tower32v3.h, m/ustation.h, m/wicat.h, m/xps100.h, data.c, doc.c, editfns.c, emacs.c, lrecord.h, ntheap.c, process-unix.c, sysdep.c, unexec.c: Delete all support for bit-rotten CANNOT_DUMP. Just use pdump. Makefile.in.in: Lots o' cleanup. Use names like LISP, SRC instead of lispdir, srcdir, for consistency with xemacs.mak and the conventions in the rest of the file. Eliminate use of ${...} in favor of $(...), to make it easier to move code between this file and xemacs.mak. Fix dependency handling wrt NEEDTODUMP to eliminate problems some people (e.g. Vin) have been seeing with non-GNU makes. Write a long section about the subtle but oh-so-important differences in dependency processing between nmake, make, and GNU make. Add unicode-encapsulate target, from xemacs.mak. chartab.c, lrecord.h: Fix crash due to attempt to free objects across dump/undump.
author ben
date Sat, 01 Mar 2003 07:25:56 +0000
parents 70921960b980
children 1b0339b048ce
comparison
equal deleted inserted replaced
1329:389741884c65 1330:4542b72c005e
33 # to invoke nmake in the directory where xemacs.mak is. 33 # to invoke nmake in the directory where xemacs.mak is.
34 !if !exist("$(MAKEDIR)\xemacs.mak") 34 !if !exist("$(MAKEDIR)\xemacs.mak")
35 !error Please run nmake from the directory of this makefile (xemacs\nt). 35 !error Please run nmake from the directory of this makefile (xemacs\nt).
36 !endif 36 !endif
37 37
38 XEMACS=$(MAKEDIR)\.. 38 MAKEROOT=$(MAKEDIR:\nt=)
39 LISP=$(XEMACS)\lisp 39
40 LIB_SRC=$(XEMACS)\lib-src 40 ########################### Common commands.
41 MODULES=$(XEMACS)\modules 41
42 NT=$(MAKEDIR) 42 # Put these before including config.inc so they can be overridden there.
43 OUTDIR=$(NT)\obj
44 SRC=$(XEMACS)\src
45 LWLIB_SRCDIR=$(XEMACS)\lwlib
46 MAKEDIRSTRING=$(MAKEDIR:\=\\)
47 XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=)
48
49
50 # Common operations
51
52 # Note that some versions of some commands are deficient. 43 # Note that some versions of some commands are deficient.
53 44
54 # Define the 'del' command to use 45 # Define the 'del' command to use
55 # WinME's DEL command can only handle one argument and only has the /P flag. 46 # WinME's DEL command can only handle one argument and only has the /P flag.
56 # So only delete one glob at a time. Override flags in config.inc. 47 # So only delete one glob at a time. Override flags in config.inc.
62 # Define the 'copy' command to use. 53 # Define the 'copy' command to use.
63 # Use /r (instead of /y), which exists on Windows NT 4 and 5. 54 # Use /r (instead of /y), which exists on Windows NT 4 and 5.
64 COPY=xcopy /q /r 55 COPY=xcopy /q /r
65 COPYDIR=xcopy /q /r /e 56 COPYDIR=xcopy /q /r /e
66 57
58 ########################### Includes, and source and build tree determination.
59
60 !include "config.inc"
61
62 !if defined(BUILD_DIR)
63 SEPARATE_BUILD=1
64 SRCROOT=$(MAKEROOT)
65 BLDROOT=$(BUILD_DIR)
66 !else
67 !if defined(SOURCE_DIR)
68 SEPARATE_BUILD=1
69 SRCROOT=$(SOURCE_DIR)
70 BLDROOT=$(MAKEROOT)
71 !else
72 SEPARATE_BUILD=0
73 SRCROOT=$(MAKEROOT)
74 BLDROOT=$(MAKEROOT)
75 !endif
76 !endif
77
67 # Program name and version 78 # Program name and version
68 79 !include "$(SRCROOT)\version.sh"
69 !include "$(XEMACS)\version.sh" 80
70 81 ########################### Basic vars referring to directories, both in
71 !include "config.inc" 82 ########################### the source and build trees.
83
84 LISP=$(SRCROOT)\lisp
85 LIB_SRC=$(SRCROOT)\lib-src
86 NT=$(SRCROOT)\nt
87 SRC=$(SRCROOT)\src
88 ETC=$(SRCROOT)\etc
89
90 BLDLIB_SRC=$(BLDROOT)\lib-src
91 BLDNT=$(BLDROOT)\nt
92 OUTDIR=$(BLDNT)\obj
93 BLDSRC=$(BLDROOT)\src
94
95 # This appears in the dependency file
96 LWLIB_SRCDIR=$(SRCROOT)\lwlib
97
98 ########################### Process the config.inc options.
72 99
73 !if !defined(INFODOCK) 100 !if !defined(INFODOCK)
74 INFODOCK=0 101 INFODOCK=0
75 !endif 102 !endif
103 !if !defined(MULE)
104 MULE=0
105 !endif
106 !if !defined(HAVE_MS_WINDOWS)
107 HAVE_MS_WINDOWS=1
108 !endif
109 !if !defined(HAVE_XPM)
110 HAVE_XPM=0
111 !endif
112 !if !defined(HAVE_PNG)
113 HAVE_PNG=0
114 !endif
115 !if !defined(HAVE_ZLIB)
116 HAVE_ZLIB=$(HAVE_PNG)
117 !endif
118 !if !defined(HAVE_TIFF)
119 HAVE_TIFF=0
120 !endif
121 !if !defined(HAVE_JPEG)
122 HAVE_JPEG=0
123 !endif
124 !if !defined(HAVE_XFACE)
125 HAVE_XFACE=0
126 !endif
127 !if !defined(HAVE_GIF)
128 HAVE_GIF=1
129 !endif
130 !if !defined(HAVE_GTK)
131 HAVE_GTK=0
132 !endif
133 !if !defined(HAVE_MENUBARS)
134 HAVE_MENUBARS=1
135 !endif
136 !if !defined(HAVE_SCROLLBARS)
137 HAVE_SCROLLBARS=1
138 !endif
139 !if !defined(HAVE_TOOLBARS)
140 HAVE_TOOLBARS=$(HAVE_XPM)
141 !endif
142 !if !defined(HAVE_DIALOGS)
143 HAVE_DIALOGS=1
144 !endif
145 !if !defined(HAVE_NATIVE_SOUND)
146 HAVE_NATIVE_SOUND=1
147 !endif
148 !if !defined(HAVE_WIDGETS)
149 HAVE_WIDGETS=1
150 !endif
151 !if !defined(OPTIMIZED_BUILD)
152 OPTIMIZED_BUILD=1
153 !endif
154 !if !defined(USE_FASTCALL)
155 # #### Change to 1 when I check in the ws with support for fastcall
156 USE_FASTCALL=0
157 !endif
158 !if !defined(PROFILE_SUPPORT)
159 PROFILE_SUPPORT=0
160 !endif
161 !if !defined(DEBUG_XEMACS)
162 DEBUG_XEMACS=0
163 !endif
164 !if !defined(HAVE_VC6)
165 HAVE_VC6=1
166 !endif
167
168 !if !defined(ERROR_CHECK_ALL)
169 !if "$(emacs_is_beta)" != ""
170 ERROR_CHECK_ALL=1
171 !else
172 ERROR_CHECK_ALL=0
173 !endif
174 !endif
175
176 !if !defined(CPLUSPLUS_COMPILE)
177 !if $(ERROR_CHECK_ALL)
178 CPLUSPLUS_COMPILE=1
179 !else
180 CPLUSPLUS_COMPILE=0
181 !endif
182 !endif
183
184 !if !defined(USE_KKCC)
185 USE_KKCC=0
186 !endif
187 !if !defined(USE_UNION_TYPE)
188 USE_UNION_TYPE=0
189 !endif
190 !if !defined(QUICK_BUILD)
191 QUICK_BUILD=0
192 !endif
193 !if !defined(VERBOSECC)
194 VERBOSECC=0
195 !endif
196 !if !defined(DEPEND)
197 DEPEND=0
198 !endif
199 !if !defined(USE_PORTABLE_DUMPER)
200 USE_PORTABLE_DUMPER=1
201 !endif
202 !if !defined(USE_MINITAR)
203 USE_MINITAR=$(HAVE_ZLIB)
204 !endif
205
206 # A little bit of adhockery. Default to use system malloc and
207 # DLL version of the C runtime library when using portable
208 # dumping. These are the optimal settings.
209 !if !defined(USE_SYSTEM_MALLOC)
210 USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
211 !endif
212 !if !defined(USE_CRTDLL)
213 USE_CRTDLL=$(USE_PORTABLE_DUMPER)
214 !endif
215
216 ########################### Check for incompatible options.
217
218 CONFIG_ERROR=0
219 !if $(INFODOCK) && !exist("..\..\Infodock.rules")
220 !message Cannot build InfoDock without InfoDock sources
221 CONFIG_ERROR=1
222 !endif
223 !if !$(USE_PORTABLE_DUMPER) && $(USE_SYSTEM_MALLOC)
224 !message Cannot use system allocator when dumping old way, use portable dumper.
225 CONFIG_ERROR=1
226 !endif
227 !if !$(USE_PORTABLE_DUMPER) && $(USE_CRTDLL)
228 !message Cannot use C runtime DLL when dumping old way, use portable dumper.
229 CONFIG_ERROR=1
230 !endif
231 !if !$(USE_SYSTEM_MALLOC) && $(USE_CRTDLL)
232 !message GNU malloc currently cannot be used with CRT DLL.
233 !message [[[Developer note: If you want to fix it, read Q112297 first]]] ####
234 CONFIG_ERROR=1
235 !endif
236 !if !$(HAVE_MS_WINDOWS) && !$(HAVE_GTK)
237 !message Please specify at least one HAVE_MS_WINDOWS=1 and/or HAVE_GTK=1
238 CONFIG_ERROR=1
239 !endif
240 !if $(HAVE_MS_WINDOWS) && $(HAVE_GTK) && !defined(GTK_DIR)
241 !message Please specify root directory for your GTK installation: GTK_DIR=path
242 CONFIG_ERROR=1
243 !endif
244 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
245 !message Please specify root directory for your XPM installation: XPM_DIR=path
246 CONFIG_ERROR=1
247 !endif
248 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
249 !message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
250 CONFIG_ERROR=1
251 !endif
252 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
253 !message Please specify root directory for your PNG installation: PNG_DIR=path
254 CONFIG_ERROR=1
255 !endif
256 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
257 !message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
258 CONFIG_ERROR=1
259 !endif
260 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
261 !message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
262 CONFIG_ERROR=1
263 !endif
264 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
265 !message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
266 CONFIG_ERROR=1
267 !endif
268 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
269 !message Please specify root directory for your TIFF installation: TIFF_DIR=path
270 CONFIG_ERROR=1
271 !endif
272 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
273 !message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib"
274 CONFIG_ERROR=1
275 !endif
276 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
277 !message Please specify root directory for your JPEG installation: JPEG_DIR=path
278 CONFIG_ERROR=1
279 !endif
280 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
281 !message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
282 CONFIG_ERROR=1
283 !endif
284 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
285 !message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
286 CONFIG_ERROR=1
287 !endif
288 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
289 !message Specified COMPFACE directory does not contain "$(COMPFACE_DIR)\libcompface.lib"
290 CONFIG_ERROR=1
291 !endif
292 !if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
293 !message Toolbars require XPM support
294 CONFIG_ERROR=1
295 !endif
296 !if $(CONFIG_ERROR)
297 !error Configuration error(s) found
298 !endif
299
300 ########################### Set version strings.
76 301
77 !if $(INFODOCK) 302 !if $(INFODOCK)
78 INFODOCK_VERSION_STRING=$(infodock_major_version).$(infodock_minor_version).$(infodock_build_version) 303 INFODOCK_VERSION_STRING=$(infodock_major_version).$(infodock_minor_version).$(infodock_build_version)
79 PROGRAM_DEFINES=-DINFODOCK \ 304 PROGRAM_DEFINES=-DINFODOCK \
80 -DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \ 305 -DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
98 -DPATH_PROGNAME=\"xemacs\" \ 323 -DPATH_PROGNAME=\"xemacs\" \
99 -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \ 324 -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \
100 -DEMACS_PROGNAME=\"xemacs\" 325 -DEMACS_PROGNAME=\"xemacs\"
101 !endif 326 !endif
102 327
103 # 328 ########################### Set up installation and package directories.
104 # Command line options defaults 329
105 #
106 !if !defined(INSTALL_DIR) 330 !if !defined(INSTALL_DIR)
107 ! if $(INFODOCK) 331 ! if $(INFODOCK)
108 INSTALL_DIR=c:\Program Files\Infodock\Infodock-$(INFODOCK_VERSION_STRING) 332 INSTALL_DIR=c:\Program Files\Infodock\Infodock-$(INFODOCK_VERSION_STRING)
109 ! else 333 ! else
110 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING) 334 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
111 ! endif 335 ! endif
112 !endif
113 !if !defined(MULE)
114 MULE=0
115 !endif 336 !endif
116 !if !defined(PACKAGE_PATH) 337 !if !defined(PACKAGE_PATH)
117 ! if !defined(PACKAGE_PREFIX) 338 ! if !defined(PACKAGE_PREFIX)
118 PACKAGE_PREFIX=c:\Program Files\XEmacs 339 PACKAGE_PREFIX=c:\Program Files\XEmacs
119 ! endif 340 ! endif
122 ! else 343 ! else
123 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages 344 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages
124 ! endif 345 ! endif
125 !endif 346 !endif
126 PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)" 347 PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)"
127 !if !defined(HAVE_MS_WINDOWS) 348
128 HAVE_MS_WINDOWS=1 349 !if $(INFODOCK)
129 !endif 350 PATH_PREFIX=../..
130 !if !defined(HAVE_X_WINDOWS) 351 !else
131 HAVE_X_WINDOWS=0 352 PATH_PREFIX=..
132 !endif 353 !endif
133 !if !defined(HAVE_XPM) 354
134 HAVE_XPM=0 355 PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
135 !endif 356
136 !if !defined(HAVE_PNG) 357 !if $(SEPARATE_BUILD)
137 HAVE_PNG=0 358 PATH_DEFINES=-DPATH_LOADSEARCH=\"$(LISP:\=\\)\" -DPATH_DATA=\"$(ETC:\=\\)\"
138 !endif 359 !endif
139 !if !defined(HAVE_ZLIB) 360
140 HAVE_ZLIB=$(HAVE_PNG) 361 ########################### Determine system configuration.
141 !endif 362
142 !if !defined(HAVE_TIFF)
143 HAVE_TIFF=0
144 !endif
145 !if !defined(HAVE_JPEG)
146 HAVE_JPEG=0
147 !endif
148 !if !defined(HAVE_XFACE)
149 HAVE_XFACE=0
150 !endif
151 !if !defined(HAVE_GIF)
152 HAVE_GIF=1
153 !endif
154 !if !defined(HAVE_GTK)
155 HAVE_GTK=0
156 !endif
157 !if !defined(HAVE_MENUBARS)
158 HAVE_MENUBARS=1
159 !endif
160 !if !defined(HAVE_SCROLLBARS)
161 HAVE_SCROLLBARS=1
162 !endif
163 !if !defined(HAVE_TOOLBARS)
164 HAVE_TOOLBARS=$(HAVE_XPM)
165 !endif
166 !if !defined(HAVE_DIALOGS)
167 HAVE_DIALOGS=1
168 !endif
169 !if !defined(HAVE_NATIVE_SOUND)
170 HAVE_NATIVE_SOUND=1
171 !endif
172 !if !defined(HAVE_WIDGETS)
173 HAVE_WIDGETS=1
174 !endif
175 !if !defined(OPTIMIZED_BUILD)
176 OPTIMIZED_BUILD=1
177 !endif
178 !if !defined(USE_FASTCALL)
179 # #### Change to 1 when I check in the ws with support for fastcall
180 USE_FASTCALL=0
181 !endif
182 !if !defined(PROFILE_SUPPORT)
183 PROFILE_SUPPORT=0
184 !endif
185 !if !defined(DEBUG_XEMACS)
186 DEBUG_XEMACS=0
187 !endif
188 !if !defined(HAVE_VC6)
189 HAVE_VC6=1
190 !endif
191
192 !if !defined(ERROR_CHECK_ALL)
193 !if "$(emacs_is_beta)" != ""
194 ERROR_CHECK_ALL=1
195 !else
196 ERROR_CHECK_ALL=0
197 !endif
198 !endif
199
200 !if !defined(CPLUSPLUS_COMPILE)
201 !if $(ERROR_CHECK_ALL)
202 CPLUSPLUS_COMPILE=1
203 !else
204 CPLUSPLUS_COMPILE=0
205 !endif
206 !endif
207
208 !if !defined(USE_KKCC)
209 USE_KKCC=0
210 !endif
211 !if !defined(USE_UNION_TYPE)
212 USE_UNION_TYPE=0
213 !endif
214 !if !defined(QUICK_BUILD)
215 QUICK_BUILD=0
216 !endif
217 !if !defined(VERBOSECC)
218 VERBOSECC=0
219 !endif
220 !if !defined(DEPEND)
221 DEPEND=0
222 !endif
223 !if !defined(USE_PORTABLE_DUMPER)
224 USE_PORTABLE_DUMPER=1
225 !endif
226 !if !defined(USE_MINITAR)
227 USE_MINITAR=$(HAVE_ZLIB)
228 !endif
229
230 # A little bit of adhockery. Default to use system malloc and
231 # DLL version of the C runtime library when using portable
232 # dumping. These are the optimal settings.
233 !if !defined(USE_SYSTEM_MALLOC)
234 USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
235 !endif
236 !if !defined(USE_CRTDLL)
237 USE_CRTDLL=$(USE_PORTABLE_DUMPER)
238 !endif
239
240 #
241 # System configuration
242 #
243 !if !defined(OS) 363 !if !defined(OS)
244 OS=Windows_95/98 364 OS=Windows_95/98
245 EMACS_CONFIGURATION=i586-pc-win32 365 EMACS_CONFIGURATION=i586-pc-win32
246 !else if "$(PROCESSOR_ARCHITECTURE)" == "x86" 366 !else if "$(PROCESSOR_ARCHITECTURE)" == "x86"
247 EMACS_CONFIGURATION=i586-pc-win32 367 EMACS_CONFIGURATION=i586-pc-win32
256 !endif 376 !endif
257 STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_) 377 STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_)
258 STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_) 378 STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_)
259 PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER) 379 PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER)
260 380
261 # 381 ########################### Determine includes/defines/object file for
262 # Conf error checks 382 ########################### various options.
263 #
264 CONFIG_ERROR=0
265 !if $(INFODOCK) && !exist("..\..\Infodock.rules")
266 !message Cannot build InfoDock without InfoDock sources
267 CONFIG_ERROR=1
268 !endif
269 !if !$(USE_PORTABLE_DUMPER) && $(USE_SYSTEM_MALLOC)
270 !message Cannot use system allocator when dumping old way, use portable dumper.
271 CONFIG_ERROR=1
272 !endif
273 !if !$(USE_PORTABLE_DUMPER) && $(USE_CRTDLL)
274 !message Cannot use C runtime DLL when dumping old way, use portable dumper.
275 CONFIG_ERROR=1
276 !endif
277 !if !$(USE_SYSTEM_MALLOC) && $(USE_CRTDLL)
278 !message GNU malloc currently cannot be used with CRT DLL.
279 !message [[[Developer note: If you want to fix it, read Q112297 first]]] ####
280 CONFIG_ERROR=1
281 !endif
282 !if !$(HAVE_MS_WINDOWS) && !$(HAVE_X_WINDOWS)
283 !message Please specify at least one HAVE_MS_WINDOWS=1 and/or HAVE_X_WINDOWS=1
284 CONFIG_ERROR=1
285 !endif
286 !if $(HAVE_X_WINDOWS) && !defined(X11_DIR)
287 !message Please specify root directory for your X11 installation: X11_DIR=path
288 CONFIG_ERROR=1
289 !endif
290 !if $(HAVE_X_WINDOWS) && defined(X11_DIR) && !exist("$(X11_DIR)\LIB\X11.LIB")
291 !message Specified X11 directory does not contain "$(X11_DIR)\LIB\X11.LIB"
292 CONFIG_ERROR=1
293 !endif
294 !if $(HAVE_MS_WINDOWS) && $(HAVE_GTK) && !defined(GTK_DIR)
295 !message Please specify root directory for your GTK installation: GTK_DIR=path
296 CONFIG_ERROR=1
297 !endif
298 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
299 !message Please specify root directory for your XPM installation: XPM_DIR=path
300 CONFIG_ERROR=1
301 !endif
302 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
303 !message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
304 CONFIG_ERROR=1
305 !endif
306 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
307 !message Please specify root directory for your PNG installation: PNG_DIR=path
308 CONFIG_ERROR=1
309 !endif
310 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
311 !message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
312 CONFIG_ERROR=1
313 !endif
314 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
315 !message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
316 CONFIG_ERROR=1
317 !endif
318 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
319 !message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
320 CONFIG_ERROR=1
321 !endif
322 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
323 !message Please specify root directory for your TIFF installation: TIFF_DIR=path
324 CONFIG_ERROR=1
325 !endif
326 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
327 !message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib"
328 CONFIG_ERROR=1
329 !endif
330 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
331 !message Please specify root directory for your JPEG installation: JPEG_DIR=path
332 CONFIG_ERROR=1
333 !endif
334 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
335 !message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
336 CONFIG_ERROR=1
337 !endif
338 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
339 !message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
340 CONFIG_ERROR=1
341 !endif
342 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
343 !message Specified COMPFACE directory does not contain "$(COMPFACE_DIR)\libcompface.lib"
344 CONFIG_ERROR=1
345 !endif
346 !if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
347 !message Toolbars require XPM support
348 CONFIG_ERROR=1
349 !endif
350 !if $(CONFIG_ERROR)
351 !error Configuration error(s) found
352 !endif
353
354 #
355 # Whether to use dependency information generated by make-src-depend
356 #
357 !if $(DEPEND) && exist("$(SRC)\depend")
358 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
359 ! endif
360 # This perl script used to be inline but that caused too many quoting problems
361 ! if [perl .\make-nt-depend -s=$(SRC) -c=$(NT) -o=$(OUTDIR) < $(SRC)\depend > $(OUTDIR)\depend.tmp]
362 ! endif
363 ! include "$(OUTDIR)\depend.tmp"
364 !else
365 ! if [echo WARNING: Compiling without dependency information.]
366 ! endif
367 !endif
368
369 #
370 # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
371 #
372 !if $(VERBOSECC)
373 CCV=$(CC)
374 !else
375 CCV=@$(CC)
376 !endif
377
378 !if $(DEBUG_XEMACS)
379
380 # ---- Debugging support ----
381 ! if $(HAVE_VC6)
382 # support edit-and-continue
383 DEBUG_FLAGS_COMPILE=-ZI
384 ! else
385 DEBUG_FLAGS_COMPILE=-Zi
386 ! endif
387 DEBUG_FLAGS_LINK=-debug:full
388 DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
389 #BROWSERFLAGS=-Fr -Fd$(OUTDIR)\temacs.pdb
390 BROWSERFLAGS=-Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
391
392 !else
393
394 # ---- No debugging support ----
395 DEBUG_FLAGS_COMPILE=
396 DEBUG_FLAGS_LINK=-incremental:no
397 DEBUG_DEFINES=
398 BROWSERFLAGS=
399
400 !endif
401
402 !if $(USE_CRTDLL)
403 ! if $(DEBUG_XEMACS)
404 C_LIBFLAG=-MDd
405 LIBC_LIB=msvcrtd.lib
406 ! else
407 C_LIBFLAG=-MD
408 LIBC_LIB=msvcrt.lib
409 ! endif
410 !else
411 C_LIBFLAG=-ML
412 LIBC_LIB=libc.lib
413 !endif
414
415 !if $(OPTIMIZED_BUILD)
416 # -G5 means optimize for Pentium. (According to the code-optimization
417 # article, -GB is the same as -G5, and -G6, i.e. optimze for Pentium Pro,
418 # gains you little over -G5 for PPro's but causes big slowdowns for
419 # Pentiums.) -GF means put strings in read-only memory; -Gr means use
420 # fastcall convention. Another possible addition: -Ob2 -- allows inlining
421 # of any function, not just those declared inline. Potential code size
422 # increase, though.
423 #
424 # #### Note: fastcall doesn't actually seem to make any difference, at least
425 # not using the (admittedly unscientific) test of (hanoi 6). The
426 # optimization article claims 1-2% improvement in both speed and size.
427 OPTFLAGS_FASTCALL =-O2 -G5 -Gr -Ob2
428 OPTFLAGS_CDECL =-O2 -G5 -Ob2
429 !else
430 OPTFLAGS_FASTCALL =-Od
431 OPTFLAGS_CDECL =-Od
432 !endif
433
434 !if $(USE_FASTCALL)
435 OPTFLAGS = $(OPTFLAGS_FASTCALL)
436 !else
437 OPTFLAGS = $(OPTFLAGS_CDECL)
438 !endif
439
440 !if $(PROFILE_SUPPORT)
441 PROFILE_FLAGS=-profile
442 !else
443 PROFILE_FLAGS=
444 !endif
445
446 !if $(CPLUSPLUS_COMPILE)
447 CPLUSPLUS_COMPILE_FLAGS=-TP
448 !else
449 CPLUSPLUS_COMPILE_FLAGS=
450 !endif
451
452 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
453
454 CFLAGS_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS)
455 CFLAGS=$(CFLAGS_NO_LIB) $(C_LIBFLAG)
456
457 CFLAGS_CDECL_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS_CDECL)
458 CFLAGS_CDECL=$(CFLAGS_CDECL_NO_LIB) $(C_LIBFLAG)
459
460 !if $(HAVE_X_WINDOWS)
461 X_DEFINES=-DHAVE_X_WINDOWS
462 X_INCLUDES=-I$(X11_DIR)\include
463 X_LIBS=-libpath:$(X11_DIR)\lib Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib Xext.lib X11.lib
464 !endif
465 383
466 !if $(HAVE_MS_WINDOWS) 384 !if $(HAVE_MS_WINDOWS)
467 MSW_DEFINES=-DHAVE_MS_WINDOWS 385 MSW_DEFINES=-DHAVE_MS_WINDOWS
468 MSW_INCLUDES= 386 MSW_INCLUDES=
469 MSW_LIBS=comctl32.lib 387 MSW_LIBS=comctl32.lib
522 MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj 440 MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
523 !endif 441 !endif
524 !if $(HAVE_NATIVE_SOUND) 442 !if $(HAVE_NATIVE_SOUND)
525 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND 443 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
526 !endif 444 !endif
527 !endif 445
528
529 !if $(MULE)
530 MULE_DEFINES=-DMULE
531 !endif
532
533 !if $(QUICK_BUILD)
534 QUICK_DEFINES=-DQUICK_BUILD
535 !endif
536
537 !if $(ERROR_CHECK_ALL)
538 ERROR_CHECK_DEFINES=-DERROR_CHECK_ALL
539 !endif
540
541 !if $(USE_UNION_TYPE)
542 UNION_DEFINES=-DUSE_UNION_TYPE
543 !endif
544
545 !if $(USE_PORTABLE_DUMPER)
546 DUMPER_DEFINES=-DPDUMP
547 !endif
548
549 !if $(USE_KKCC)
550 KKCC_DEFINES=-DUSE_KKCC
551 !endif
552
553 !if $(USE_SYSTEM_MALLOC)
554 MALLOC_DEFINES=-DSYSTEM_MALLOC
555 !else
556 MALLOC_DEFINES=-DGNU_MALLOC
557 !endif
558
559 # Hard-coded paths
560
561 !if $(INFODOCK)
562 PATH_PREFIX=../..
563 !else
564 PATH_PREFIX=..
565 !endif
566
567 PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
568
569 # Generic variables
570
571 INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR)
572
573 DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
574 $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MALLOC_DEFINES) \
575 $(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) \
576 -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
577 -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
578
579 #------------------------------------------------------------------------------
580
581 $(OUTDIR)\nul:
582 -@mkdir $(OUTDIR)
583
584 XEMACS_INCLUDES=\
585 $(SRC)\config.h \
586 $(SRC)\Emacs.ad.h \
587 $(SRC)\paths.h
588
589 # #### Copying is cheap, we should just force these
590 $(SRC)\config.h: $(SRC)\config.h.in
591 # #### ms must have hired monkeys to design their shell commands. if
592 # #### you use xcopy to copy a file from one name to another, it
593 # #### PROMPTS you to see if you meant the second as a directory! and
594 # #### no switch to mean "no of course, you idiots, it's a file!"
595 @copy $(SRC)\config.h.in $(SRC)\config.h
596
597 $(SRC)\Emacs.ad.h: Emacs.ad.h
598 set COPYCMD=/y
599 @$(COPY) Emacs.ad.h $(SRC)
600
601 $(SRC)\paths.h: paths.h
602 set COPYCMD=/y
603 @$(COPY) paths.h $(SRC)
604
605 #------------------------------------------------------------------------------
606
607 # lib-src programs
608
609 LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32_NATIVE
610
611 #
612 # Creating config.values to be used by config.el
613 #
614 CONFIG_VALUES = $(LIB_SRC)\config.values
615 !if [echo Creating $(CONFIG_VALUES) && echo ;;; Do not edit this file!>$(CONFIG_VALUES)]
616 !endif
617 # MAKEDIR has to be made into a string.
618 #!if [echo blddir>>$(CONFIG_VALUES) && echo $(ESC)"$(MAKEDIR:\=\\)\\..$(ESC)">>$(CONFIG_VALUES)]
619 !if [echo blddir>>$(CONFIG_VALUES) && echo "$(MAKEDIR:\=\\)\\..">>$(CONFIG_VALUES)]
620 !endif
621 !if [echo CC>>$(CONFIG_VALUES) && echo "$(CC:\=\\)">>$(CONFIG_VALUES)]
622 !endif
623 !if [echo CFLAGS>>$(CONFIG_VALUES) && echo "$(CFLAGS:\=\\)">>$(CONFIG_VALUES)]
624 !endif
625 !if [echo CPP>>$(CONFIG_VALUES) && echo "$(CPP:\=\\)">>$(CONFIG_VALUES)]
626 !endif
627 !if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo "$(CPPFLAGS:\=\\)">>$(CONFIG_VALUES)]
628 !endif
629 !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "$(MAKEDIR:\=\\)\\$(LISP:\=\\)">>$(CONFIG_VALUES)]
630 !endif
631 # PATH_PACKAGEPATH is already a quoted string.
632 !if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
633 !endif
634
635
636 LINK_DEPENDENCY_ARGS = -Fe$@ -Fd$* $** -link $(DEBUG_FLAGS_LINK)
637 LINK_STANDARD_LIBRARY_ARGS = setargv.obj user32.lib wsock32.lib
638
639 # Inferred rule
640 {$(LIB_SRC)}.c{$(LIB_SRC)}.exe :
641 cd $(LIB_SRC)
642 $(CCV) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES) $(CFLAGS) $(LINK_DEPENDENCY_ARGS) $(LINK_STANDARD_LIBRARY_ARGS)
643 cd $(NT)
644
645 # Individual dependencies
646 ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(SRC)/regex.c
647 $(LIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
648 cd $(LIB_SRC)
649 $(CCV) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES) $(CFLAGS) $(LINK_DEPENDENCY_ARGS) -stack:0x800000 $(LINK_STANDARD_LIBRARY_ARGS)
650 cd $(NT)
651
652 $(LIB_SRC)/movemail.exe : $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
653
654 # Minitar uses zlib so just use cdecl to simplify things
655 $(LIB_SRC)/minitar.exe : $(NT)/minitar.c
656 cd $(LIB_SRC)
657 $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
658 cd $(NT)
659
660 LIB_SRC_TOOLS = \
661 $(LIB_SRC)/etags.exe \
662 $(LIB_SRC)/hexl.exe \
663 $(LIB_SRC)/i.exe \
664 $(LIB_SRC)/winclient.exe \
665 $(LIB_SRC)/make-docfile.exe \
666 $(LIB_SRC)/mmencode.exe \
667 $(LIB_SRC)/movemail.exe \
668 $(LIB_SRC)/sorted-doc.exe \
669 $(LIB_SRC)/wakeup.exe
670 !if $(USE_MINITAR)
671 LIB_SRC_TOOLS = \
672 $(LIB_SRC_TOOLS) \
673 $(LIB_SRC)/minitar.exe
674 !endif
675 !if $(USE_PORTABLE_DUMPER)
676 LIB_SRC_TOOLS = \
677 $(XEMACS_INCLUDES) \
678 $(LIB_SRC)/make-dump-id.exe \
679 $(LIB_SRC_TOOLS)
680 !endif
681
682 #------------------------------------------------------------------------------
683
684 # LASTFILE Library
685
686 !if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
687
688 LASTFILE=$(OUTDIR)\lastfile.lib
689 LASTFILE_SRC=$(SRC)
690 LASTFILE_FLAGS=$(CFLAGS) $(CPLUSPLUS_COMPILE_FLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
691 LASTFILE_OBJS= \
692 $(OUTDIR)\lastfile.obj
693
694 $(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
695 link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS)
696
697 $(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c
698 $(CCV) $(LASTFILE_FLAGS) $(LASTFILE_SRC)\$(@B).c
699
700 !endif
701
702 #------------------------------------------------------------------------------
703
704 !if $(HAVE_X_WINDOWS)
705
706 # LWLIB Library
707
708 LWLIB=$(OUTDIR)\lwlib.lib
709 LWLIB_FLAGS=$(CFLAGS) $(INCLUDES) $(DEFINES) \
710 -DNEED_ATHENA -DNEED_LUCID \
711 -D_WINDOWS -DMENUBARS_LUCID -DSCROLLBARS_LUCID -DDIALOGS_ATHENA \
712 -Fo$@ -c
713 LWLIB_OBJS= \
714 $(OUTDIR)\lwlib-utils.obj \
715 $(OUTDIR)\lwlib-Xaw.obj \
716 $(OUTDIR)\lwlib-Xlw.obj \
717 $(OUTDIR)\lwlib.obj \
718 $(OUTDIR)\xlwmenu.obj \
719 $(OUTDIR)\xlwscrollbar.obj
720
721 $(LWLIB): $(LWLIB_OBJS)
722 link.exe -lib -nologo -out:$@ $(LWLIB_OBJS)
723
724 $(OUTDIR)\lwlib-utils.obj: $(LWLIB_SRCDIR)\lwlib-utils.c
725 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
726
727 $(OUTDIR)\lwlib-Xaw.obj: $(LWLIB_SRCDIR)\lwlib-Xaw.c
728 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
729
730 $(OUTDIR)\lwlib-Xlw.obj: $(LWLIB_SRCDIR)\lwlib-Xlw.c
731 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
732
733 $(OUTDIR)\lwlib.obj: $(LWLIB_SRCDIR)\lwlib.c
734 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
735
736 $(OUTDIR)\xlwmenu.obj: $(LWLIB_SRCDIR)\xlwmenu.c
737 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
738
739 $(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRCDIR)\xlwscrollbar.c
740 $(CCV) $(LWLIB_FLAGS) $(LWLIB_SRCDIR)\$(@B).c
741
742 !endif
743
744 #------------------------------------------------------------------------------
745
746 # TEMACS Executable
747
748 # This may not exist
749 !if "$(emacs_beta_version)" != ""
750 !if "$(emacs_is_beta)" != ""
751 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
752 !else
753 EMACS_PATCH_LEVEL=-DEMACS_PATCH_LEVEL=$(emacs_beta_version)
754 !endif
755 !endif
756
757 !if !$(USE_PORTABLE_DUMPER)
758 TEMACS_ENTRYPOINT=-entry:_start
759 !else
760 TEMACS_ENTRYPOINT=-entry:mainCRTStartup
761 !endif
762
763 TEMACS_DIR=$(SRC)
764 TEMACS=$(TEMACS_DIR)\temacs.exe
765 TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc
766 TEMACS_SRC=$(SRC)
767 TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \
768 oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
769 shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
770 mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
771 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) -base:0x1000000\
772 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\
773 -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
774 -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
775 TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(CPLUSPLUS_COMPILE_FLAGS) \
776 $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
777 -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
778 -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
779 $(EMACS_BETA_VERSION) \
780 $(EMACS_PATCH_LEVEL) \
781 -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
782 -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
783 -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
784 TEMACS_CPP_FLAGS=$(CFLAGS) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
785 TEMACS_CPP_CDECL_FLAGS=$(CFLAGS_CDECL) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
786
787 !if $(HAVE_X_WINDOWS)
788 TEMACS_X_OBJS=\
789 $(OUTDIR)\balloon-x.obj \
790 $(OUTDIR)\balloon_help.obj \
791 $(OUTDIR)\console-x.obj \
792 $(OUTDIR)\device-x.obj \
793 $(OUTDIR)\dialog-x.obj \
794 $(OUTDIR)\EmacsFrame.obj \
795 $(OUTDIR)\EmacsManager.obj \
796 $(OUTDIR)\EmacsShell.obj \
797 $(OUTDIR)\TopLevelEmacsShell.obj\
798 $(OUTDIR)\TransientEmacsShell.obj\
799 $(OUTDIR)\event-Xt.obj \
800 $(OUTDIR)\frame-x.obj \
801 $(OUTDIR)\glyphs-x.obj \
802 $(OUTDIR)\gui-x.obj \
803 $(OUTDIR)\menubar-x.obj \
804 $(OUTDIR)\objects-x.obj \
805 $(OUTDIR)\redisplay-x.obj \
806 $(OUTDIR)\scrollbar-x.obj \
807 $(OUTDIR)\xgccache.obj \
808 $(OUTDIR)\xmu.obj \
809 $(OUTDIR)\select-x.obj
810 !endif
811
812 !if $(HAVE_MS_WINDOWS)
813 TEMACS_MSW_OBJS=\ 446 TEMACS_MSW_OBJS=\
814 $(OUTDIR)\console-msw.obj \ 447 $(OUTDIR)\console-msw.obj \
815 $(OUTDIR)\device-msw.obj \ 448 $(OUTDIR)\device-msw.obj \
816 $(OUTDIR)\event-msw.obj \ 449 $(OUTDIR)\event-msw.obj \
817 $(OUTDIR)\frame-msw.obj \ 450 $(OUTDIR)\frame-msw.obj \
824 $(MSW_MENUBAR_OBJ) \ 457 $(MSW_MENUBAR_OBJ) \
825 $(MSW_SCROLLBAR_OBJ) \ 458 $(MSW_SCROLLBAR_OBJ) \
826 $(MSW_TOOLBAR_OBJ) \ 459 $(MSW_TOOLBAR_OBJ) \
827 $(MSW_DIALOG_OBJ) \ 460 $(MSW_DIALOG_OBJ) \
828 $(MSW_GIF_OBJ) 461 $(MSW_GIF_OBJ)
462
463 # end !if $(HAVE_MS_WINDOWS)
829 !endif 464 !endif
830 465
831 !if $(MULE) 466 !if $(MULE)
467 MULE_DEFINES=-DMULE
832 TEMACS_MULE_OBJS=\ 468 TEMACS_MULE_OBJS=\
833 $(OUTDIR)\mule-ccl.obj \ 469 $(OUTDIR)\mule-ccl.obj \
834 $(OUTDIR)\mule-charset.obj \ 470 $(OUTDIR)\mule-charset.obj \
835 $(OUTDIR)\mule-coding.obj 471 $(OUTDIR)\mule-coding.obj
836 472 !endif
837 ! if $(HAVE_X_WINDOWS) 473
838 TEMACS_MULE_OBJS=\ 474 !if $(DEBUG_XEMACS)
839 $(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj 475 TEMACS_DEBUG_OBJS=$(OUTDIR)\debug.obj $(OUTDIR)\tests.obj
476 !endif
477
478 !if $(QUICK_BUILD)
479 QUICK_DEFINES=-DQUICK_BUILD
480 !endif
481
482 !if $(ERROR_CHECK_ALL)
483 ERROR_CHECK_DEFINES=-DERROR_CHECK_ALL
484 !endif
485
486 !if $(USE_UNION_TYPE)
487 UNION_DEFINES=-DUSE_UNION_TYPE
488 !endif
489
490 !if $(USE_PORTABLE_DUMPER)
491 DUMPER_DEFINES=-DPDUMP
492 TEMACS_DUMP_OBJS=$(OUTDIR)\dumper.obj
493 !else
494 TEMACS_DUMP_OBJS=$(OUTDIR)\unexnt.obj
495 !endif
496
497 !if $(USE_KKCC)
498 KKCC_DEFINES=-DUSE_KKCC
499 !endif
500
501 !if $(USE_SYSTEM_MALLOC)
502 MALLOC_DEFINES=-DSYSTEM_MALLOC
503 !else
504 MALLOC_DEFINES=-DGNU_MALLOC
505 TEMACS_ALLOC_OBJS=$(OUTDIR)\free-hook.obj $(OUTDIR)\gmalloc.obj \
506 $(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj
507 !endif
508
509 ########################### Process options related to compilation.
510
511 #
512 # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
513 #
514 !if $(VERBOSECC)
515 CCV=$(CC)
516 !else
517 CCV=@$(CC)
518 !endif
519
520 !if $(DEBUG_XEMACS)
521
522 # ---- Debugging support ----
523 ! if $(HAVE_VC6)
524 # support edit-and-continue
525 DEBUG_FLAGS_COMPILE=-ZI
526 ! else
527 DEBUG_FLAGS_COMPILE=-Zi
840 ! endif 528 ! endif
841 !endif 529 DEBUG_FLAGS_LINK=-debug:full
842 530 DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
843 !if $(DEBUG_XEMACS) 531 #BROWSERFLAGS=-Fr -Fd$(OUTDIR)\temacs.pdb
844 TEMACS_DEBUG_OBJS=\ 532 BROWSERFLAGS=-Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
845 $(OUTDIR)\debug.obj \ 533
846 $(OUTDIR)\tests.obj 534 !else
847 !endif 535
848 536 # ---- No debugging support ----
849 !if !$(USE_SYSTEM_MALLOC) 537 DEBUG_FLAGS_COMPILE=
850 TEMACS_ALLOC_OBJS=\ 538 DEBUG_FLAGS_LINK=-incremental:no
851 $(OUTDIR)\free-hook.obj \ 539 DEBUG_DEFINES=
852 $(OUTDIR)\gmalloc.obj \ 540 BROWSERFLAGS=
853 $(OUTDIR)\ntheap.obj \ 541
854 $(OUTDIR)\vm-limit.obj 542 !endif
855 !endif 543
856 544 !if $(USE_CRTDLL)
857 !if !$(USE_PORTABLE_DUMPER) 545 ! if $(DEBUG_XEMACS)
858 TEMACS_DUMP_OBJS=\ 546 C_LIBFLAG=-MDd
859 $(OUTDIR)\unexnt.obj 547 LIBC_LIB=msvcrtd.lib
860 !else 548 ! else
861 TEMACS_DUMP_OBJS=\ 549 C_LIBFLAG=-MD
862 $(OUTDIR)\dumper.obj 550 LIBC_LIB=msvcrt.lib
863 !endif 551 ! endif
552 !else
553 C_LIBFLAG=-ML
554 LIBC_LIB=libc.lib
555 !endif
556
557 !if $(OPTIMIZED_BUILD)
558 # -G5 means optimize for Pentium. (According to the code-optimization
559 # article, -GB is the same as -G5, and -G6, i.e. optimze for Pentium Pro,
560 # gains you little over -G5 for PPro's but causes big slowdowns for
561 # Pentiums.) -GF means put strings in read-only memory; -Gr means use
562 # fastcall convention. Another possible addition: -Ob2 -- allows inlining
563 # of any function, not just those declared inline. Potential code size
564 # increase, though.
565 #
566 # #### Note: fastcall doesn't actually seem to make any difference, at least
567 # not using the (admittedly unscientific) test of (hanoi 6). The
568 # optimization article claims 1-2% improvement in both speed and size.
569 OPTFLAGS_FASTCALL =-O2 -G5 -Gr -Ob2
570 OPTFLAGS_CDECL =-O2 -G5 -Ob2
571 !else
572 OPTFLAGS_FASTCALL =-Od
573 OPTFLAGS_CDECL =-Od
574 !endif
575
576 !if $(USE_FASTCALL)
577 OPTFLAGS = $(OPTFLAGS_FASTCALL)
578 !else
579 OPTFLAGS = $(OPTFLAGS_CDECL)
580 !endif
581
582 !if $(PROFILE_SUPPORT)
583 PROFILE_FLAGS=-profile
584 !else
585 PROFILE_FLAGS=
586 !endif
587
588 !if $(CPLUSPLUS_COMPILE)
589 CPLUSPLUS_COMPILE_FLAGS=-TP
590 !else
591 CPLUSPLUS_COMPILE_FLAGS=
592 !endif
593
594 ########################### Determine generic includes/defines/flags.
595
596 INCLUDES=$(MSW_INCLUDES) -I$(NT)\inc -I$(SRC)
597
598 DEFINES=$(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
599 $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MALLOC_DEFINES) \
600 $(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) $(DEBUG_DEFINES) \
601 -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
602 -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
603
604 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
605
606 CFLAGS_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS)
607 CFLAGS=$(CFLAGS_NO_LIB) $(C_LIBFLAG)
608
609 CFLAGS_CDECL_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS_CDECL)
610 CFLAGS_CDECL=$(CFLAGS_CDECL_NO_LIB) $(C_LIBFLAG)
611
612 ########################### Determine flags for XEmacs object files.
613
614 # This may not exist
615 !if "$(emacs_beta_version)" != ""
616 !if "$(emacs_is_beta)" != ""
617 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
618 !else
619 EMACS_PATCH_LEVEL=-DEMACS_PATCH_LEVEL=$(emacs_beta_version)
620 !endif
621 !endif
622
623 TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(CPLUSPLUS_COMPILE_FLAGS) \
624 $(INCLUDES) $(DEFINES) \
625 -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
626 -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
627 $(EMACS_BETA_VERSION) $(EMACS_PATCH_LEVEL) \
628 -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
629 -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
630 -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
631 TEMACS_CPP_FLAGS=$(CFLAGS) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
632 TEMACS_CPP_CDECL_FLAGS=$(CFLAGS_CDECL) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
633
634 ########################### Determine XEmacs object files.
864 635
865 TEMACS_OBJS= \ 636 TEMACS_OBJS= \
866 $(TEMACS_X_OBJS)\
867 $(TEMACS_MSW_OBJS)\ 637 $(TEMACS_MSW_OBJS)\
868 $(TEMACS_CODING_OBJS)\
869 $(TEMACS_MULE_OBJS)\ 638 $(TEMACS_MULE_OBJS)\
870 $(TEMACS_DEBUG_OBJS)\ 639 $(TEMACS_DEBUG_OBJS)\
871 $(TEMACS_ALLOC_OBJS)\ 640 $(TEMACS_ALLOC_OBJS)\
872 $(TEMACS_DUMP_OBJS)\ 641 $(TEMACS_DUMP_OBJS)\
873 $(OUTDIR)\abbrev.obj \ 642 $(OUTDIR)\abbrev.obj \
960 $(OUTDIR)\unicode.obj \ 729 $(OUTDIR)\unicode.obj \
961 $(OUTDIR)\widget.obj \ 730 $(OUTDIR)\widget.obj \
962 $(OUTDIR)\window.obj \ 731 $(OUTDIR)\window.obj \
963 $(OUTDIR)\win32.obj 732 $(OUTDIR)\win32.obj
964 733
734 #########################################################################
735 ## Implicit rules ##
736 #########################################################################
737
965 # Rules 738 # Rules
966 739
967 .SUFFIXES: 740 .SUFFIXES:
968 .SUFFIXES: .c .obj .texi .info 741 .SUFFIXES: .c .obj .texi .info
969 742
970 # nmake rule with batching: 743 # nmake rule with batching:
971 #{$(TEMACS_SRC)}.c{$(OUTDIR)}.obj: 744 #{$(SRC)}.c{$(OUTDIR)}.obj:
972 # echo $< >> $(OUTDIR)\listfile.tmp 745 # echo $< >> $(OUTDIR)\listfile.tmp
973 746
974 {$(TEMACS_SRC)}.c{$(OUTDIR)}.obj: 747 {$(SRC)}.c{$(OUTDIR)}.obj:
975 $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ $(BROWSERFLAGS) 748 $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ $(BROWSERFLAGS)
976 749
750 #########################################################################
751 ## Subsidiary dependency rules ##
752 #########################################################################
753
754 ###################### Include auto-generated dependencies.
755
756 #
757 # Whether to use dependency information generated by make-src-depend
758 #
759 !if $(DEPEND) && exist("$(SRC)\depend")
760 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
761 ! endif
762 # This perl script used to be inline but that caused too many quoting problems
763 ! if [perl $(NT)\make-nt-depend -s=$(SRC) -c=$(NT) -o=$(OUTDIR) < $(SRC)\depend > $(OUTDIR)\depend.tmp]
764 ! endif
765 ! include "$(OUTDIR)\depend.tmp"
766 !else
767 ! if [echo WARNING: Compiling without dependency information.]
768 ! endif
769 !endif
770
771 ###################### Build the output directory structure if not same as
772 ###################### source.
773
774 !if $(SEPARATE_BUILD)
775 # #### `if not exist' does not like the quotes around file names.
776 # But what if one of them has spaces? Fucking Microsoft!
777 ! if [if not exist $(BLDROOT)\nul mkdir "$(BLDROOT)"]
778 ! endif
779 ! if [if not exist $(BLDLIB_SRC)\nul mkdir "$(BLDLIB_SRC)"]
780 ! endif
781 ! if [if not exist $(BLDNT)\nul mkdir "$(BLDNT)"]
782 ! endif
783 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
784 ! endif
785 ! if [if not exist $(BLDSRC)\nul mkdir "$(BLDSRC)"]
786 ! endif
787 # No point.
788 # ! if [if not exist "$(BLDROOT)\nul" mkdir "$(BLDROOT)"]
789 # ! endif
790 !endif
791
792 ###################### Random .obj dependencies
793
977 # An explicit rule looks like this ($< works only in implicit rules): 794 # An explicit rule looks like this ($< works only in implicit rules):
978 # $(OUTDIR)\foo.obj: $(TEMACS_SRC)\foo.c 795 # $(OUTDIR)\foo.obj: $(SRC)\foo.c
979 # $(CCV) $(TEMACS_CPP_FLAGS) $(TEMACS_SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS) 796 # $(CCV) $(TEMACS_CPP_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
980 797
981 $(OUTDIR)\emacs.obj: $(XEMACS)\version.sh 798 $(OUTDIR)\emacs.obj: $(SRCROOT)\version.sh
982 799
983 $(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c 800 $(OUTDIR)\libinterface.obj: $(SRC)\libinterface.c
984 $(CCV) $(TEMACS_CPP_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(TEMACS_SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS) 801 $(CCV) $(TEMACS_CPP_CDECL_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
985 802
986 $(OUTDIR)\TransientEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c 803 ###################### Generated source files
987 $(CCV) $(TEMACS_CPP_FLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL $(TEMACS_SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS) 804
988 805 $(OUTDIR)\nul:
989 $(OUTDIR)\libinterface.obj: $(TEMACS_SRC)\libinterface.c 806 -@mkdir $(OUTDIR)
990 $(CCV) $(TEMACS_CPP_CDECL_FLAGS) $(TEMACS_SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS) 807
991 808 XEMACS_INCLUDES=\
992 #$(TEMACS_SRC)\Emacs.ad.h: $(XEMACS)\etc\Emacs.ad 809 $(SRC)\config.h \
993 # !"sed -f ad2c.sed < $(XEMACS)\etc\Emacs.ad > $(TEMACS_SRC)\Emacs.ad.h" 810 $(SRC)\Emacs.ad.h \
994 811 $(SRC)\paths.h
995 #$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in 812
996 # !"cd $(TEMACS_SRC); cp paths.h.in paths.h" 813 # #### Copying is cheap, we should just force these
997 814 $(SRC)\config.h: $(SRC)\config.h.in
998 create-list-file: 815 # #### ms must have hired monkeys to design their shell commands. if
999 @if exist $(OUTDIR)\listfile.tmp del $(OUTDIR)\listfile.tmp 816 # #### you use xcopy to copy a file from one name to another, it
1000 817 # #### PROMPTS you to see if you meant the second as a directory! and
1001 compile-list-file: 818 # #### no switch to mean "no of course, you idiots, it's a file!"
1002 cd $(OUTDIR) 819 @copy $(SRC)\config.h.in $(SRC)\config.h
1003 @if exist listfile.tmp $(CC) $(TEMACS_CPP_FLAGS) @listfile.tmp $(BROWSERFLAGS) 820
1004 821 #$(SRC)\Emacs.ad.h: $(SRCROOT)\etc\Emacs.ad
1005 $(TEMACS_BROWSE): $(TEMACS_OBJS) 822 # !"sed -f ad2c.sed < $(SRCROOT)\etc\Emacs.ad > $(SRC)\Emacs.ad.h"
1006 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp 823
1007 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp 824 #$(SRC)\paths.h: $(SRC)\paths.h.in
1008 -$(DEL) $(OUTDIR)\bscmake.tmp 825 # !"cd $(SRC); cp paths.h.in paths.h"
1009 826
1010 # dump-id.c file that contains the dump id 827 $(SRC)\Emacs.ad.h: $(NT)\Emacs.ad.h
1011 828 set COPYCMD=/y
1012 $(OUTDIR)\dump-id.obj : $(SRC)\dump-id.c 829 @$(COPY) $(NT)\Emacs.ad.h $(SRC)
1013 cd $(OUTDIR) 830
1014 $(CCV) $(TEMACS_CPP_FLAGS) $(TEMACS_SRC)\$(@B).c $(BROWSERFLAGS) 831 $(SRC)\paths.h: $(NT)\paths.h
1015 832 set COPYCMD=/y
1016 $(SRC)\dump-id.c : $(LIB_SRC)/make-dump-id.exe $(TEMACS_OBJS) 833 @$(COPY) $(NT)\paths.h $(SRC)
1017 cd $(SRC) 834
1018 $(LIB_SRC)\make-dump-id.exe 835
1019 cd $(NT) 836 ###################### lastfile.lib
1020 837
838 !if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
839
840 LASTFILE=$(OUTDIR)\lastfile.lib
841 LASTFILE_SRC=$(SRC)
842 LASTFILE_FLAGS=$(CFLAGS) $(CPLUSPLUS_COMPILE_FLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
843 LASTFILE_OBJS= \
844 $(OUTDIR)\lastfile.obj
845
846 $(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
847 link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS)
848
849 $(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c
850 $(CCV) $(LASTFILE_FLAGS) $(LASTFILE_SRC)\$(@B).c
851
852 !endif
853
854 ###################### lib-src programs
855
856 LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32_NATIVE
857
858 #
859 # Creating config.values to be used by config.el
860 #
861 CONFIG_VALUES = $(BLDLIB_SRC)\config.values
862 !if [echo Creating $(CONFIG_VALUES) && echo ;;; Do not edit this file!>$(CONFIG_VALUES)]
863 !endif
864 !if [echo blddir>>$(CONFIG_VALUES) && echo "$(BLDROOT:\=\\)">>$(CONFIG_VALUES)]
865 !endif
866 !if [echo srcdir>>$(CONFIG_VALUES) && echo "$(SRCROOT:\=\\)">>$(CONFIG_VALUES)]
867 !endif
868 !if [echo CC>>$(CONFIG_VALUES) && echo "$(CC:\=\\)">>$(CONFIG_VALUES)]
869 !endif
870 !if [echo CFLAGS>>$(CONFIG_VALUES) && echo "$(CFLAGS:\=\\)">>$(CONFIG_VALUES)]
871 !endif
872 !if [echo CPP>>$(CONFIG_VALUES) && echo "$(CPP:\=\\)">>$(CONFIG_VALUES)]
873 !endif
874 !if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo "$(CPPFLAGS:\=\\)">>$(CONFIG_VALUES)]
875 !endif
876 !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "\\$(LISP:\=\\)">>$(CONFIG_VALUES)]
877 !endif
878 # PATH_PACKAGEPATH is already a quoted string.
879 !if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
880 !endif
881
882 LINK_DEPENDENCY_ARGS = -Fe$@ -Fd$* $** -link $(DEBUG_FLAGS_LINK)
883 LINK_STANDARD_LIBRARY_ARGS = setargv.obj user32.lib wsock32.lib
884
885 # Inferred rule
886 {$(LIB_SRC)}.c{$(BLDLIB_SRC)}.exe :
887 $(CCV) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES) $(CFLAGS) $(LINK_DEPENDENCY_ARGS) $(LINK_STANDARD_LIBRARY_ARGS)
888
889 # Individual dependencies
890 ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(SRC)/regex.c
891 $(BLDLIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
892 $(CCV) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES) $(CFLAGS) $(LINK_DEPENDENCY_ARGS) -stack:0x800000 $(LINK_STANDARD_LIBRARY_ARGS)
893
894 $(BLDLIB_SRC)/movemail.exe : $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
895
896 # Minitar uses zlib so just use cdecl to simplify things
897 $(BLDLIB_SRC)/minitar.exe : $(NT)/minitar.c
898 $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
899
900 LIB_SRC_TOOLS = \
901 $(BLDLIB_SRC)/etags.exe \
902 $(BLDLIB_SRC)/hexl.exe \
903 $(BLDLIB_SRC)/i.exe \
904 $(BLDLIB_SRC)/winclient.exe \
905 $(BLDLIB_SRC)/make-docfile.exe \
906 $(BLDLIB_SRC)/mmencode.exe \
907 $(BLDLIB_SRC)/movemail.exe \
908 $(BLDLIB_SRC)/sorted-doc.exe \
909 $(BLDLIB_SRC)/wakeup.exe
910 !if $(USE_MINITAR)
911 LIB_SRC_TOOLS = \
912 $(LIB_SRC_TOOLS) \
913 $(BLDLIB_SRC)/minitar.exe
914 !endif
1021 !if $(USE_PORTABLE_DUMPER) 915 !if $(USE_PORTABLE_DUMPER)
1022 TEMACS_DUMP_ID_OBJ = $(OUTDIR)\dump-id.obj 916 LIB_SRC_TOOLS = \
1023 !else 917 $(XEMACS_INCLUDES) \
1024 TEMACS_DUMP_ID_OBJ = 918 $(BLDLIB_SRC)/make-dump-id.exe \
1025 !endif 919 $(LIB_SRC_TOOLS)
1026 920 !endif
1027 !if $(DEBUG_XEMACS) 921
1028 $(TEMACS): $(TEMACS_OBJS) $(OUTDIR)\temacs.res $(TEMACS_BROWSE) $(TEMACS_DUMP_ID_OBJ) 922 ###################### Building the info files
1029 !else
1030 $(TEMACS): $(TEMACS_OBJS) $(OUTDIR)\temacs.res $(TEMACS_DUMP_ID_OBJ)
1031 !endif
1032 !if $(USE_PORTABLE_DUMPER)
1033 cd $(NT)
1034 link.exe @<<
1035 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_LIBS) $(TEMACS_DUMP_ID_OBJ)
1036 <<
1037 !else
1038 link.exe @<<
1039 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(OUTDIR)\temacs.res $(TEMACS_LIBS)
1040 <<
1041 !endif
1042
1043 $(OUTDIR)\temacs.res: $(NT)\xemacs.rc
1044 cd $(NT)
1045 rc -Fo$@ xemacs.rc
1046
1047
1048 PROGNAME = $(TEMACS_DIR)\xemacs.exe
1049 DO_TEMACS = "$(LIB_SRC)\i" "$(TEMACS)"
1050 DO_XEMACS = "$(LIB_SRC)\i" "$(PROGNAME)"
1051
1052 BATCH = -no-packages -batch
1053 BATCH_PACKAGES = -vanilla -batch
1054 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
1055 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
1056 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
1057 temacs_loadup_args = -l $(LISP)/loadup.el
1058 dump_temacs_args = $(temacs_loadup_args) dump
1059 run_temacs_args = $(temacs_loadup_args) run-temacs
1060 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
1061
1062 # Section handling automated tests starts here
1063
1064 ## We have automated tests!!
1065 testdir = ../tests/automated
1066 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
1067
1068 # .PHONY: check check-temacs
1069
1070 check:
1071 cd $(TEMACS_DIR)
1072 $(DO_XEMACS) $(batch_test_emacs)
1073
1074 check-temacs:
1075 cd $(TEMACS_DIR)
1076 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
1077
1078 check-features: all
1079 cd $(TEMACS_DIR)
1080 $(XEMACS_BATCH) -l check-features.el
1081
1082 # Section handling automated tests ends here
1083
1084 # Section handling tags starts here
1085
1086 tagslisp=lisp
1087
1088 tags:
1089 @echo If you don't have a copy of etags around, then do 'make lib-src' first.
1090 @echo To make use of the tags file, put the following in your .emacs:
1091 @echo (setq tag-table-alist
1092 @echo '(("$(XEMACSDIRSTRING)\\" . "$(XEMACSDIRSTRING)\\")))
1093 cd $(XEMACS)
1094 -$(DEL) TAGS
1095 set PATH=lib-src;%PATH%
1096 # we need to double ^, but only in one place, because (according to the
1097 # nmake manual), a ^ is used to quote certain special characters such as
1098 # backslash, but is treated literally within double quotes -- and notice
1099 # carefully the occurrences of double quotes in the first line below!
1100 etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
1101 etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(tagslisp)\*.el $(tagslisp)\mule\*.el
1102
1103 # Section handling tags ends here
1104
1105 # Section handling info starts here
1106 923
1107 !if !defined(MAKEINFO) 924 !if !defined(MAKEINFO)
1108 MAKEINFO=$(XEMACS_BATCH_PACKAGES) -l texinfmt -f batch-texinfo-format 925 MAKEINFO=$(XEMACS_BATCH_PACKAGES) -l texinfmt -f batch-texinfo-format
1109 !endif 926 !endif
1110 927
1111 MANDIR = $(XEMACS)\man 928 MANDIR = $(SRCROOT)\man
1112 INFODIR = $(XEMACS)\info 929 INFODIR = $(SRCROOT)\info
1113 INFO_FILES= \ 930 INFO_FILES= \
1114 $(INFODIR)\cl.info \ 931 $(INFODIR)\cl.info \
1115 $(INFODIR)\custom.info \ 932 $(INFODIR)\custom.info \
1116 $(INFODIR)\emodules.info \ 933 $(INFODIR)\emodules.info \
1117 $(INFODIR)\external-widget.info \ 934 $(INFODIR)\external-widget.info \
1260 $(MANDIR)\new-users-guide\xmenu.texi 1077 $(MANDIR)\new-users-guide\xmenu.texi
1261 1078
1262 $(INFODIR)\xemacs.info: $(XEMACS_SRCS) 1079 $(INFODIR)\xemacs.info: $(XEMACS_SRCS)
1263 cd $(MANDIR)\xemacs 1080 cd $(MANDIR)\xemacs
1264 $(MAKEINFO) xemacs.texi 1081 $(MAKEINFO) xemacs.texi
1265 cd ..
1266 1082
1267 1083
1268 $(INFODIR)\lispref.info: $(LISPREF_SRCS) 1084 $(INFODIR)\lispref.info: $(LISPREF_SRCS)
1269 cd $(MANDIR)\lispref 1085 cd $(MANDIR)\lispref
1270 $(MAKEINFO) lispref.texi 1086 $(MAKEINFO) lispref.texi
1271 cd ..
1272 1087
1273 $(INFODIR)\internals.info: $(INTERNALS_SRCS) 1088 $(INFODIR)\internals.info: $(INTERNALS_SRCS)
1274 cd $(MANDIR)\internals 1089 cd $(MANDIR)\internals
1275 $(MAKEINFO) internals.texi 1090 $(MAKEINFO) internals.texi
1276 cd ..
1277 1091
1278 $(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS) 1092 $(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS)
1279 cd $(MANDIR)\new-users-guide 1093 cd $(MANDIR)\new-users-guide
1280 $(MAKEINFO) new-users-guide.texi 1094 $(MAKEINFO) new-users-guide.texi
1281 cd ..
1282 1095
1283 info: makeinfo-test $(INFO_FILES) 1096 info: makeinfo-test $(INFO_FILES)
1284 1097
1285 makeinfo-test: 1098 makeinfo-test:
1286 @<<makeinfo_test.bat 1099 @<<makeinfo_test.bat
1295 @echo as this will build the info docs much faster than XEmacs using 'texinfo'. 1108 @echo as this will build the info docs much faster than XEmacs using 'texinfo'.
1296 @if errorlevel 1 exit 1 1109 @if errorlevel 1 exit 1
1297 :test_done 1110 :test_done
1298 <<NOKEEP 1111 <<NOKEEP
1299 1112
1300 # Section handling info ends here 1113 ########################### Create the Installation file
1301 1114
1302 #------------------------------------------------------------------------------ 1115 $(BLDROOT)\Installation:: installation
1116
1117 installation::
1118 @echo OS version:>$(BLDROOT)\Installation
1119 @ver >> $(BLDROOT)\Installation
1120 @type >> $(BLDROOT)\Installation <<
1121 !if defined(OS)
1122 OS: $(OS)
1123 !endif
1124
1125 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=) $(xemacs_extra_name:"=) configured for '$(EMACS_CONFIGURATION)'.
1126
1127 Building XEmacs using "$(MAKE:\=\\)".
1128 Building XEmacs using make flags "$(MAKEFLAGS)".
1129 Building XEmacs in source tree "$(SRCROOT:\=\\)".
1130 !if $(SEPARATE_BUILD)
1131 Building XEmacs into compiled tree "$(BLDROOT:\=\\)".
1132 !endif
1133 !if defined(CCV)
1134 Using compiler "$(CC) $(CFLAGS)".
1135 !endif
1136 !if $(CPLUSPLUS_COMPILE)
1137 Compiling as C++.
1138 !endif
1139 Installing XEmacs in "$(INSTALL_DIR:\=\\)".
1140 Package path is $(PATH_PACKAGEPATH).
1141 !if $(INFODOCK)
1142 Building InfoDock.
1143 !endif
1144 !if $(HAVE_MS_WINDOWS)
1145 Compiling in support for Microsoft Windows native GUI.
1146 !endif
1147 !if $(MULE)
1148 Compiling in international (MULE) support.
1149 !endif
1150 !if $(HAVE_GTK)
1151 --------------------------------------------------------------------
1152 NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
1153 NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
1154 NOTE: Yes, we know that gtk has been ported to native MS Windows, but
1155 NOTE: XEmacs is not yet ready to use that port.
1156 --------------------------------------------------------------------
1157 !endif
1158 !if $(HAVE_XPM)
1159 Compiling in support for XPM images.
1160 !else
1161 --------------------------------------------------------------------
1162 NOTE: Compiling without XPM support.
1163 NOTE: You should strongly consider installing XPM.
1164 NOTE: Otherwise toolbars and other graphics will look suboptimal.
1165 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)
1166 --------------------------------------------------------------------
1167 !endif
1168 !if $(HAVE_GIF)
1169 Compiling in support for GIF images.
1170 !endif
1171 !if $(HAVE_PNG)
1172 Compiling in support for PNG images.
1173 !else
1174 --------------------------------------------------------------------
1175 NOTE: Compiling without PNG image support.
1176 NOTE: You should strongly consider installing the PNG libraries.
1177 NOTE: Otherwise certain images and glyphs may not display.
1178 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux
1179 --------------------------------------------------------------------
1180 !endif
1181 !if $(HAVE_TIFF)
1182 Compiling in support for TIFF images.
1183 !endif
1184 !if $(HAVE_JPEG)
1185 Compiling in support for JPEG images.
1186 !endif
1187 !if $(HAVE_XFACE)
1188 Compiling in support for X-Face message headers.
1189 !endif
1190 !if $(HAVE_ZLIB)
1191 Compiling in support for GZIP compression/decompression.
1192 !endif
1193 !if $(HAVE_TOOLBARS)
1194 Compiling in support for toolbars.
1195 !endif
1196 !if $(HAVE_DIALOGS)
1197 Compiling in support for dialogs.
1198 !endif
1199 !if $(HAVE_WIDGETS)
1200 Compiling in support for widgets.
1201 !endif
1202 !if $(HAVE_NATIVE_SOUND)
1203 Compiling in support for native sounds.
1204 !endif
1205 !if $(USE_UNION_TYPE)
1206 Using union type for Lisp object storage.
1207 NOTE: ---------------------------------------------------------
1208 NOTE: This tends to trigger compiler bugs, especially when combined
1209 NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently
1210 NOTE: been observed using Visual C++ in combination with union type,
1211 NOTE: MULE, and ERROR_CHECKING.
1212 NOTE: ---------------------------------------------------------
1213 !endif
1214 !if $(USE_PORTABLE_DUMPER)
1215 Using portable dumper.
1216 !endif
1217 !if $(USE_SYSTEM_MALLOC)
1218 Using system malloc.
1219 !endif
1220 !if $(USE_CRTDLL)
1221 Using DLL version of C runtime library.
1222 !endif
1223 !if $(ERROR_CHECK_ALL)
1224 Compiling in extra internal error-checking.
1225 NOTE: ---------------------------------------------------------
1226 NOTE: Compiling in support for runtime error-checking.
1227 NOTE: XEmacs will run noticeably more slowly as a result.
1228 NOTE: Error-checking is on by default for XEmacs beta releases.
1229 NOTE: ---------------------------------------------------------
1230 !endif
1231 !if $(DEBUG_XEMACS)
1232 Compiling in debugging support (no slowdown).
1233 !endif
1234 !if $(OPTIMIZED_BUILD)
1235 Compiling with optimization.
1236 !endif
1237 !if $(QUICK_BUILD)
1238 Disabling non-essential build actions. Use with care!
1239 !endif
1240 !if $(USE_KKCC)
1241 Using new experimental GC algorithms.
1242 !endif
1243 <<NOKEEP
1244 @echo --------------------------------------------------------------------
1245 @type $(BLDROOT)\Installation
1246 @echo --------------------------------------------------------------------
1247
1248 #########################################################################
1249 ## Primary rebuilding process ##
1250 #########################################################################
1251
1252 ########################### Definitions for linking temacs.exe
1253
1254 !if !$(USE_PORTABLE_DUMPER)
1255 TEMACS_ENTRYPOINT=-entry:_start
1256 !else
1257 TEMACS_ENTRYPOINT=-entry:mainCRTStartup
1258 !endif
1259
1260 TEMACS_BROWSE=$(BLDSRC)\temacs.bsc
1261 TEMACS_LIBS=$(LASTFILE) $(MSW_LIBS) \
1262 oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
1263 shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
1264 mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
1265 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) -base:0x1000000\
1266 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\
1267 -pdb:$(BLDSRC)\temacs.pdb -map:$(BLDSRC)\temacs.map \
1268 -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
1269
1270 ########################### Definitions for running temacs.exe/xemacs.exe
1271
1272 RAW_EXE=$(BLDSRC)\temacs.exe
1273 DUMP_TARGET = $(BLDSRC)\xemacs.exe
1274 DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)"
1275 DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)"
1276
1277 BATCH = -no-packages -batch
1278 BATCH_PACKAGES = -vanilla -batch
1279 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
1280 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
1281 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
1282 temacs_loadup_args = -l $(LISP)/loadup.el
1283 dump_temacs_args = $(temacs_loadup_args) dump
1284 run_temacs_args = $(temacs_loadup_args) run-temacs
1285 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
1286
1287 ########################### Build rules
1288
1289 # use this rule to build the complete system
1290 all: installation $(OUTDIR)\nul $(LASTFILE) \
1291 $(LIB_SRC_TOOLS) update-elc $(DUMP_TARGET) \
1292 update-elc-2 $(LISP)/finder-inf.el load-shadows info
1293
1294 $(TEMACS_BROWSE): $(TEMACS_OBJS)
1295 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp
1296 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp
1297 -$(DEL) $(OUTDIR)\bscmake.tmp
1298
1299 # dump-id.c file that contains the dump id
1300
1301 $(OUTDIR)\dump-id.obj : $(BLDSRC)\dump-id.c
1302 $(CCV) $(TEMACS_CPP_FLAGS) $(BLDSRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
1303
1304 $(BLDSRC)\dump-id.c : $(BLDLIB_SRC)/make-dump-id.exe $(TEMACS_OBJS)
1305 cd $(BLDSRC)
1306 $(BLDLIB_SRC)\make-dump-id.exe
1307
1308 $(OUTDIR)\temacs.res: $(NT)\xemacs.rc
1309 cd $(NT)
1310 rc -Fo$@ xemacs.rc
1311
1312 !if $(USE_PORTABLE_DUMPER)
1313 TEMACS_DUMP_DEP = $(OUTDIR)\dump-id.obj
1314 !else
1315 TEMACS_DUMP_DEP = $(OUTDIR)\temacs.res
1316 !endif
1317
1318 $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
1319 link.exe @<<
1320 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
1321 <<
1322
1323 !if $(DEBUG_XEMACS)
1324 $(RAW_EXE): $(TEMACS_BROWSE)
1325 !endif
1303 1326
1304 # Rebuild docfile target 1327 # Rebuild docfile target
1305 1328
1306 DOC=$(LIB_SRC)\DOC 1329 DOC=$(BLDLIB_SRC)\DOC
1307 1330
1308 docfile :: 1331 docfile ::
1309 if exist $(DOC) $(DEL) $(DOC) 1332 if exist $(DOC) $(DEL) $(DOC)
1310 docfile :: $(DOC) 1333 docfile :: $(DOC)
1311 1334
1312 $(DOC): $(LIB_SRC)\make-docfile.exe $(TEMACS_DIR)\NEEDTODUMP $(TEMACS_OBJS) 1335 # We need to write the QUICK_BUILD stuff as-is (and not just have no
1313 cd $(TEMACS_DIR) 1336 # dependencies for DOC) because DOC needs TEMACS_OBJS as dependencies to
1337 # get $(**) right. The `touch' is needed because of the way nmake
1338 # calculates dependencies; see comments in src/Makefile.in.in.
1339 $(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_OBJS)
1314 !if $(QUICK_BUILD) 1340 !if $(QUICK_BUILD)
1315 if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages @<< 1341 if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
1316 $(**) 1342 $(**)
1317 << 1343 <<
1318 !else 1344 -touch $(DOC)
1319 $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages @<< 1345 !else
1346 $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
1320 $(**) 1347 $(**)
1321 << 1348 <<
1322 !endif 1349 !endif
1323 1350
1324 update-elc: 1351 update-elc: $(RAW_EXE)
1325 cd $(TEMACS_DIR)
1326 $(TEMACS_BATCH) -l $(LISP)\update-elc.el 1352 $(TEMACS_BATCH) -l $(LISP)\update-elc.el
1353
1354 ## This file is touched by update-elc.el when redumping is necessary.
1355 $(BLDSRC)\NEEDTODUMP:
1356 @echo >$(BLDSRC)\NEEDTODUMP
1357
1358 !if $(USE_PORTABLE_DUMPER)
1359 $(DUMP_TARGET): $(NT)\xemacs.rc
1360 !endif
1361
1362 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
1363 # requirements have changed.
1364
1365 $(DUMP_TARGET): $(DOC) $(RAW_EXE) $(BLDSRC)\NEEDTODUMP
1366 $(TEMACS_BATCH) -l $(LISP)\loadup.el dump
1367 !if $(USE_PORTABLE_DUMPER)
1368 cd $(BLDSRC)
1369 rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
1370 # Make the resource section read/write since almost all of it is the dump
1371 # data which needs to be writable. This avoids having to copy it.
1372 link.exe @<<
1373 $(TEMACS_LFLAGS) -section:.rsrc,rw -out:$(BLDSRC)\xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
1374 <<
1375 -$(DEL) $(BLDSRC)\xemacs.dmp
1376 !endif
1327 1377
1328 ## Update out-of-date .elcs, other than needed for dumping. 1378 ## Update out-of-date .elcs, other than needed for dumping.
1329 update-elc-2: 1379 update-elc-2:
1330 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) 1380 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
1331 1381
1332 $(LISP)/finder-inf.el: 1382 $(LISP)/finder-inf.el:
1383 !if !$(QUICK_BUILD)
1333 @echo Building finder database ... 1384 @echo Building finder database ...
1334 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ 1385 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
1335 -l finder -f finder-compile-keywords 1386 -l finder -f finder-compile-keywords
1336 @echo Building finder database ...(done) 1387 @echo Building finder database ...(done)
1388 !endif
1337 1389
1338 load-shadows: 1390 load-shadows:
1339 !if !$(QUICK_BUILD) 1391 !if !$(QUICK_BUILD)
1340 @echo Testing for Lisp shadows ... 1392 @echo Testing for Lisp shadows ...
1341 @$(XEMACS_BATCH) -f list-load-path-shadows 1393 @$(XEMACS_BATCH) -f list-load-path-shadows
1342 !endif 1394 !endif
1343 1395
1344 ## This file is touched by update-elc.el when redumping is necessary. 1396 #########################################################################
1345 $(TEMACS_DIR)\NEEDTODUMP : 1397 ## Other random crap ##
1346 @echo >$(TEMACS_DIR)\NEEDTODUMP 1398 #########################################################################
1347 1399
1348 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE 1400 ########################### Automated tests
1349 # requirements have changed. 1401
1350 1402 testdir = ../tests/automated
1351 $(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP 1403 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
1352 cd $(TEMACS_DIR) 1404
1353 $(TEMACS_BATCH) -l $(LISP)\loadup.el dump 1405 check:
1354 !if $(USE_PORTABLE_DUMPER) 1406 cd $(BLDSRC)
1355 rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc 1407 $(DO_XEMACS) $(batch_test_emacs)
1356 # Make the resource section read/write since almost all of it is the dump 1408
1357 # data which needs to be writable. This avoids having to copy it. 1409 check-temacs:
1358 link.exe @<< 1410 cd $(BLDSRC)
1359 $(TEMACS_LFLAGS) -section:.rsrc,rw -out:xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj 1411 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
1360 << 1412
1361 -$(DEL) $(TEMACS_DIR)\xemacs.dmp 1413 check-features: all
1362 !endif 1414 cd $(BLDSRC)
1363 #------------------------------------------------------------------------------ 1415 $(XEMACS_BATCH) -l check-features.el
1364 1416
1365 # use this rule to build the complete system 1417
1366 all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ 1418 ########################### Rebuilding TAGS
1367 $(LIB_SRC_TOOLS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \ 1419
1368 update-elc-2 $(LISP)/finder-inf.el load-shadows info 1420 tags:
1369 1421 @echo If you do not have a copy of etags around, then do 'make lib-src' first.
1370 temacs: $(LASTFILE) $(TEMACS) 1422 @echo To make use of the tags file, put the following in your .emacs:
1423 @echo (setq tag-table-alist
1424 @echo '(("$(SRCROOT:\=\\)\\" . "$(SRCROOT:\=\\)\\")))
1425 cd $(SRCROOT)
1426 -$(DEL) TAGS
1427 set PATH=lib-src;%PATH%
1428 # we need to double ^, but only in one place, because (according to the
1429 # nmake manual), a ^ is used to quote certain special characters such as
1430 # backslash, but is treated literally within double quotes -- and notice
1431 # carefully the occurrences of double quotes in the first line below!
1432 etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
1433 etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(LISP)\*.el $(LISP)\mule\*.el
1434
1435 ########################### Install the system
1371 1436
1372 # use this rule to install the system 1437 # use this rule to install the system
1373 install: all 1438 install: all
1374 cd $(NT) 1439 cd $(NT)
1375 set COPYCMD=/y 1440 set COPYCMD=/y
1376 @echo Installing in $(INSTALL_DIR) ... 1441 @echo Installing in $(INSTALL_DIR) ...
1377 @echo PlaceHolder > PlaceHolder 1442 @echo PlaceHolder > PlaceHolder
1378 @$(COPY) PROBLEMS "$(INSTALL_DIR)\" 1443 @$(COPY) PROBLEMS "$(INSTALL_DIR)\"
1379 @$(COPY) PlaceHolder "$(INSTALL_DIR)\lock\" 1444 @$(COPY) PlaceHolder "$(INSTALL_DIR)\lock\"
1380 -$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder" 1445 -$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder"
1381 @$(COPY) $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" 1446 @$(COPY) $(BLDLIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
1382 @$(COPY) $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" 1447 @$(COPY) $(BLDLIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
1383 @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" 1448 @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
1384 @$(COPY) $(TEMACS_DIR)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" 1449 @$(COPY) $(BLDSRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
1385 @$(COPYDIR) $(XEMACS)\etc "$(INSTALL_DIR)\etc\" 1450 @$(COPYDIR) $(SRCROOT)\etc "$(INSTALL_DIR)\etc\"
1386 @$(COPYDIR) $(XEMACS)\info "$(INSTALL_DIR)\info\" 1451 @$(COPYDIR) $(SRCROOT)\info "$(INSTALL_DIR)\info\"
1387 @$(COPYDIR) $(XEMACS)\lisp "$(INSTALL_DIR)\lisp\" 1452 @$(COPYDIR) $(SRCROOT)\lisp "$(INSTALL_DIR)\lisp\"
1388 @echo Making skeleton package tree in $(PACKAGE_PREFIX) ... 1453 @echo Making skeleton package tree in $(PACKAGE_PREFIX) ...
1389 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\site-packages\" 1454 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\site-packages\"
1390 -$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder" 1455 -$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder"
1391 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\" 1456 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\"
1392 -$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder" 1457 -$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder"
1393 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\" 1458 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\"
1394 -$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder" 1459 -$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder"
1395 -$(DEL) PlaceHolder 1460 -$(DEL) PlaceHolder
1396 1461
1462 ########################### clean
1463
1397 mostlyclean: 1464 mostlyclean:
1398 -$(DEL) $(XEMACS)\Installation 1465 -$(DEL) $(BLDROOT)\Installation
1399 -$(DEL) $(OUTDIR)\*.lib 1466 -$(DEL) $(OUTDIR)\*.lib
1400 -$(DEL) $(OUTDIR)\*.obj 1467 -$(DEL) $(OUTDIR)\*.obj
1401 -$(DEL) $(OUTDIR)\*.pdb 1468 -$(DEL) $(OUTDIR)\*.pdb
1402 -$(DEL) $(OUTDIR)\*.res 1469 -$(DEL) $(OUTDIR)\*.res
1403 -$(DEL) $(OUTDIR)\*.sbr 1470 -$(DEL) $(OUTDIR)\*.sbr
1404 -$(DEL) $(TEMACS_DIR)\*.exe 1471 -$(DEL) $(BLDSRC)\*.exe
1405 -$(DEL) $(TEMACS_DIR)\*.map 1472 -$(DEL) $(BLDSRC)\*.dmp
1473 -$(DEL) $(BLDSRC)\*.map
1474 -$(DEL) $(BLDSRC)\*.pdb
1475 -$(DEL) $(BLDSRC)\NEEDTODUMP
1476 -$(DEL) $(BLDSRC)\dump-id.c
1406 -$(DEL) $(SRC)\*.bsc 1477 -$(DEL) $(SRC)\*.bsc
1407 -$(DEL) $(TEMACS_DIR)\*.pdb 1478 -$(DEL) $(BLDLIB_SRC)\*.exe
1408 -$(DEL) $(LIB_SRC)\*.exe 1479 -$(DEL) $(BLDLIB_SRC)\*.obj
1409 -$(DEL) $(LIB_SRC)\*.obj 1480 -$(DEL) $(BLDLIB_SRC)\*.pdb
1410 -$(DEL) $(LIB_SRC)\*.pdb 1481 -$(DEL) $(BLDLIB_SRC)\*.res
1411 -$(DEL) $(LIB_SRC)\*.res 1482
1483 versionclean:
1484 -$(DEL) $(BLDSRC)\xemacs.exe
1485 -$(DEL) $(BLDLIB_SRC)\DOC
1412 1486
1413 clean: mostlyclean versionclean 1487 clean: mostlyclean versionclean
1414 -$(DEL) $(XEMACS)\TAGS 1488 -$(DEL) $(SRCROOT)\TAGS
1489 -$(DEL) $(LISP)\auto-autoloads.el*
1490 -$(DEL) $(LISP)\mule\auto-autoloads.el*
1491 -$(DEL) $(LISP)\custom-load.el*
1492 -$(DEL) $(LISP)\mule\custom-load.el*
1415 1493
1416 nicenclean: clean 1494 nicenclean: clean
1417 -$(DEL) $(NT)\*.bak 1495 -$(DEL) $(NT)\*.bak
1418 -$(DEL) $(NT)\*.orig 1496 -$(DEL) $(NT)\*.orig
1419 -$(DEL) $(NT)\*.rej 1497 -$(DEL) $(NT)\*.rej
1441 -$(DEL) $(SRC)\Emacs.ad.h 1519 -$(DEL) $(SRC)\Emacs.ad.h
1442 1520
1443 ## This is used in making a distribution. 1521 ## This is used in making a distribution.
1444 ## Do not use it on development directories! 1522 ## Do not use it on development directories!
1445 distclean: nicenclean configclean 1523 distclean: nicenclean configclean
1446 -$(DEL) $(LIB_SRC)\$(CONFIG_VALUES) 1524 -$(DEL) $(BLDLIB_SRC)\$(CONFIG_VALUES)
1447 -$(DEL) $(INFODIR)\*.info* 1525 -$(DEL) $(INFODIR)\*.info*
1448 -$(DEL) $(LISP)\*.elc 1526 -$(DEL) $(LISP)\*.elc
1449 -$(DEL) $(LISP)\mule\*.elc 1527 -$(DEL) $(LISP)\mule\*.elc
1450 -$(DEL) $(LISP)\term\*.elc 1528 -$(DEL) $(LISP)\term\*.elc
1451 1529
1452 realclean: distclean 1530 realclean: distclean
1453
1454 versionclean:
1455 -$(DEL) $(TEMACS_DIR)\xemacs.exe
1456 -$(DEL) $(LIB_SRC)\DOC
1457 1531
1458 #not sure about those wildcards. DOS wildcards are stupid compared to Unix, 1532 #not sure about those wildcards. DOS wildcards are stupid compared to Unix,
1459 #and could end up deleting *everything* instead of just backup files or 1533 #and could end up deleting *everything* instead of just backup files or
1460 #whatever. So just leave it at "realclean" 1534 #whatever. So just leave it at "realclean"
1461 extraclean: realclean 1535 extraclean: realclean
1465 # -$(DEL) m\*~ 1539 # -$(DEL) m\*~
1466 # -$(DEL) m\#* 1540 # -$(DEL) m\#*
1467 # -$(DEL) s\*~ 1541 # -$(DEL) s\*~
1468 # -$(DEL) s\#* 1542 # -$(DEL) s\#*
1469 1543
1544 ########################### Rebuild source dependency file
1545
1470 depend: 1546 depend:
1471 cd $(SRC) 1547 cd $(SRC)
1472 perl ./make-src-depend > depend.tmp 1548 perl ./make-src-depend > depend.tmp
1473 perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')" 1549 perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
1474 1550
1551 ########################### Redo Unicode-Encapsulation
1552
1475 unicode-encapsulate: 1553 unicode-encapsulate:
1476 cd $(SRC) 1554 cd $(SRC)
1477 perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c 1555 perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c
1478 1556
1479 $(XEMACS)\Installation:: installation
1480
1481 installation::
1482 @echo OS version:>$(XEMACS)\Installation
1483 @ver >> $(XEMACS)\Installation
1484 @type >> $(XEMACS)\Installation <<
1485 !if defined(OS)
1486 OS: $(OS)
1487 !endif
1488
1489 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) $(xemacs_extra_name:"=) configured for `$(EMACS_CONFIGURATION)'.
1490
1491 Building XEmacs using "$(MAKE:\=\\)".
1492 Building XEmacs using make flags "$(MAKEFLAGS)".
1493 Building XEmacs in "$(MAKEDIR:\=\\)".
1494 !if defined(CCV)
1495 Using compiler "$(CC) $(CFLAGS)".
1496 !endif
1497 !if $(CPLUSPLUS_COMPILE)
1498 Compiling as C++.
1499 !endif
1500 Installing XEmacs in "$(INSTALL_DIR:\=\\)".
1501 Package path is $(PATH_PACKAGEPATH).
1502 !if $(INFODOCK)
1503 Building InfoDock.
1504 !endif
1505 !if $(HAVE_MS_WINDOWS)
1506 Compiling in support for Microsoft Windows native GUI.
1507 !endif
1508 !if $(HAVE_X_WINDOWS)
1509 Compiling in support for X Windows.
1510 !endif
1511 !if $(MULE)
1512 Compiling in international (MULE) support.
1513 !endif
1514 !if $(HAVE_GTK)
1515 --------------------------------------------------------------------
1516 NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
1517 NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
1518 NOTE: Yes, we know that gtk has been ported to native MS Windows, but
1519 NOTE: XEmacs is not yet ready to use that port.
1520 --------------------------------------------------------------------
1521 !endif
1522 !if $(HAVE_XPM)
1523 Compiling in support for XPM images.
1524 !else
1525 --------------------------------------------------------------------
1526 NOTE: Compiling without XPM support.
1527 NOTE: You should strongly consider installing XPM.
1528 NOTE: Otherwise toolbars and other graphics will look suboptimal.
1529 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)
1530 --------------------------------------------------------------------
1531 !endif
1532 !if $(HAVE_GIF)
1533 Compiling in support for GIF images.
1534 !endif
1535 !if $(HAVE_PNG)
1536 Compiling in support for PNG images.
1537 !else
1538 --------------------------------------------------------------------
1539 NOTE: Compiling without PNG image support.
1540 NOTE: You should strongly consider installing the PNG libraries.
1541 NOTE: Otherwise certain images and glyphs may not display.
1542 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux
1543 --------------------------------------------------------------------
1544 !endif
1545 !if $(HAVE_TIFF)
1546 Compiling in support for TIFF images.
1547 !endif
1548 !if $(HAVE_JPEG)
1549 Compiling in support for JPEG images.
1550 !endif
1551 !if $(HAVE_XFACE)
1552 Compiling in support for X-Face message headers.
1553 !endif
1554 !if $(HAVE_ZLIB)
1555 Compiling in support for GZIP compression/decompression.
1556 !endif
1557 !if $(HAVE_TOOLBARS)
1558 Compiling in support for toolbars.
1559 !endif
1560 !if $(HAVE_DIALOGS)
1561 Compiling in support for dialogs.
1562 !endif
1563 !if $(HAVE_WIDGETS)
1564 Compiling in support for widgets.
1565 !endif
1566 !if $(HAVE_NATIVE_SOUND)
1567 Compiling in support for native sounds.
1568 !endif
1569 !if $(USE_UNION_TYPE)
1570 Using union type for Lisp object storage.
1571 NOTE: ---------------------------------------------------------
1572 NOTE: This tends to trigger compiler bugs, especially when combined
1573 NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently
1574 NOTE: been observed using Visual C++ in combination with union type,
1575 NOTE: MULE, and ERROR_CHECKING.
1576 NOTE: ---------------------------------------------------------
1577 !endif
1578 !if $(USE_PORTABLE_DUMPER)
1579 Using portable dumper.
1580 !endif
1581 !if $(USE_SYSTEM_MALLOC)
1582 Using system malloc.
1583 !endif
1584 !if $(USE_CRTDLL)
1585 Using DLL version of C runtime library.
1586 !endif
1587 !if $(ERROR_CHECK_ALL)
1588 Compiling in extra internal error-checking.
1589 NOTE: ---------------------------------------------------------
1590 NOTE: Compiling in support for runtime error-checking.
1591 NOTE: XEmacs will run noticeably more slowly as a result.
1592 NOTE: Error-checking is on by default for XEmacs beta releases.
1593 NOTE: ---------------------------------------------------------
1594 !endif
1595 !if $(DEBUG_XEMACS)
1596 Compiling in debugging support (no slowdown).
1597 !endif
1598 !if $(OPTIMIZED_BUILD)
1599 Compiling with optimization.
1600 !endif
1601 !if $(QUICK_BUILD)
1602 Disabling non-essential build actions. Use with care!
1603 !endif
1604 !if $(USE_KKCC)
1605 Using new experimental GC algorithms.
1606 !endif
1607 <<NOKEEP
1608 @echo --------------------------------------------------------------------
1609 @type $(XEMACS)\Installation
1610 @echo --------------------------------------------------------------------
1611
1612 # DO NOT DELETE THIS LINE -- make depend depends on it.
1613