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
|
|
226 shlib_objs=sysdll.o emodules.o
|
|
227 #endif
|
|
228
|
|
229 #ifdef SUNPRO
|
|
230 sunpro_objs=sunpro.o
|
428
|
231 #endif
|
|
232
|
771
|
233 #ifdef TOOLTALK
|
|
234 tooltalk_objs=tooltalk.o
|
|
235 #endif
|
|
236
|
|
237 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
|
238 win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \
|
|
239 xemacs_res.o
|
611
|
240 #endif
|
|
241
|
428
|
242 ## lastfile must follow all files whose initialized data areas should
|
|
243 ## be dumped as pure by dump-emacs.
|
|
244
|
|
245 ## NOTE: The last line cannot be all macros, because make will barf
|
|
246 ## if they all come out null.
|
|
247
|
|
248 objs=\
|
851
|
249 abbrev.o alloc.o alloca.o \
|
|
250 $(balloon_help_objs) blocktype.o buffer.o bytecode.o \
|
853
|
251 callint.o casefiddle.o casetab.o chartab.o \
|
851
|
252 $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \
|
|
253 console-stream.o\
|
771
|
254 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
|
851
|
255 dynarr.o \
|
771
|
256 editfns.o elhash.o emacs.o eval.o events.o\
|
|
257 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
|
|
258 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
|
|
259 font-lock.o frame.o\
|
|
260 general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\
|
793
|
261 glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
|
|
262 gutter.o\
|
771
|
263 hash.o imgproc.o indent.o insdel.o intl.o\
|
|
264 keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\
|
|
265 macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\
|
|
266 $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) objects.o opaque.o\
|
|
267 $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\
|
|
268 rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\
|
|
269 search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\
|
|
270 specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\
|
|
271 text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\
|
|
272 widget.o window.o $(win32_objs)
|
428
|
273
|
|
274 obj_rtl = $(objs:.o=.c.rtl)
|
|
275
|
|
276 #ifdef REL_ALLOC
|
|
277 rallocdocsrc = ralloc.c
|
|
278 rallocobjs = ralloc.o
|
|
279 #endif
|
|
280
|
|
281 malloclib = $(libmcheck)
|
|
282 #ifndef SYSTEM_MALLOC
|
|
283 # ifdef GNU_MALLOC /* GNU malloc */
|
|
284 # ifdef ERROR_CHECK_MALLOC
|
|
285 #ifdef DOUG_LEA_MALLOC
|
|
286 mallocobjs = free-hook.o vm-limit.o
|
|
287 #else
|
|
288 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
|
289 #endif
|
|
290 mallocdocsrc = free-hook.c
|
|
291 # else /* New GNU malloc, sans error checking */
|
|
292 #ifdef DOUG_LEA_MALLOC
|
|
293 mallocobjs = vm-limit.o
|
|
294 #else
|
|
295 mallocobjs = gmalloc.o vm-limit.o
|
|
296 #endif
|
|
297 mallocdocsrc =
|
|
298 # endif /* ERROR_CHECK_MALLOC */
|
|
299 # else /* Older GNU malloc */
|
|
300 mallocobjs = malloc.o
|
|
301 mallocdocsrc =
|
|
302 # endif /* Older GNU malloc */
|
|
303 #else /* SYSTEM_MALLOC */
|
|
304 mallocobjs =
|
|
305 mallocdocsrc =
|
|
306 #ifdef USE_DEBUG_MALLOC
|
|
307 malloclib = -ldmalloc
|
|
308 #endif /* USE_DEBUG_MALLOC */
|
|
309 #endif /* SYSTEM_MALLOC */
|
|
310
|
|
311 #ifdef HAVE_X_WINDOWS
|
|
312
|
1330
|
313 lwlib_lib = ../lwlib/liblw.a
|
|
314
|
428
|
315 # ifdef EXTERNAL_WIDGET
|
|
316 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
317
|
|
318 # ifdef LWLIB_USES_MOTIF
|
|
319 # ifdef EXTW_LINK
|
|
320 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
|
321 # else
|
|
322 motif_other_files = libextcli_Xm.a
|
|
323 # endif
|
|
324 #endif /* LWLIB_USES_MOTIF */
|
|
325
|
|
326 # ifdef EXTW_LINK
|
|
327 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
|
328 # endif
|
|
329 other_files=\
|
1330
|
330 $(motif_other_files)\
|
428
|
331 libextcli_Xt.a libextcli_Xlib.a\
|
1330
|
332 $(shared_other_files)
|
428
|
333
|
|
334 # endif /* EXTERNAL_WIDGET */
|
|
335
|
|
336 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
337 dnd_objs = @dnd_objs@
|
|
338 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
339
|
|
340 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
|
341 #endif /* HAVE_X_WINDOWS */
|
|
342
|
|
343 ## define otherobjs as list of object files that make-docfile
|
|
344 ## should not be told about.
|
|
345 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
|
346 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
347 othersrcs = $(otherobjs:.o=.c)
|
|
348
|
1330
|
349 LIBES = $(lwlib_lib) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
428
|
350
|
|
351 #ifdef I18N3
|
1330
|
352 mo_file = $(LIB_SRC)/emacs.mo
|
428
|
353 #endif
|
|
354
|
1315
|
355 #########################################################################
|
1330
|
356 ## Implicit rules ##
|
|
357 #########################################################################
|
1315
|
358
|
1330
|
359 ## For performance and consistency, no built-in rules.
|
|
360 .SUFFIXES:
|
|
361 .SUFFIXES: .c .h .o .i .s .dep
|
|
362
|
|
363 ## -Demacs is needed to make some files produce the correct version
|
|
364 ## for use in Emacs.
|
|
365
|
|
366 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
|
367 cflags = $(CFLAGS) $(cppflags)
|
|
368 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
|
369 ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
|
|
370 # if defined (CYGWIN)
|
|
371 ldflags += -Wl,--script=s/cygwin.sc
|
|
372 # endif
|
|
373 #else
|
|
374 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
|
375 #endif
|
|
376
|
|
377 #ifdef SOLARIS2
|
|
378 %.o : %.c
|
|
379 #else
|
|
380 .c.o:
|
|
381 #endif
|
|
382 $(CC) -c $(cflags) $<
|
1315
|
383
|
1330
|
384 ## Create preprocessor output (debugging purposes only)
|
|
385 .c.i:
|
|
386 #ifdef __GNUC__
|
|
387 $(CC) -E $(cppflags) -o $@ $<
|
|
388 #else /* works on Solaris; what about other systems? */
|
|
389 $(CC) -P $(cppflags) $<
|
|
390 #endif /* compiler */
|
|
391
|
|
392 ## Create assembler output (debugging purposes only)
|
|
393 .c.s:
|
|
394 $(CC) -S -c $(cflags) $<
|
|
395
|
|
396 ## Create RTL files
|
|
397 %.c.rtl : %.c
|
|
398 $(CC) -dr -c $(cflags) $<
|
|
399
|
|
400 #########################################################################
|
|
401 ## Primary rebuilding process ##
|
|
402 #########################################################################
|
|
403
|
|
404 #ifdef PDUMP
|
|
405 DUMP_TARGET = $(PROGNAME).dmp
|
|
406 RAW_EXE = $(PROGNAME)
|
|
407 DUMP_ID = dump-id.o
|
|
408 #else
|
|
409 DUMP_TARGET = $(PROGNAME)
|
|
410 RAW_EXE = temacs
|
|
411 #endif
|
|
412
|
|
413 DO_TEMACS = $(DUMPENV) ./$(RAW_EXE)
|
|
414 DO_XEMACS = ./$(PROGNAME)
|
1315
|
415
|
|
416 BATCH = -no-packages -batch
|
|
417 BATCH_PACKAGES = -vanilla -batch
|
|
418 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
|
|
419 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
|
|
420 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
|
|
421 temacs_loadup_args = -l $(LISP)/loadup.el
|
|
422 dump_temacs_args = $(temacs_loadup_args) dump
|
|
423 run_temacs_args = $(temacs_loadup_args) run-temacs
|
|
424 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
|
|
425
|
|
426 ## Compile, dump, and make sure all .elc files are up-to-date.
|
|
427
|
1330
|
428 ## NOTE NOTE NOTE: There appears to be a fundamental but non-obvious
|
|
429 ## difference between the way that standard `make', GNU Make, and `nmake'
|
|
430 ## handle dependencies, and this means we have to write the dependencies in
|
|
431 ## Makefile.in.in and xemacs.mak differently. To illustrate this, consider
|
|
432 ## the following first:
|
|
433
|
|
434 ##.PHONY: all (`make' only)
|
|
435 ## all: test.exe
|
|
436 ##
|
|
437 ##.PHONY: FRC.test.c (`make' only)
|
|
438 ##FRC.test.c:
|
|
439 ##
|
|
440 ##test.c: FRC.test.c
|
|
441 ## if test ! -f foo ; then touch test.c; fi (`make' only)
|
|
442 ## if not exist foo touch test.c (`nmake' only)
|
|
443 ##
|
|
444 ##test.obj: test.c
|
|
445 ## touch test.obj
|
|
446 ##
|
|
447 ##test.exe: test.obj
|
|
448 ## touch test.exe
|
|
449
|
|
450 ## (GNU Make doesn't need the .PHONY declarations, but evidently some versions
|
|
451 ## of `make' do. nmake doesn't need them and doesn't allow them, either.)
|
|
452
|
|
453 ## Running `make' rebuilds test.exe only if `foo' doesn't exist.
|
|
454 ## Running `nmake -f Makefile' rebuilds it regardless.
|
|
455
|
|
456 ## Both conclude that test.c needs to be rebuilt since its dependent is
|
|
457 ## non-existent. But `make' recalculates its dependencies after running
|
|
458 ## the commands for test.c, and notices that test.c hasn't changed, and
|
|
459 ## thus test.obj and test.exe are up-to-date. `nmake' doesn't.
|
|
460
|
|
461 ## On the other hand, consider the following:
|
428
|
462
|
1330
|
463 ##.PHONY: all (`make' only)
|
|
464 ##all: check-foo test.exe
|
|
465 ##
|
|
466 ##.PHONY: check-foo (`make' only)
|
|
467 ##check-foo:
|
|
468 ## if test ! -f foo; then touch test.c; fi (`make' only)
|
|
469 ## if not exist foo touch test.c (`nmake' only)
|
|
470 ##
|
|
471 ##test.c:
|
|
472 ## touch test.c
|
|
473 ##
|
|
474 ##test.obj: test.c
|
|
475 ## touch test.obj
|
|
476 ##
|
|
477 ##test.exe: test.c test.obj
|
|
478 ## touch test.exe
|
|
479 ##
|
1315
|
480
|
1330
|
481 ## Running `nmake -f Makefile' (and `GNU make') rebuilds test.exe only if
|
|
482 ## `foo' doesn't exist.
|
|
483 ## Running some versions of non-GNU `make' does nothing at all once test.c,
|
|
484 ## test.obj and test.exe all exist.
|
|
485
|
|
486 ## It appears that `nmake' doesn't check dependencies for test.exe until it
|
|
487 ## actually needs to be rebuilt, so this "sideways" dependency script
|
|
488 ## works. GNU make evidently recalculates *all* dependencies after each
|
|
489 ## command so has no problem, either. But some makes apparently calculate
|
|
490 ## all dependencies at startup and then, after executing a command to build
|
|
491 ## a dependency, only recheck relationships involving that particular
|
|
492 ## dependency.
|
|
493
|
|
494 ## In XEmacs-land, the above situation exists wrt the `NEEDTODUMP'
|
|
495 ## dependency, recalculated by `update-elc.el'. Thus, Makefile.in.in must
|
|
496 ## use the method #1 above, and nmake must use method #2.
|
|
497
|
|
498 ## -ben
|
|
499
|
|
500 .PHONY: build-the-mofo
|
|
501 build-the-mofo: $(DUMP_TARGET) $(mo_file) $(other_files) update-elc-2 $(LISP)/finder-inf.el load-shadows
|
|
502 .NO_PARALLEL: $(DUMP_TARGET) update-elc-2 $(LISP)/finder-inf.el load-shadows
|
1315
|
503
|
|
504 release: all
|
|
505 -if [ -w $(LISP) ]; then \
|
1330
|
506 w=`pwd`; cd $(SRC) && $$w/$(RAW_EXE) -nd $(BATCH) -l $(LISP)/inc-vers; \
|
428
|
507 else true; fi
|
1330
|
508 -$(dump_temacs)
|
428
|
509 touch release
|
1315
|
510
|
|
511 ## Update out-of-date .elcs, other than needed for dumping.
|
1330
|
512 .PHONY: update-elc-2
|
|
513 update-elc-2:
|
1315
|
514 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
|
428
|
515
|
1330
|
516 $(LISP)/finder-inf.el:
|
1315
|
517 @echo "Building finder database ..."
|
1330
|
518 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
|
1315
|
519 -l finder -f finder-compile-keywords
|
|
520 @echo "Building finder database ...(done)"
|
|
521
|
1330
|
522 .PHONY: load-shadows
|
|
523 load-shadows:
|
1315
|
524 #ifndef QUICK_BUILD
|
|
525 @echo "Testing for Lisp shadows ..."
|
|
526 @$(XEMACS_BATCH) -f list-load-path-shadows
|
|
527 #endif
|
|
528
|
1330
|
529 .PHONY: FRC.needtodump
|
|
530 FRC.needtodump:
|
|
531
|
1315
|
532 ## This file is touched by update-elc.el when redumping is necessary.
|
1330
|
533 ## We use $(BLDSRC) == `.' here to help keep sync with nt/xemacs.mak,
|
|
534 ## where $(BLDSRC) is not `.'.
|
|
535 $(BLDSRC)/NEEDTODUMP: FRC.needtodump
|
|
536 $(TEMACS_BATCH) -l $(LISP)/update-elc.el
|
1315
|
537
|
1330
|
538 $(DUMP_TARGET): $(RAW_EXE) $(BLDSRC)/NEEDTODUMP $(LIB_SRC)/DOC
|
428
|
539 #ifdef HEAP_IN_DATA
|
442
|
540 @$(RM) $@ && touch SATISFIED
|
1330
|
541 $(dump_temacs)
|
1315
|
542 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \
|
|
543 $(RECURSIVE_MAKE) $@; fi
|
428
|
544 #else
|
442
|
545 @$(RM) $@
|
1330
|
546 $(dump_temacs)
|
428
|
547 #endif
|
|
548
|
1330
|
549 #ifdef HAVE_X_WINDOWS
|
|
550 lwlib_deps = $(lwlib_lib)
|
|
551 $(lwlib_lib):
|
|
552 cd ../lwlib && $(RECURSIVE_MAKE)
|
|
553 #endif /* HAVE_X_WINDOWS */
|
|
554
|
428
|
555 #ifdef DYNODUMP
|
|
556 dynodump_deps = ../dynodump/dynodump.so
|
|
557 ../dynodump/dynodump.so:
|
|
558 cd ../dynodump && $(RECURSIVE_MAKE)
|
|
559 #endif /* DYNODUMP */
|
|
560
|
1330
|
561 link_deps = $(start_files) $(objs) $(otherobjs) $(lwlib_deps) $(dynodump_deps)
|
1315
|
562
|
1330
|
563 temacs_deps = $(link_deps) $(DUMP_ID)
|
1315
|
564
|
|
565 temacs_link_args = \
|
1330
|
566 $(start_flags) $(ldflags) \
|
|
567 -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES)
|
1315
|
568
|
1330
|
569 $(RAW_EXE): $(temacs_deps)
|
1315
|
570 $(LD) $(temacs_link_args)
|
|
571
|
1330
|
572 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps)
|
|
573 $(LIB_SRC)/make-dump-id
|
1315
|
574
|
|
575 obj_src = $(objs:.o=.c)
|
|
576
|
1330
|
577 $(LIB_SRC)/DOC: $(LIB_SRC)/make-docfile $(BLDSRC)/NEEDTODUMP $(temacs_deps)
|
1303
|
578 #ifdef QUICK_BUILD
|
|
579 if test ! -f $@ ; then \
|
|
580 #else
|
|
581 if true ; then \
|
|
582 #endif
|
1315
|
583 $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \
|
1330
|
584 -o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \
|
|
585 $(obj_src) $(mallocdocsrc) $(rallocdocsrc) \
|
|
586 $(extra_doc_files) ; fi
|
428
|
587
|
1330
|
588 $(LIB_SRC)/make-dump-id:
|
|
589 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-dump-id
|
1315
|
590
|
1330
|
591 $(LIB_SRC)/make-docfile:
|
|
592 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-docfile
|
428
|
593
|
1315
|
594 .PHONY: fastdump
|
1330
|
595 fastdump: $(RAW_EXE)
|
|
596 @$(RM) $(DUMP_TARGET) && touch SATISFIED
|
|
597 -$(dump_temacs)
|
1315
|
598 @$(XEMACS_BATCH) -f list-load-path-shadows
|
428
|
599
|
1315
|
600 .PHONY: all-elc
|
|
601 all-elc:
|
|
602 cd .. && $(RECURSIVE_MAKE)
|
|
603
|
|
604 #########################################################################
|
1330
|
605 ## Subsidiary dependency rules ##
|
|
606 #########################################################################
|
428
|
607
|
|
608 #ifdef I18N3
|
|
609
|
|
610 # if defined(SPARC) && !defined(USG)
|
|
611 xgettext= /usr/openwin/bin/xgettext
|
|
612 xgettext_args= -o emacs -m_X messages
|
|
613 msgfmt= /usr/openwin/bin/msgfmt
|
|
614 # else
|
|
615 xgettext= xgettext
|
|
616 xgettext_args= -s -d emacs -M_X messages
|
|
617 msgfmt= msgfmt
|
|
618 #endif
|
|
619
|
1330
|
620 $(LIB_SRC)/emacs.po: $(LIB_SRC)/make-msgfile $(LIB_SRC)/make-po $(objs)
|
|
621 $(LIB_SRC)/make-msgfile -o $(LIB_SRC)/messages $(objs)
|
|
622 cd $(LIB_SRC) && $(xgettext) $(xgettext_args)
|
|
623 $(RM) $(LIB_SRC)/emacs.po
|
|
624 cd $(LIB_SRC) && $(LIB_SRC)/make-po -a $(LIB_SRC)/emacs.po DOC
|
428
|
625
|
1330
|
626 $(LIB_SRC)/emacs.mo: $(LIB_SRC)/emacs.po
|
|
627 cd $(LIB_SRC)/ && $(msgfmt) -o emacs.mo emacs.po
|
428
|
628
|
1330
|
629 $(LIB_SRC)/make-msgfile:
|
|
630 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-msgfile
|
428
|
631
|
1330
|
632 $(LIB_SRC)/make-po:
|
|
633 cd $(LIB_SRC) && $(RECURSIVE_MAKE) make-po
|
428
|
634
|
|
635 #endif /* I18N3 */
|
|
636
|
1330
|
637 TopLevelEmacsShell.o : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
638 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
639 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
640
|
1330
|
641 TopLevelEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
642 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
643 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
644
|
1330
|
645 TransientEmacsShell.o : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
646 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
647 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
648
|
1330
|
649 TransientEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
650 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c
|
428
|
651 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
652
|
442
|
653 ## The above rules are subject to a race condition if using a parallel make.
|
|
654 TransientEmacsShell.o : TopLevelEmacsShell.o
|
|
655 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
|
|
656
|
428
|
657 ## Position-independent code for shared library creation
|
|
658 #if USE_GCC
|
|
659 pic_arg = -fpic
|
|
660 #elif defined (IRIX)
|
|
661 pic_arg = -KPIC
|
|
662 # else
|
|
663 pic_arg = -K pic
|
|
664 #endif
|
|
665
|
|
666 #ifdef EXTERNAL_WIDGET
|
|
667
|
|
668 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
669 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
670 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
671 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
672 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
673 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
|
674
|
|
675 ## Add dependencies so things work right with a parallel make
|
1330
|
676 ExternalClient-Xm-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
|
677 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c
|
428
|
678 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
679
|
1330
|
680 ExternalClient-Xt-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
681 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient.c
|
428
|
682 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
683
|
1330
|
684 ExternalClient-Xlib-shared.o: $(SRC)/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
|
685 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient-Xlib.c
|
428
|
686 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
687
|
1330
|
688 ExternalClient-Xm-nonshared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
689 $(CC) -c $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c
|
428
|
690 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
691
|
1330
|
692 ExternalClient-Xt-nonshared.o: $(SRC)/ExternalClient.c
|
|
693 $(CC) -c $(cflags) $(SRC)/ExternalClient.c
|
428
|
694 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
695
|
1330
|
696 ExternalClient-Xlib-nonshared.o: $(SRC)/ExternalClient-Xlib.c
|
|
697 $(CC) -c $(cflags) $(SRC)/ExternalClient-Xlib.c
|
428
|
698 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
699
|
|
700 ## We compile the common files twice (once with PIC and once without)
|
|
701 ## because on some systems, compiling with PIC but not linking into
|
|
702 ## a shared library messes things up.
|
|
703
|
1330
|
704 extw-Xt-shared.o: $(SRC)/extw-Xt.c extw-Xt-nonshared.o
|
|
705 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xt.c
|
428
|
706 mv extw-Xt.o extw-Xt-shared.o
|
|
707
|
1330
|
708 extw-Xlib-shared.o: $(SRC)/extw-Xlib.c extw-Xlib-nonshared.o
|
|
709 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xlib.c
|
428
|
710 mv extw-Xlib.o extw-Xlib-shared.o
|
|
711
|
1330
|
712 extw-Xt-nonshared.o: $(SRC)/extw-Xt.c
|
|
713 $(CC) -c $(cflags) $(SRC)/extw-Xt.c
|
428
|
714 mv extw-Xt.o extw-Xt-nonshared.o
|
|
715
|
1330
|
716 extw-Xlib-nonshared.o: $(SRC)/extw-Xlib.c
|
|
717 $(CC) -c $(cflags) $(SRC)/extw-Xlib.c
|
428
|
718 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
719
|
1330
|
720 libextcli_Xm.a: $(external_client_motif_objs_nonshared)
|
|
721 ar r libextcli_Xm.a $(external_client_motif_objs_nonshared)
|
428
|
722
|
1330
|
723 libextcli_Xt.a: $(external_client_xt_objs_nonshared)
|
|
724 ar r libextcli_Xt.a $(external_client_xt_objs_nonshared)
|
428
|
725
|
1330
|
726 libextcli_Xlib.a: $(external_client_xlib_objs_nonshared)
|
|
727 ar r libextcli_Xlib.a $(external_client_xlib_objs_nonshared)
|
428
|
728
|
1315
|
729 ## Now we try to figure out how to link a shared library.
|
|
730 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
731 ## library will not be created.
|
|
732
|
|
733 # ifdef USE_GCC
|
|
734 # ifdef USG5
|
|
735 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
|
736 extw_link_beg = $(CC) -shared
|
|
737 extw_link_mid = -Xlinker -z -Xlinker text -o
|
|
738 extw_link_end =
|
|
739 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
|
740 # elif !defined (LINUX) || defined (__ELF__)
|
|
741 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
|
742 extw_link_beg = $(CC) -shared
|
|
743 extw_link_mid = -o
|
|
744 extw_link_end =
|
|
745 # endif
|
|
746 # elif defined (USG5)
|
|
747 # if defined (IRIX)
|
1330
|
748 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations objs -o output
|
|
749 extw_link_beg = $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations
|
1315
|
750 extw_link_mid = -o
|
|
751 extw_link_end =
|
|
752 # else /* not IRIX */
|
|
753 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
|
754 extw_link_beg = $(CC) -G
|
|
755 extw_link_mid = -z text -o
|
|
756 extw_link_end =
|
|
757 # endif /* not IRIX */
|
|
758 # else /* not USG5 */
|
|
759 # if defined (DEC_ALPHA) && defined (OSF1)
|
|
760 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
|
761 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
|
|
762 extw_link_mid = -o
|
|
763 extw_link_end = $(LIBES)
|
|
764 # else /* !(DEC_ALPHA && OSF1) */
|
|
765 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
|
766 extw_link_beg = $(LD) -dc
|
|
767 extw_link_mid = -assert pure-text -o
|
|
768 extw_link_end =
|
|
769 # endif /* !(DEC_ALPHA && OSF1) */
|
|
770 # endif /* not USG5 */
|
|
771
|
428
|
772 #ifdef EXTW_LINK
|
|
773
|
1330
|
774 libextcli_Xm.so.1: $(external_client_motif_objs_shared)
|
|
775 $(extw_link_beg) $(external_client_motif_objs_shared) $(extw_link_mid) libextcli_Xm.so.1 $(extw_link_end)
|
428
|
776
|
1330
|
777 libextcli_Xt.so.1: $(external_client_xt_objs_shared)
|
|
778 $(extw_link_beg) $(external_client_xt_objs_shared) $(extw_link_mid) libextcli_Xt.so.1 $(extw_link_end)
|
428
|
779
|
1330
|
780 libextcli_Xlib.so.1: $(external_client_xlib_objs_shared)
|
|
781 $(extw_link_beg) $(external_client_xlib_objs_shared) $(extw_link_mid) libextcli_Xlib.so.1 $(extw_link_end)
|
428
|
782
|
|
783 #endif /* EXTW_LINK */
|
|
784
|
|
785 #endif /* EXTERNAL_WIDGET */
|
|
786
|
1330
|
787 config.h: $(SRC)/config.h.in
|
|
788 Emacs.ad.h: $(ETC)/Emacs.ad
|
428
|
789
|
|
790 config.h sheap-adjust.h paths.h Emacs.ad.h :
|
|
791 @echo "The file $@ needs to be re-generated."
|
|
792 @echo "Please run a make in the top level directory."
|
|
793 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
794 @exit 1
|
|
795
|
|
796 ## Some machines have alloca built-in.
|
|
797 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
798 ## be used but generate no code.
|
|
799 ## Some have it written in assembler in alloca.s.
|
|
800 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
851
|
801 ## Nowadays we always compile in the C version and use it to avoid stack
|
|
802 ## overflow.
|
428
|
803
|
|
804 #ifdef C_ALLOCA
|
|
805 #else
|
|
806 #ifndef HAVE_ALLOCA
|
1330
|
807 allocax.o : $(SRC)/alloca.s config.h
|
428
|
808 ## $(CPP) is cc -E, which may get confused by filenames
|
|
809 ## that do not end in .c. So copy file to a safe name. */
|
1330
|
810 ## cp $(SRC)/alloca.s allocatem.c
|
428
|
811 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
812 ## since some assemblers barf on them. Use a different basename for the
|
|
813 ## output file, since some stupid compilers (Green Hill) use that
|
|
814 ## name for the intermediate assembler file.
|
|
815 $(CPP) $(cppflags) allocatem.c | \
|
|
816 sed -e 's///' -e 's/^#.*//' | \
|
|
817 sed -n -e '/^..*$$/p' > allocax.s
|
|
818 @$(RM) alloca.o
|
|
819 ## Xenix, in particular, needs to run assembler via cc.
|
|
820 $(CC) -c allocax.s
|
|
821 $(RM) allocax.s allocatem.c
|
|
822 #endif /* HAVE_ALLOCA */
|
|
823 #endif /* ! defined (C_ALLOCA) */
|
|
824
|
|
825 #ifdef HAVE_NATIVE_SOUND
|
442
|
826 sound_cflags=@sound_cflags@
|
1330
|
827 sunplay.o: $(SRC)/sunplay.c
|
|
828 $(CC) -c $(sound_cflags) $(cflags) $(SRC)/sunplay.c
|
|
829 hpplay.o: $(SRC)/hpplay.c
|
|
830 $(CC) -c -Demacs $(sound_cflags) $(cflags) $(SRC)/hpplay.c
|
428
|
831 #endif /* HAVE_NATIVE_SOUND */
|
|
832
|
462
|
833 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H)
|
|
834 glade_files=glade.c
|
|
835 #endif
|
|
836
|
|
837 #ifdef HAVE_GTK
|
|
838 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files)
|
|
839 #endif
|
|
840
|
1330
|
841 xemacs_res.o: $(SRC)/../nt/xemacs.rc
|
|
842 windres --include-dir $(SRC)/../nt -i $(SRC)/../nt/xemacs.rc -o $@
|
442
|
843
|
1315
|
844 #########################################################################
|
1330
|
845 ## Other random crap ##
|
|
846 #########################################################################
|
1315
|
847
|
|
848 dortl : $(obj_rtl) $(otherrtls)
|
|
849 echo "(defvar source-files '(" > $(LISP)/source-files.el
|
|
850 (for a in $(obj_src) $(othersrcs);do \
|
|
851 echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\
|
|
852 done)
|
|
853 echo "))" >> $(LISP)/source-files.el
|
|
854
|
1330
|
855 ###################### Lint
|
1315
|
856 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
|
857 LINTFILES= $(objs:.o=.ln)
|
|
858 LINTINCLUDES = $(cppflags)
|
|
859 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
|
860 LINTFLAGS= -fd -m -s -u -v -x
|
|
861 .PHONY: lint
|
|
862 lint: $(LINTFILES)
|
|
863 $(LINT.c) $(LINTFILES)
|
|
864
|
1330
|
865 ###################### Automated tests
|
|
866 testdir = $(SRC)/../tests/automated
|
|
867 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
|
1315
|
868
|
|
869 .PHONY: check check-temacs check-features
|
|
870 check:
|
|
871 $(DO_XEMACS) $(batch_test_emacs)
|
|
872 check-temacs:
|
|
873 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
|
|
874 check-features: all
|
|
875 $(XEMACS_BATCH) -l check-features.el
|
|
876
|
1330
|
877 ###################### Debugging targets
|
|
878
|
1315
|
879 ## None of the debugging products work with a dumped xemacs binary,
|
|
880 ## because it does unexpected things like free memory that has been
|
|
881 ## malloc'ed in a *different* process!! So we need to run these on
|
|
882 ## temacs.
|
|
883
|
|
884 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
|
|
885 rtc_patch.o:
|
|
886 rtc_patch_area -o $@
|
|
887
|
|
888 rtcmacs: $(temacs_deps) rtc_patch.o
|
1330
|
889 $(RM) $(RAW_EXE); $(RECURSIVE_MAKE) $(RAW_EXE) RTC_patch_objs=rtc_patch.o
|
|
890 mv $(RAW_EXE) rtcmacs
|
1315
|
891
|
|
892 .PHONY: run-rtcmacs
|
|
893 run-rtcmacs: rtcmacs
|
|
894 dbx -q -C -c \
|
|
895 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
896 dbxenv suppress_startup_message 5.0; \
|
|
897 ignore POLL; \
|
|
898 check -access; \
|
|
899 suppress rui; \
|
1330
|
900 runargs -nd $(BATCH) $(run_temacs_args) -vanilla; \
|
1315
|
901 run' rtcmacs
|
|
902
|
1330
|
903 debug-temacs: $(RAW_EXE)
|
|
904 -gdb $(RAW_EXE)
|
1315
|
905
|
|
906 ## Purify, Quantify, PureCoverage are software quality products from
|
|
907 ## Rational, formerly Pure Atria, formerly Pure Software.
|
|
908 ##
|
|
909 ## Purify
|
|
910 PURIFY_PROG = purify
|
|
911 PURIFY_LIBS =
|
|
912 PURIFY_FLAGS =\
|
|
913 #ifdef PDUMP
|
|
914 -search-mmaps=yes\
|
|
915 #endif
|
|
916 -chain-length=32 -ignore-signals=SIGPOLL\
|
1330
|
917 -cache-dir=$(blddir)/purecache -always-use-cache-dir=yes
|
1315
|
918
|
|
919 puremacs: $(temacs_deps)
|
|
920 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
|
1330
|
921 cp $@ $(RAW_EXE)
|
1315
|
922
|
|
923 ## Quantify
|
|
924 #ifdef QUANTIFY
|
|
925 QUANTIFY_PROG = quantify
|
|
926 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
|
|
927 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
|
|
928 cppflags += -I$(QUANTIFY_HOME)
|
|
929 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
|
|
930
|
|
931 quantmacs: $(temacs_deps)
|
|
932 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
|
1330
|
933 cp $@ $(RAW_EXE)
|
1315
|
934 #endif /* QUANTIFY */
|
|
935
|
|
936 PURECOV_PROG=purecov
|
|
937 covmacs: $(temacs_deps)
|
|
938 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
428
|
939
|
1330
|
940 ###################### Clean
|
|
941
|
428
|
942 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
|
943 mostlyclean:
|
1330
|
944 $(RM) *.o *.i *.rtl *.ln core \
|
|
945 temacs puremacs quantmacs covmacs rtcmacs temacs.exe \
|
|
946 sheap-adjust.h dump-id.c $(BLDSRC)/NEEDTODUMP SATISFIED \
|
|
947 $(LIB_SRC)/*.po $(LIB_SRC)/*.mo
|
|
948 versionclean:
|
|
949 $(RM) $(RAW_EXE) $(DUMP_TARGET) $(LIB_SRC)/DOC
|
|
950 ## Remove the generated load files here; they cause lots of problems
|
|
951 ## when they don't work right.
|
428
|
952 clean: mostlyclean versionclean
|
1330
|
953 $(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \
|
|
954 $(LISP)/mule/auto-autoloads.el* $(LISP)/mule/custom-load.el* \
|
|
955 $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el*
|
428
|
956 ## This is used in making a distribution.
|
|
957 ## Do not use it on development directories!
|
|
958 distclean: clean
|
1330
|
959 $(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \
|
|
960 GNUmakefile Makefile Makefile.in TAGS $(PROGNAME).*
|
428
|
961 realclean: distclean
|
|
962 extraclean: realclean
|
|
963 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
|
964
|
1330
|
965 ###################### Lock, unlock
|
|
966
|
428
|
967 .PHONY : lock unlock
|
|
968 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
|
969 config.h.in README COPYING ChangeLog
|
|
970 unlock:
|
|
971 chmod u+w $(SOURCES)
|
|
972
|
|
973 relock:
|
|
974 chmod -w $(SOURCES)
|
|
975
|
1330
|
976 ###################### Installation
|
|
977
|
428
|
978 ## Header files for ellcc
|
|
979 #ifdef HAVE_SHLIB
|
|
980 MAKEPATH=../lib-src/make-path
|
1330
|
981 install: $(PROGNAME)
|
|
982 $(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s
|
428
|
983 -@echo "Copying include files for ellcc..."
|
|
984 -@hdir=`pwd`; \
|
1330
|
985 cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \
|
428
|
986 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \
|
|
987 (for thisdir in $$hdir; do \
|
448
|
988 cd $$thisdir && \
|
428
|
989 (hdrtars=; \
|
|
990 for hdrfile in *.h; do \
|
|
991 hdrtars="$$hdrtars $$hdrfile"; \
|
|
992 done; \
|
|
993 test -d s && hdrtars="$$hdrtars s/*"; \
|
|
994 test -d m && hdrtars="$$hdrtars m/*"; \
|
|
995 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
|
1330
|
996 (cd $(archlibdir)/include && umask 022 && tar xf -); \
|
|
997 chmod 755 $(archlibdir)/include; \
|
|
998 test -d $(archlibdir)/include/s && \
|
|
999 chmod 755 $(archlibdir)/include/s; \
|
|
1000 test -d $(archlibdir)/include/m && \
|
|
1001 chmod 755 $(archlibdir)/include/s;) \
|
428
|
1002 done)
|
|
1003 #endif
|
|
1004
|
1330
|
1005 ###################### Dependencies
|
|
1006
|
428
|
1007 ## Dependency processing using home-grown script, not makedepend
|
|
1008 .PHONY: depend
|
|
1009 FRC.depend:
|
|
1010 depend: FRC.depend
|
1330
|
1011 cd $(SRC) && $(RM) depend.tmp && \
|
428
|
1012 perl ./make-src-depend > depend.tmp && \
|
|
1013 if cmp -s depend depend.tmp; \
|
|
1014 then $(RM) depend.tmp; \
|
|
1015 else $(RM) depend && mv depend.tmp depend; \
|
|
1016 fi
|
1330
|
1017
|
|
1018 ###################### Unicode encapsulation
|
|
1019
|
|
1020 .PHONY: unicode-encapsulate
|
|
1021 FRC.unicode-encapsulate:
|
|
1022 unicode-encapsulate: FRC.unicode-encapsulate
|
|
1023 cd $(SRC) && \
|
|
1024 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
|