428
|
1 ## Makefile for src subdirectory in XEmacs.
|
|
2 ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
|
|
3 ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
|
|
4 ## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
|
|
5 ## Copyright (C) 1998, 1999 J. Kean Johnston.
|
1315
|
6 ## Copyright (C) 2001, 2002, 2003 Ben Wing.
|
428
|
7
|
|
8 ## This file is part of XEmacs.
|
|
9
|
|
10 ## XEmacs is free software; you can redistribute it and/or modify it
|
|
11 ## under the terms of the GNU General Public License as published by the
|
|
12 ## Free Software Foundation; either version 2, or (at your option) any
|
|
13 ## later version.
|
|
14
|
|
15 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
16 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
17 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
18 ## for more details.
|
|
19
|
|
20 ## You should have received a copy of the GNU General Public License
|
|
21 ## along with XEmacs; see the file COPYING. If not, write to
|
|
22 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
23 ## Boston, MA 02111-1307, USA.
|
|
24
|
|
25 ## Synched up with: Not synched with FSF.
|
|
26
|
1315
|
27 .PHONY: all
|
|
28 all: build-the-mofo
|
|
29
|
442
|
30 #define NOT_C_CODE
|
|
31 #include "config.h"
|
|
32
|
1330
|
33 ## Here are the things that we expect ../configure to edit.
|
428
|
34
|
|
35 #ifdef USE_GNU_MAKE
|
|
36 RECURSIVE_MAKE=$(MAKE)
|
|
37 #else
|
|
38 @SET_MAKE@
|
|
39 RECURSIVE_MAKE=@RECURSIVE_MAKE@
|
|
40 #endif
|
|
41
|
1330
|
42 PROGNAME=@PROGNAME@
|
428
|
43 prefix=@prefix@
|
1330
|
44 SRC=@srcdir@
|
428
|
45 blddir=@blddir@
|
|
46 version=@version@
|
|
47 CC=@XEMACS_CC@
|
|
48 CPP=@CPP@
|
|
49 CFLAGS=@CFLAGS@
|
|
50 CPPFLAGS=@CPPFLAGS@
|
|
51 LDFLAGS=@LDFLAGS@
|
|
52
|
|
53 c_switch_all=@c_switch_all@
|
|
54 ld_switch_all=@ld_switch_all@
|
|
55 ld_libs_all=@ld_libs_all@
|
|
56 ld_dynamic_link_flags=@ld_dynamic_link_flags@
|
|
57
|
|
58 extra_objs=@extra_objs@
|
|
59 LN_S=@LN_S@
|
|
60
|
|
61 ld_switch_shared=@ld_switch_shared@
|
|
62 start_files=@start_files@
|
|
63 start_flags=@start_flags@
|
|
64 LD=@ld@
|
|
65 lib_gcc=@lib_gcc@
|
|
66 ##libmcheck=@libmcheck@
|
|
67
|
|
68
|
|
69 ## With the traditional VPATH setting, it is not possible to
|
|
70 ## simultaneously compile in-place and in another directory. The
|
|
71 ## mistaken definition is that *all* dependencies are searched for in
|
|
72 ## the VPATH directory, rather than just the dependencies that are not
|
|
73 ## themselves targets. Thus, if there is an up-to-date .o file in the
|
|
74 ## in-place location, it will not get recompiled in the not-in-place
|
|
75 ## location.
|
|
76
|
|
77 ## The GNU Make "vpath" directive continues this tradition, but at
|
|
78 ## least lets you restrict the classes of files that it applies to.
|
|
79 ## This allows us to kludge around the problem.
|
|
80
|
|
81 #ifdef USE_GNU_MAKE
|
|
82 vpath %.c @srcdir@
|
|
83 vpath %.h @srcdir@
|
|
84 ## now list files that should NOT be searched in the srcdir.
|
|
85 ## This includes any .c or .h built from something else
|
|
86 ## (e.g. a .in file).
|
|
87 vpath config.h
|
|
88 vpath paths.h
|
|
89 vpath Emacs.ad.h
|
|
90 vpath sheap-adjust.h
|
442
|
91 vpath dump-id.c
|
428
|
92 #else
|
|
93 VPATH=@srcdir@
|
|
94 #endif
|
|
95
|
1330
|
96 SHELL=/bin/sh
|
428
|
97 RM = rm -f
|
|
98
|
1330
|
99 LISP = $(SRC)/../lisp
|
|
100 ETC = $(SRC)/../etc
|
|
101 SRCMODULES = $(SRC)/../modules
|
|
102 LIB_SRC = ../lib-src
|
|
103 BLDSRC = .
|
|
104 BLDMODULES = ../modules
|
|
105 LWLIB_SRCDIR = $(SRC)/../lwlib
|
428
|
106
|
771
|
107 #########################################################################
|
1330
|
108 ## Definitions of object files and other dependencies ##
|
|
109 #########################################################################
|
771
|
110
|
1315
|
111 ## NOTE: Some of the object files are specified in this file, and others in
|
|
112 ## configure.in. The general rule is that they be specified here whenever
|
|
113 ## possible -- in practice, that means that they have clear dependencies on
|
|
114 ## configure defines. They should be in configure.in when there is no
|
|
115 ## configure define or when there is extremely hairy code to determine
|
|
116 ## which files are needed (e.g. native sound support) and it would be
|
|
117 ## pointless to duplicate that code.
|
771
|
118
|
793
|
119 gui_objs= gui.o
|
771
|
120 #ifdef HAVE_MENUBARS
|
|
121 gui_objs += menubar.o
|
|
122 #endif
|
|
123 #ifdef HAVE_SCROLLBARS
|
|
124 gui_objs += scrollbar.o
|
|
125 #endif
|
|
126 #ifdef HAVE_DIALOGS
|
|
127 gui_objs += dialog.o
|
|
128 #endif
|
|
129 #ifdef HAVE_TOOLBARS
|
|
130 gui_objs += toolbar.o
|
|
131 #endif
|
|
132
|
|
133 #ifdef HAVE_X_WINDOWS
|
|
134 x_objs=console-x.o device-x.o event-Xt.o frame-x.o \
|
|
135 glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o
|
|
136 x_gui_objs=$(gui_objs:.o=-x.o)
|
|
137 #ifdef HAVE_TOOLBARS
|
|
138 x_gui_objs += toolbar-common.o
|
|
139 #endif
|
|
140 #endif
|
|
141
|
|
142 #ifdef HAVE_MS_WINDOWS
|
|
143 mswindows_objs=console-msw.o device-msw.o event-msw.o frame-msw.o \
|
|
144 objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o
|
|
145 mswindows_gui_objs=$(gui_objs:.o=-msw.o)
|
|
146 #endif
|
|
147
|
|
148 #ifdef HAVE_TTY
|
|
149 tty_objs=console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o \
|
|
150 redisplay-tty.o cm.o
|
|
151 #endif
|
|
152
|
|
153 #ifdef HAVE_GTK
|
|
154 gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \
|
|
155 objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \
|
|
156 gtk-xemacs.o ui-gtk.o
|
|
157 gtk_gui_objs=$(gui_objs:.o=-gtk.o)
|
|
158 #ifdef HAVE_TOOLBARS
|
|
159 gtk_gui_objs += toolbar-common.o
|
|
160 #endif
|
|
161 #endif
|
|
162
|
|
163 #ifdef HAVE_BALLOON_HELP
|
|
164 balloon_help_objs=balloon_help.o balloon-x.o
|
|
165 #endif
|
|
166
|
|
167 #ifdef CLASH_DETECTION
|
|
168 clash_detection_objs=filelock.o
|
|
169 #endif
|
|
170
|
|
171 #ifdef HAVE_DATABASE
|
|
172 database_objs=database.o
|
|
173 #endif
|
|
174
|
|
175 #ifdef DEBUG_XEMACS
|
|
176 debug_objs=debug.o tests.o
|
|
177 #endif
|
|
178
|
|
179 #ifdef HAVE_UNIXOID_EVENT_LOOP
|
|
180 event_unixoid_objs=event-unixoid.o
|
|
181 #endif
|
|
182
|
|
183 #ifdef HAVE_GIF
|
|
184 gif_objs=dgif_lib.o gif_io.o
|
|
185 #endif
|
|
186
|
|
187 #ifdef HAVE_GPM
|
|
188 gpm_objs=gpmevent.o
|
|
189 #endif
|
|
190
|
996
|
191 #if defined(HAVE_LDAP) && !defined(HAVE_SHLIB)
|
1330
|
192 ldap_objs=$(BLDMODULES)/ldap/eldap.o
|
771
|
193 #endif
|
|
194
|
|
195 #ifdef MULE
|
|
196 mule_objs=mule-ccl.o mule-charset.o mule-coding.o
|
|
197 #endif
|
|
198
|
|
199 #ifdef HAVE_CANNA
|
|
200 mule_canna_objs=mule-canna.o
|
|
201 #endif
|
|
202
|
|
203 #ifdef HAVE_WNN
|
|
204 mule_wnn_objs=mule-wnnfns.o
|
|
205 #endif
|
|
206
|
996
|
207 #if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB)
|
1330
|
208 postgresql_objs=$(BLDMODULES)/postgresql/postgresql.o
|
771
|
209 #endif
|
|
210
|
|
211 #ifdef HAVE_WIN32_PROCESSES
|
|
212 process_objs=process-nt.o
|
|
213 #elif defined (HAVE_UNIX_PROCESSES)
|
|
214 process_objs=process-unix.o
|
|
215 #endif
|
|
216
|
|
217 #ifdef HAVE_SETITIMER
|
|
218 profile_objs=profile.o
|
|
219 #endif
|
|
220
|
442
|
221 #if defined (HEAP_IN_DATA) && !defined (PDUMP)
|
|
222 sheap_objs=sheap.o
|
|
223 #endif
|
|
224
|
771
|
225 #ifdef HAVE_SHLIB
|
1750
|
226 shlib_objs=sysdll.o
|
1632
|
227 # ifdef HAVE_MS_WINDOWS
|
|
228 export_lib=xemacs-export.o
|
|
229 xemacs-export.o: xemacs.def
|
|
230 dlltool -D xemacs-${version}.exe -d $< -l xemacs-import.a -e $@
|
|
231 # endif
|
771
|
232 #endif
|
|
233
|
|
234 #ifdef SUNPRO
|
|
235 sunpro_objs=sunpro.o
|
428
|
236 #endif
|
|
237
|
771
|
238 #ifdef TOOLTALK
|
|
239 tooltalk_objs=tooltalk.o
|
|
240 #endif
|
|
241
|
|
242 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
|
243 win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \
|
|
244 xemacs_res.o
|
611
|
245 #endif
|
|
246
|
428
|
247 ## lastfile must follow all files whose initialized data areas should
|
|
248 ## be dumped as pure by dump-emacs.
|
|
249
|
|
250 ## NOTE: The last line cannot be all macros, because make will barf
|
|
251 ## if they all come out null.
|
|
252
|
|
253 objs=\
|
851
|
254 abbrev.o alloc.o alloca.o \
|
|
255 $(balloon_help_objs) blocktype.o buffer.o bytecode.o \
|
853
|
256 callint.o casefiddle.o casetab.o chartab.o \
|
851
|
257 $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \
|
|
258 console-stream.o\
|
771
|
259 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
|
851
|
260 dynarr.o \
|
1750
|
261 editfns.o elhash.o emacs.o emodules.o eval.o events.o\
|
771
|
262 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
|
|
263 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
|
|
264 font-lock.o frame.o\
|
|
265 general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\
|
793
|
266 glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
|
|
267 gutter.o\
|
771
|
268 hash.o imgproc.o indent.o insdel.o intl.o\
|
|
269 keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\
|
|
270 macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\
|
|
271 $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) objects.o opaque.o\
|
|
272 $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\
|
|
273 rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\
|
|
274 search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\
|
|
275 specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\
|
|
276 text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\
|
|
277 widget.o window.o $(win32_objs)
|
428
|
278
|
|
279 obj_rtl = $(objs:.o=.c.rtl)
|
|
280
|
|
281 #ifdef REL_ALLOC
|
|
282 rallocdocsrc = ralloc.c
|
|
283 rallocobjs = ralloc.o
|
|
284 #endif
|
|
285
|
|
286 malloclib = $(libmcheck)
|
|
287 #ifndef SYSTEM_MALLOC
|
|
288 # ifdef GNU_MALLOC /* GNU malloc */
|
|
289 # ifdef ERROR_CHECK_MALLOC
|
|
290 #ifdef DOUG_LEA_MALLOC
|
|
291 mallocobjs = free-hook.o vm-limit.o
|
|
292 #else
|
|
293 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
|
294 #endif
|
|
295 mallocdocsrc = free-hook.c
|
|
296 # else /* New GNU malloc, sans error checking */
|
|
297 #ifdef DOUG_LEA_MALLOC
|
|
298 mallocobjs = vm-limit.o
|
|
299 #else
|
|
300 mallocobjs = gmalloc.o vm-limit.o
|
|
301 #endif
|
|
302 mallocdocsrc =
|
|
303 # endif /* ERROR_CHECK_MALLOC */
|
|
304 # else /* Older GNU malloc */
|
|
305 mallocobjs = malloc.o
|
|
306 mallocdocsrc =
|
|
307 # endif /* Older GNU malloc */
|
|
308 #else /* SYSTEM_MALLOC */
|
|
309 mallocobjs =
|
|
310 mallocdocsrc =
|
|
311 #ifdef USE_DEBUG_MALLOC
|
|
312 malloclib = -ldmalloc
|
|
313 #endif /* USE_DEBUG_MALLOC */
|
|
314 #endif /* SYSTEM_MALLOC */
|
|
315
|
|
316 #ifdef HAVE_X_WINDOWS
|
|
317
|
1330
|
318 lwlib_lib = ../lwlib/liblw.a
|
|
319
|
428
|
320 # ifdef EXTERNAL_WIDGET
|
|
321 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
322
|
|
323 # ifdef LWLIB_USES_MOTIF
|
|
324 # ifdef EXTW_LINK
|
|
325 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
|
326 # else
|
|
327 motif_other_files = libextcli_Xm.a
|
|
328 # endif
|
|
329 #endif /* LWLIB_USES_MOTIF */
|
|
330
|
|
331 # ifdef EXTW_LINK
|
|
332 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
|
333 # endif
|
|
334 other_files=\
|
1330
|
335 $(motif_other_files)\
|
428
|
336 libextcli_Xt.a libextcli_Xlib.a\
|
1330
|
337 $(shared_other_files)
|
428
|
338
|
|
339 # endif /* EXTERNAL_WIDGET */
|
|
340
|
|
341 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
342 dnd_objs = @dnd_objs@
|
|
343 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
344
|
|
345 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
|
346 #endif /* HAVE_X_WINDOWS */
|
|
347
|
|
348 ## define otherobjs as list of object files that make-docfile
|
|
349 ## should not be told about.
|
1632
|
350 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs) $(export_lib)
|
428
|
351 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
352 othersrcs = $(otherobjs:.o=.c)
|
|
353
|
1330
|
354 LIBES = $(lwlib_lib) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
428
|
355
|
|
356 #ifdef I18N3
|
1330
|
357 mo_file = $(LIB_SRC)/emacs.mo
|
428
|
358 #endif
|
|
359
|
1315
|
360 #########################################################################
|
1330
|
361 ## Implicit rules ##
|
|
362 #########################################################################
|
1315
|
363
|
1330
|
364 ## For performance and consistency, no built-in rules.
|
|
365 .SUFFIXES:
|
|
366 .SUFFIXES: .c .h .o .i .s .dep
|
|
367
|
|
368 ## -Demacs is needed to make some files produce the correct version
|
|
369 ## for use in Emacs.
|
|
370
|
|
371 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
|
372 cflags = $(CFLAGS) $(cppflags)
|
|
373 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
|
374 ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
|
|
375 # if defined (CYGWIN)
|
|
376 ldflags += -Wl,--script=s/cygwin.sc
|
|
377 # endif
|
|
378 #else
|
|
379 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
|
380 #endif
|
|
381
|
|
382 #ifdef SOLARIS2
|
|
383 %.o : %.c
|
|
384 #else
|
|
385 .c.o:
|
|
386 #endif
|
|
387 $(CC) -c $(cflags) $<
|
1315
|
388
|
1330
|
389 ## Create preprocessor output (debugging purposes only)
|
|
390 .c.i:
|
|
391 #ifdef __GNUC__
|
|
392 $(CC) -E $(cppflags) -o $@ $<
|
|
393 #else /* works on Solaris; what about other systems? */
|
|
394 $(CC) -P $(cppflags) $<
|
|
395 #endif /* compiler */
|
|
396
|
|
397 ## Create assembler output (debugging purposes only)
|
|
398 .c.s:
|
|
399 $(CC) -S -c $(cflags) $<
|
|
400
|
|
401 ## Create RTL files
|
|
402 %.c.rtl : %.c
|
|
403 $(CC) -dr -c $(cflags) $<
|
|
404
|
|
405 #########################################################################
|
|
406 ## Primary rebuilding process ##
|
|
407 #########################################################################
|
|
408
|
|
409 #ifdef PDUMP
|
|
410 DUMP_TARGET = $(PROGNAME).dmp
|
|
411 RAW_EXE = $(PROGNAME)
|
|
412 DUMP_ID = dump-id.o
|
|
413 #else
|
|
414 DUMP_TARGET = $(PROGNAME)
|
|
415 RAW_EXE = temacs
|
|
416 #endif
|
|
417
|
|
418 DO_TEMACS = $(DUMPENV) ./$(RAW_EXE)
|
|
419 DO_XEMACS = ./$(PROGNAME)
|
1315
|
420
|
|
421 BATCH = -no-packages -batch
|
|
422 BATCH_PACKAGES = -vanilla -batch
|
|
423 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
|
|
424 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
|
|
425 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
|
|
426 temacs_loadup_args = -l $(LISP)/loadup.el
|
|
427 dump_temacs_args = $(temacs_loadup_args) dump
|
|
428 run_temacs_args = $(temacs_loadup_args) run-temacs
|
|
429 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
|
|
430
|
|
431 ## Compile, dump, and make sure all .elc files are up-to-date.
|
|
432
|
1330
|
433 ## NOTE NOTE NOTE: There appears to be a fundamental but non-obvious
|
|
434 ## difference between the way that standard `make', GNU Make, and `nmake'
|
|
435 ## handle dependencies, and this means we have to write the dependencies in
|
|
436 ## Makefile.in.in and xemacs.mak differently. To illustrate this, consider
|
|
437 ## the following first:
|
|
438
|
|
439 ##.PHONY: all (`make' only)
|
|
440 ## all: test.exe
|
|
441 ##
|
|
442 ##.PHONY: FRC.test.c (`make' only)
|
|
443 ##FRC.test.c:
|
|
444 ##
|
|
445 ##test.c: FRC.test.c
|
|
446 ## if test ! -f foo ; then touch test.c; fi (`make' only)
|
|
447 ## if not exist foo touch test.c (`nmake' only)
|
|
448 ##
|
|
449 ##test.obj: test.c
|
|
450 ## touch test.obj
|
|
451 ##
|
|
452 ##test.exe: test.obj
|
|
453 ## touch test.exe
|
|
454
|
|
455 ## (GNU Make doesn't need the .PHONY declarations, but evidently some versions
|
|
456 ## of `make' do. nmake doesn't need them and doesn't allow them, either.)
|
|
457
|
|
458 ## Running `make' rebuilds test.exe only if `foo' doesn't exist.
|
|
459 ## Running `nmake -f Makefile' rebuilds it regardless.
|
|
460
|
|
461 ## Both conclude that test.c needs to be rebuilt since its dependent is
|
|
462 ## non-existent. But `make' recalculates its dependencies after running
|
|
463 ## the commands for test.c, and notices that test.c hasn't changed, and
|
|
464 ## thus test.obj and test.exe are up-to-date. `nmake' doesn't.
|
|
465
|
|
466 ## On the other hand, consider the following:
|
428
|
467
|
1330
|
468 ##.PHONY: all (`make' only)
|
|
469 ##all: check-foo test.exe
|
|
470 ##
|
|
471 ##.PHONY: check-foo (`make' only)
|
|
472 ##check-foo:
|
|
473 ## if test ! -f foo; then touch test.c; fi (`make' only)
|
|
474 ## if not exist foo touch test.c (`nmake' only)
|
|
475 ##
|
|
476 ##test.c:
|
|
477 ## touch test.c
|
|
478 ##
|
|
479 ##test.obj: test.c
|
|
480 ## touch test.obj
|
|
481 ##
|
|
482 ##test.exe: test.c test.obj
|
|
483 ## touch test.exe
|
|
484 ##
|
1315
|
485
|
1330
|
486 ## Running `nmake -f Makefile' (and `GNU make') rebuilds test.exe only if
|
|
487 ## `foo' doesn't exist.
|
|
488 ## Running some versions of non-GNU `make' does nothing at all once test.c,
|
|
489 ## test.obj and test.exe all exist.
|
|
490
|
|
491 ## It appears that `nmake' doesn't check dependencies for test.exe until it
|
|
492 ## actually needs to be rebuilt, so this "sideways" dependency script
|
|
493 ## works. GNU make evidently recalculates *all* dependencies after each
|
|
494 ## command so has no problem, either. But some makes apparently calculate
|
|
495 ## all dependencies at startup and then, after executing a command to build
|
|
496 ## a dependency, only recheck relationships involving that particular
|
|
497 ## dependency.
|
|
498
|
|
499 ## In XEmacs-land, the above situation exists wrt the `NEEDTODUMP'
|
|
500 ## dependency, recalculated by `update-elc.el'. Thus, Makefile.in.in must
|
|
501 ## use the method #1 above, and nmake must use method #2.
|
|
502
|
|
503 ## -ben
|
|
504
|
|
505 .PHONY: build-the-mofo
|
1346
|
506 build-the-mofo: update-elc-2 $(mo_file) $(other_files) $(LISP)/finder-inf.el load-shadows
|
1315
|
507
|
1346
|
508 ## (1) Compile all dependencies of the XEmacs executable
|
428
|
509
|
1330
|
510 #ifdef HAVE_X_WINDOWS
|
|
511 lwlib_deps = $(lwlib_lib)
|
|
512 $(lwlib_lib):
|
|
513 cd ../lwlib && $(RECURSIVE_MAKE)
|
|
514 #endif /* HAVE_X_WINDOWS */
|
|
515
|
428
|
516 #ifdef DYNODUMP
|
|
517 dynodump_deps = ../dynodump/dynodump.so
|
|
518 ../dynodump/dynodump.so:
|
|
519 cd ../dynodump && $(RECURSIVE_MAKE)
|
|
520 #endif /* DYNODUMP */
|
|
521
|
1330
|
522 link_deps = $(start_files) $(objs) $(otherobjs) $(lwlib_deps) $(dynodump_deps)
|
1315
|
523
|
1346
|
524 $(LIB_SRC)/make-dump-id:
|
|
525 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-dump-id
|
|
526
|
|
527 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps)
|
|
528 $(LIB_SRC)/make-dump-id
|
|
529
|
|
530 ## (2) Link the XEmacs executable
|
|
531
|
1330
|
532 temacs_deps = $(link_deps) $(DUMP_ID)
|
1315
|
533
|
|
534 temacs_link_args = \
|
1330
|
535 $(start_flags) $(ldflags) \
|
|
536 -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES)
|
1315
|
537
|
1330
|
538 $(RAW_EXE): $(temacs_deps)
|
1315
|
539 $(LD) $(temacs_link_args)
|
|
540
|
1346
|
541 ## (3) Update the .elc's needed for dumping
|
|
542
|
|
543 .PHONY: FRC.needtodump
|
|
544 FRC.needtodump:
|
|
545
|
|
546 ## This file is touched by update-elc.el when redumping is necessary.
|
|
547 ## We use $(BLDSRC) == `.' here to help keep sync with nt/xemacs.mak,
|
|
548 ## where $(BLDSRC) is not `.'.
|
1406
|
549 $(BLDSRC)/NEEDTODUMP: $(RAW_EXE) FRC.needtodump
|
1346
|
550 $(TEMACS_BATCH) -l $(LISP)/update-elc.el
|
|
551
|
|
552 ## (4) Build the DOC file
|
1315
|
553
|
|
554 obj_src = $(objs:.o=.c)
|
|
555
|
1346
|
556 $(LIB_SRC)/make-docfile:
|
|
557 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-docfile
|
|
558
|
1330
|
559 $(LIB_SRC)/DOC: $(LIB_SRC)/make-docfile $(BLDSRC)/NEEDTODUMP $(temacs_deps)
|
1303
|
560 #ifdef QUICK_BUILD
|
|
561 if test ! -f $@ ; then \
|
|
562 #else
|
|
563 if true ; then \
|
|
564 #endif
|
1315
|
565 $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \
|
1330
|
566 -o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \
|
|
567 $(obj_src) $(mallocdocsrc) $(rallocdocsrc) \
|
|
568 $(extra_doc_files) ; fi
|
428
|
569
|
1346
|
570 ## (5) Dump
|
|
571
|
|
572 $(DUMP_TARGET): $(RAW_EXE) $(BLDSRC)/NEEDTODUMP $(LIB_SRC)/DOC
|
|
573 #ifdef HEAP_IN_DATA
|
|
574 @$(RM) $@ && touch SATISFIED
|
|
575 $(dump_temacs)
|
|
576 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \
|
|
577 $(RECURSIVE_MAKE) $@; fi
|
|
578 #else
|
|
579 @$(RM) $@
|
|
580 $(dump_temacs)
|
|
581 #endif
|
|
582
|
|
583 ## (6) Update the remaining .elc's, post-dumping
|
|
584
|
|
585 .PHONY: update-elc-2
|
|
586 update-elc-2: $(DUMP_TARGET)
|
|
587 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
|
|
588
|
|
589 ## (7) Other random stuff
|
1315
|
590
|
1346
|
591 $(LISP)/finder-inf.el: update-elc-2
|
|
592 @echo "Building finder database ..."
|
|
593 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
|
|
594 -l finder -f finder-compile-keywords
|
|
595 @echo "Building finder database ...(done)"
|
|
596
|
|
597 .PHONY: load-shadows
|
|
598 load-shadows: update-elc-2
|
|
599 #ifndef QUICK_BUILD
|
|
600 @echo "Testing for Lisp shadows ..."
|
|
601 @$(XEMACS_BATCH) -f list-load-path-shadows
|
|
602 #endif
|
|
603
|
|
604 ###################### Misc targets
|
|
605
|
|
606 release: all
|
|
607 -if [ -w $(LISP) ]; then \
|
|
608 w=`pwd`; cd $(SRC) && $$w/$(RAW_EXE) -nd $(BATCH) -l $(LISP)/inc-vers; \
|
|
609 else true; fi
|
|
610 -$(dump_temacs)
|
|
611 touch release
|
428
|
612
|
1315
|
613 .PHONY: fastdump
|
1330
|
614 fastdump: $(RAW_EXE)
|
|
615 @$(RM) $(DUMP_TARGET) && touch SATISFIED
|
|
616 -$(dump_temacs)
|
1315
|
617 @$(XEMACS_BATCH) -f list-load-path-shadows
|
428
|
618
|
1315
|
619 .PHONY: all-elc
|
|
620 all-elc:
|
|
621 cd .. && $(RECURSIVE_MAKE)
|
|
622
|
|
623 #########################################################################
|
1330
|
624 ## Subsidiary dependency rules ##
|
|
625 #########################################################################
|
428
|
626
|
|
627 #ifdef I18N3
|
|
628
|
|
629 # if defined(SPARC) && !defined(USG)
|
|
630 xgettext= /usr/openwin/bin/xgettext
|
|
631 xgettext_args= -o emacs -m_X messages
|
|
632 msgfmt= /usr/openwin/bin/msgfmt
|
|
633 # else
|
|
634 xgettext= xgettext
|
|
635 xgettext_args= -s -d emacs -M_X messages
|
|
636 msgfmt= msgfmt
|
|
637 #endif
|
|
638
|
1330
|
639 $(LIB_SRC)/emacs.po: $(LIB_SRC)/make-msgfile $(LIB_SRC)/make-po $(objs)
|
|
640 $(LIB_SRC)/make-msgfile -o $(LIB_SRC)/messages $(objs)
|
|
641 cd $(LIB_SRC) && $(xgettext) $(xgettext_args)
|
|
642 $(RM) $(LIB_SRC)/emacs.po
|
|
643 cd $(LIB_SRC) && $(LIB_SRC)/make-po -a $(LIB_SRC)/emacs.po DOC
|
428
|
644
|
1330
|
645 $(LIB_SRC)/emacs.mo: $(LIB_SRC)/emacs.po
|
|
646 cd $(LIB_SRC)/ && $(msgfmt) -o emacs.mo emacs.po
|
428
|
647
|
1330
|
648 $(LIB_SRC)/make-msgfile:
|
|
649 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-msgfile
|
428
|
650
|
1330
|
651 $(LIB_SRC)/make-po:
|
|
652 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-po
|
428
|
653
|
|
654 #endif /* I18N3 */
|
|
655
|
1330
|
656 TopLevelEmacsShell.o : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
657 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
658 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
659
|
1330
|
660 TopLevelEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
661 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
662 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
663
|
1330
|
664 TransientEmacsShell.o : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
665 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
666 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
667
|
1330
|
668 TransientEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
669 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
670 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
671
|
442
|
672 ## The above rules are subject to a race condition if using a parallel make.
|
|
673 TransientEmacsShell.o : TopLevelEmacsShell.o
|
|
674 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
|
|
675
|
428
|
676 ## Position-independent code for shared library creation
|
|
677 #if USE_GCC
|
|
678 pic_arg = -fpic
|
|
679 #elif defined (IRIX)
|
|
680 pic_arg = -KPIC
|
|
681 # else
|
|
682 pic_arg = -K pic
|
|
683 #endif
|
|
684
|
|
685 #ifdef EXTERNAL_WIDGET
|
|
686
|
|
687 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
688 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
689 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
690 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
691 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
692 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
|
693
|
|
694 ## Add dependencies so things work right with a parallel make
|
1330
|
695 ExternalClient-Xm-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
|
696 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c
|
428
|
697 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
698
|
1330
|
699 ExternalClient-Xt-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
700 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient.c
|
428
|
701 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
702
|
1330
|
703 ExternalClient-Xlib-shared.o: $(SRC)/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
|
704 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient-Xlib.c
|
428
|
705 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
706
|
1330
|
707 ExternalClient-Xm-nonshared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
708 $(CC) -c $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c
|
428
|
709 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
710
|
1330
|
711 ExternalClient-Xt-nonshared.o: $(SRC)/ExternalClient.c
|
|
712 $(CC) -c $(cflags) $(SRC)/ExternalClient.c
|
428
|
713 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
714
|
1330
|
715 ExternalClient-Xlib-nonshared.o: $(SRC)/ExternalClient-Xlib.c
|
|
716 $(CC) -c $(cflags) $(SRC)/ExternalClient-Xlib.c
|
428
|
717 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
718
|
|
719 ## We compile the common files twice (once with PIC and once without)
|
|
720 ## because on some systems, compiling with PIC but not linking into
|
|
721 ## a shared library messes things up.
|
|
722
|
1330
|
723 extw-Xt-shared.o: $(SRC)/extw-Xt.c extw-Xt-nonshared.o
|
|
724 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xt.c
|
428
|
725 mv extw-Xt.o extw-Xt-shared.o
|
|
726
|
1330
|
727 extw-Xlib-shared.o: $(SRC)/extw-Xlib.c extw-Xlib-nonshared.o
|
|
728 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xlib.c
|
428
|
729 mv extw-Xlib.o extw-Xlib-shared.o
|
|
730
|
1330
|
731 extw-Xt-nonshared.o: $(SRC)/extw-Xt.c
|
|
732 $(CC) -c $(cflags) $(SRC)/extw-Xt.c
|
428
|
733 mv extw-Xt.o extw-Xt-nonshared.o
|
|
734
|
1330
|
735 extw-Xlib-nonshared.o: $(SRC)/extw-Xlib.c
|
|
736 $(CC) -c $(cflags) $(SRC)/extw-Xlib.c
|
428
|
737 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
738
|
1330
|
739 libextcli_Xm.a: $(external_client_motif_objs_nonshared)
|
|
740 ar r libextcli_Xm.a $(external_client_motif_objs_nonshared)
|
428
|
741
|
1330
|
742 libextcli_Xt.a: $(external_client_xt_objs_nonshared)
|
|
743 ar r libextcli_Xt.a $(external_client_xt_objs_nonshared)
|
428
|
744
|
1330
|
745 libextcli_Xlib.a: $(external_client_xlib_objs_nonshared)
|
|
746 ar r libextcli_Xlib.a $(external_client_xlib_objs_nonshared)
|
428
|
747
|
1315
|
748 ## Now we try to figure out how to link a shared library.
|
|
749 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
750 ## library will not be created.
|
|
751
|
|
752 # ifdef USE_GCC
|
|
753 # ifdef USG5
|
|
754 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
|
755 extw_link_beg = $(CC) -shared
|
|
756 extw_link_mid = -Xlinker -z -Xlinker text -o
|
|
757 extw_link_end =
|
|
758 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
|
759 # elif !defined (LINUX) || defined (__ELF__)
|
|
760 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
|
761 extw_link_beg = $(CC) -shared
|
|
762 extw_link_mid = -o
|
|
763 extw_link_end =
|
|
764 # endif
|
|
765 # elif defined (USG5)
|
|
766 # if defined (IRIX)
|
1330
|
767 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations objs -o output
|
|
768 extw_link_beg = $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations
|
1315
|
769 extw_link_mid = -o
|
|
770 extw_link_end =
|
|
771 # else /* not IRIX */
|
|
772 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
|
773 extw_link_beg = $(CC) -G
|
|
774 extw_link_mid = -z text -o
|
|
775 extw_link_end =
|
|
776 # endif /* not IRIX */
|
|
777 # else /* not USG5 */
|
|
778 # if defined (DEC_ALPHA) && defined (OSF1)
|
|
779 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
|
780 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
|
|
781 extw_link_mid = -o
|
|
782 extw_link_end = $(LIBES)
|
|
783 # else /* !(DEC_ALPHA && OSF1) */
|
|
784 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
|
785 extw_link_beg = $(LD) -dc
|
|
786 extw_link_mid = -assert pure-text -o
|
|
787 extw_link_end =
|
|
788 # endif /* !(DEC_ALPHA && OSF1) */
|
|
789 # endif /* not USG5 */
|
|
790
|
428
|
791 #ifdef EXTW_LINK
|
|
792
|
1330
|
793 libextcli_Xm.so.1: $(external_client_motif_objs_shared)
|
|
794 $(extw_link_beg) $(external_client_motif_objs_shared) $(extw_link_mid) libextcli_Xm.so.1 $(extw_link_end)
|
428
|
795
|
1330
|
796 libextcli_Xt.so.1: $(external_client_xt_objs_shared)
|
|
797 $(extw_link_beg) $(external_client_xt_objs_shared) $(extw_link_mid) libextcli_Xt.so.1 $(extw_link_end)
|
428
|
798
|
1330
|
799 libextcli_Xlib.so.1: $(external_client_xlib_objs_shared)
|
|
800 $(extw_link_beg) $(external_client_xlib_objs_shared) $(extw_link_mid) libextcli_Xlib.so.1 $(extw_link_end)
|
428
|
801
|
|
802 #endif /* EXTW_LINK */
|
|
803
|
|
804 #endif /* EXTERNAL_WIDGET */
|
|
805
|
1330
|
806 config.h: $(SRC)/config.h.in
|
|
807 Emacs.ad.h: $(ETC)/Emacs.ad
|
428
|
808
|
|
809 config.h sheap-adjust.h paths.h Emacs.ad.h :
|
|
810 @echo "The file $@ needs to be re-generated."
|
|
811 @echo "Please run a make in the top level directory."
|
|
812 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
813 @exit 1
|
|
814
|
|
815 ## Some machines have alloca built-in.
|
|
816 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
817 ## be used but generate no code.
|
|
818 ## Some have it written in assembler in alloca.s.
|
|
819 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
851
|
820 ## Nowadays we always compile in the C version and use it to avoid stack
|
|
821 ## overflow.
|
428
|
822
|
|
823 #ifdef C_ALLOCA
|
|
824 #else
|
|
825 #ifndef HAVE_ALLOCA
|
1330
|
826 allocax.o : $(SRC)/alloca.s config.h
|
428
|
827 ## $(CPP) is cc -E, which may get confused by filenames
|
|
828 ## that do not end in .c. So copy file to a safe name. */
|
1330
|
829 ## cp $(SRC)/alloca.s allocatem.c
|
428
|
830 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
831 ## since some assemblers barf on them. Use a different basename for the
|
|
832 ## output file, since some stupid compilers (Green Hill) use that
|
|
833 ## name for the intermediate assembler file.
|
|
834 $(CPP) $(cppflags) allocatem.c | \
|
|
835 sed -e 's///' -e 's/^#.*//' | \
|
|
836 sed -n -e '/^..*$$/p' > allocax.s
|
|
837 @$(RM) alloca.o
|
|
838 ## Xenix, in particular, needs to run assembler via cc.
|
|
839 $(CC) -c allocax.s
|
|
840 $(RM) allocax.s allocatem.c
|
|
841 #endif /* HAVE_ALLOCA */
|
|
842 #endif /* ! defined (C_ALLOCA) */
|
|
843
|
|
844 #ifdef HAVE_NATIVE_SOUND
|
442
|
845 sound_cflags=@sound_cflags@
|
1330
|
846 sunplay.o: $(SRC)/sunplay.c
|
|
847 $(CC) -c $(sound_cflags) $(cflags) $(SRC)/sunplay.c
|
|
848 hpplay.o: $(SRC)/hpplay.c
|
|
849 $(CC) -c -Demacs $(sound_cflags) $(cflags) $(SRC)/hpplay.c
|
428
|
850 #endif /* HAVE_NATIVE_SOUND */
|
|
851
|
462
|
852 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H)
|
|
853 glade_files=glade.c
|
|
854 #endif
|
|
855
|
|
856 #ifdef HAVE_GTK
|
|
857 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files)
|
|
858 #endif
|
|
859
|
1330
|
860 xemacs_res.o: $(SRC)/../nt/xemacs.rc
|
|
861 windres --include-dir $(SRC)/../nt -i $(SRC)/../nt/xemacs.rc -o $@
|
442
|
862
|
1315
|
863 #########################################################################
|
1330
|
864 ## Other random crap ##
|
|
865 #########################################################################
|
1315
|
866
|
|
867 dortl : $(obj_rtl) $(otherrtls)
|
|
868 echo "(defvar source-files '(" > $(LISP)/source-files.el
|
|
869 (for a in $(obj_src) $(othersrcs);do \
|
|
870 echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\
|
|
871 done)
|
|
872 echo "))" >> $(LISP)/source-files.el
|
|
873
|
1330
|
874 ###################### Lint
|
1315
|
875 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
|
876 LINTFILES= $(objs:.o=.ln)
|
|
877 LINTINCLUDES = $(cppflags)
|
|
878 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
|
879 LINTFLAGS= -fd -m -s -u -v -x
|
|
880 .PHONY: lint
|
|
881 lint: $(LINTFILES)
|
|
882 $(LINT.c) $(LINTFILES)
|
|
883
|
1330
|
884 ###################### Automated tests
|
|
885 testdir = $(SRC)/../tests/automated
|
|
886 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
|
1315
|
887
|
|
888 .PHONY: check check-temacs check-features
|
|
889 check:
|
|
890 $(DO_XEMACS) $(batch_test_emacs)
|
|
891 check-temacs:
|
|
892 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
|
|
893 check-features: all
|
|
894 $(XEMACS_BATCH) -l check-features.el
|
|
895
|
1330
|
896 ###################### Debugging targets
|
|
897
|
1315
|
898 ## None of the debugging products work with a dumped xemacs binary,
|
|
899 ## because it does unexpected things like free memory that has been
|
|
900 ## malloc'ed in a *different* process!! So we need to run these on
|
|
901 ## temacs.
|
|
902
|
|
903 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
|
|
904 rtc_patch.o:
|
|
905 rtc_patch_area -o $@
|
|
906
|
|
907 rtcmacs: $(temacs_deps) rtc_patch.o
|
1330
|
908 $(RM) $(RAW_EXE); $(RECURSIVE_MAKE) $(RAW_EXE) RTC_patch_objs=rtc_patch.o
|
|
909 mv $(RAW_EXE) rtcmacs
|
1315
|
910
|
|
911 .PHONY: run-rtcmacs
|
|
912 run-rtcmacs: rtcmacs
|
|
913 dbx -q -C -c \
|
|
914 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
915 dbxenv suppress_startup_message 5.0; \
|
|
916 ignore POLL; \
|
|
917 check -access; \
|
|
918 suppress rui; \
|
1330
|
919 runargs -nd $(BATCH) $(run_temacs_args) -vanilla; \
|
1315
|
920 run' rtcmacs
|
|
921
|
1330
|
922 debug-temacs: $(RAW_EXE)
|
|
923 -gdb $(RAW_EXE)
|
1315
|
924
|
|
925 ## Purify, Quantify, PureCoverage are software quality products from
|
|
926 ## Rational, formerly Pure Atria, formerly Pure Software.
|
|
927 ##
|
|
928 ## Purify
|
|
929 PURIFY_PROG = purify
|
|
930 PURIFY_LIBS =
|
|
931 PURIFY_FLAGS =\
|
|
932 #ifdef PDUMP
|
|
933 -search-mmaps=yes\
|
|
934 #endif
|
|
935 -chain-length=32 -ignore-signals=SIGPOLL\
|
1330
|
936 -cache-dir=$(blddir)/purecache -always-use-cache-dir=yes
|
1315
|
937
|
|
938 puremacs: $(temacs_deps)
|
|
939 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
|
1330
|
940 cp $@ $(RAW_EXE)
|
1315
|
941
|
|
942 ## Quantify
|
|
943 #ifdef QUANTIFY
|
|
944 QUANTIFY_PROG = quantify
|
|
945 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
|
|
946 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
|
|
947 cppflags += -I$(QUANTIFY_HOME)
|
|
948 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
|
|
949
|
|
950 quantmacs: $(temacs_deps)
|
|
951 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
|
1330
|
952 cp $@ $(RAW_EXE)
|
1315
|
953 #endif /* QUANTIFY */
|
|
954
|
|
955 PURECOV_PROG=purecov
|
|
956 covmacs: $(temacs_deps)
|
|
957 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
428
|
958
|
1330
|
959 ###################### Clean
|
|
960
|
428
|
961 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
|
962 mostlyclean:
|
1330
|
963 $(RM) *.o *.i *.rtl *.ln core \
|
|
964 temacs puremacs quantmacs covmacs rtcmacs temacs.exe \
|
|
965 sheap-adjust.h dump-id.c $(BLDSRC)/NEEDTODUMP SATISFIED \
|
|
966 $(LIB_SRC)/*.po $(LIB_SRC)/*.mo
|
|
967 versionclean:
|
|
968 $(RM) $(RAW_EXE) $(DUMP_TARGET) $(LIB_SRC)/DOC
|
|
969 ## Remove the generated load files here; they cause lots of problems
|
|
970 ## when they don't work right.
|
428
|
971 clean: mostlyclean versionclean
|
1330
|
972 $(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \
|
|
973 $(LISP)/mule/auto-autoloads.el* $(LISP)/mule/custom-load.el* \
|
|
974 $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el*
|
428
|
975 ## This is used in making a distribution.
|
|
976 ## Do not use it on development directories!
|
|
977 distclean: clean
|
1330
|
978 $(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \
|
1727
|
979 GNUmakefile Makefile Makefile.in TAGS $(DUMP_TARGET) $(RAW_EXE) \
|
|
980 xemacs.def xemacs.def.in
|
428
|
981 realclean: distclean
|
|
982 extraclean: realclean
|
|
983 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
|
984
|
1330
|
985 ###################### Lock, unlock
|
|
986
|
428
|
987 .PHONY : lock unlock
|
|
988 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
|
989 config.h.in README COPYING ChangeLog
|
|
990 unlock:
|
|
991 chmod u+w $(SOURCES)
|
|
992
|
|
993 relock:
|
|
994 chmod -w $(SOURCES)
|
|
995
|
1330
|
996 ###################### Installation
|
|
997
|
428
|
998 ## Header files for ellcc
|
|
999 #ifdef HAVE_SHLIB
|
|
1000 MAKEPATH=../lib-src/make-path
|
1330
|
1001 install: $(PROGNAME)
|
|
1002 $(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s
|
428
|
1003 -@echo "Copying include files for ellcc..."
|
|
1004 -@hdir=`pwd`; \
|
1330
|
1005 cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \
|
428
|
1006 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \
|
|
1007 (for thisdir in $$hdir; do \
|
448
|
1008 cd $$thisdir && \
|
428
|
1009 (hdrtars=; \
|
|
1010 for hdrfile in *.h; do \
|
|
1011 hdrtars="$$hdrtars $$hdrfile"; \
|
|
1012 done; \
|
|
1013 test -d s && hdrtars="$$hdrtars s/*"; \
|
|
1014 test -d m && hdrtars="$$hdrtars m/*"; \
|
|
1015 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
|
1330
|
1016 (cd $(archlibdir)/include && umask 022 && tar xf -); \
|
|
1017 chmod 755 $(archlibdir)/include; \
|
|
1018 test -d $(archlibdir)/include/s && \
|
|
1019 chmod 755 $(archlibdir)/include/s; \
|
|
1020 test -d $(archlibdir)/include/m && \
|
|
1021 chmod 755 $(archlibdir)/include/s;) \
|
428
|
1022 done)
|
|
1023 #endif
|
|
1024
|
1330
|
1025 ###################### Dependencies
|
|
1026
|
428
|
1027 ## Dependency processing using home-grown script, not makedepend
|
|
1028 .PHONY: depend
|
|
1029 FRC.depend:
|
|
1030 depend: FRC.depend
|
1330
|
1031 cd $(SRC) && $(RM) depend.tmp && \
|
428
|
1032 perl ./make-src-depend > depend.tmp && \
|
|
1033 if cmp -s depend depend.tmp; \
|
|
1034 then $(RM) depend.tmp; \
|
|
1035 else $(RM) depend && mv depend.tmp depend; \
|
|
1036 fi
|
1330
|
1037
|
|
1038 ###################### Unicode encapsulation
|
|
1039
|
|
1040 .PHONY: unicode-encapsulate
|
|
1041 FRC.unicode-encapsulate:
|
|
1042 unicode-encapsulate: FRC.unicode-encapsulate
|
|
1043 cd $(SRC) && \
|
|
1044 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
|