Mercurial > hg > xemacs-beta
annotate src/Makefile.in.in @ 4907:9e7f5a77cc84
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 01 Feb 2010 01:05:28 -0600 |
parents | 03ab78e48ef6 |
children | a6c778975d7d e813cf16c015 |
rev | line source |
---|---|
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. | |
3062 | 6 ## Copyright (C) 2001, 2002, 2003, 2005 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 | |
2427 | 36 RECURSIVE_MAKE_ARGS= |
428 | 37 #else |
38 @SET_MAKE@ | |
2427 | 39 RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@ |
428 | 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@ | |
1889 | 49 CFLAGS=@XE_CFLAGS@ |
428 | 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 | |
3094 | 136 #ifdef USE_XFT |
3354 | 137 x_objs += font-mgr.o |
3094 | 138 #endif |
771 | 139 x_gui_objs=$(gui_objs:.o=-x.o) |
140 #ifdef HAVE_TOOLBARS | |
141 x_gui_objs += toolbar-common.o | |
142 #endif | |
143 #endif | |
144 | |
145 #ifdef HAVE_MS_WINDOWS | |
146 mswindows_objs=console-msw.o device-msw.o event-msw.o frame-msw.o \ | |
147 objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o | |
148 mswindows_gui_objs=$(gui_objs:.o=-msw.o) | |
149 #endif | |
150 | |
151 #ifdef HAVE_TTY | |
152 tty_objs=console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o \ | |
153 redisplay-tty.o cm.o | |
154 #endif | |
155 | |
156 #ifdef HAVE_GTK | |
157 gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \ | |
158 objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \ | |
159 gtk-xemacs.o ui-gtk.o | |
160 gtk_gui_objs=$(gui_objs:.o=-gtk.o) | |
161 #ifdef HAVE_TOOLBARS | |
162 gtk_gui_objs += toolbar-common.o | |
163 #endif | |
164 #endif | |
165 | |
166 #ifdef HAVE_BALLOON_HELP | |
167 balloon_help_objs=balloon_help.o balloon-x.o | |
168 #endif | |
169 | |
170 #ifdef CLASH_DETECTION | |
171 clash_detection_objs=filelock.o | |
172 #endif | |
173 | |
174 #ifdef HAVE_DATABASE | |
175 database_objs=database.o | |
176 #endif | |
177 | |
178 #ifdef DEBUG_XEMACS | |
179 debug_objs=debug.o tests.o | |
180 #endif | |
181 | |
182 #ifdef HAVE_UNIXOID_EVENT_LOOP | |
183 event_unixoid_objs=event-unixoid.o | |
184 #endif | |
185 | |
186 #ifdef HAVE_GPM | |
187 gpm_objs=gpmevent.o | |
188 #endif | |
189 | |
996 | 190 #if defined(HAVE_LDAP) && !defined(HAVE_SHLIB) |
1330 | 191 ldap_objs=$(BLDMODULES)/ldap/eldap.o |
771 | 192 #endif |
193 | |
194 #ifdef MULE | |
195 mule_objs=mule-ccl.o mule-charset.o mule-coding.o | |
196 #endif | |
197 | |
2973 | 198 #if defined(HAVE_CANNA) && !defined(HAVE_SHLIB) |
3010 | 199 mule_canna_objs=$(BLDMODULES)/canna/canna_api.o |
771 | 200 #endif |
201 | |
202 #ifdef HAVE_WNN | |
203 mule_wnn_objs=mule-wnnfns.o | |
204 #endif | |
205 | |
1983 | 206 #ifdef WITH_GMP |
207 number_objs=number-gmp.o number.o | |
208 #endif | |
209 #ifdef WITH_MP | |
210 number_objs=number-mp.o number.o | |
211 #endif | |
212 | |
996 | 213 #if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB) |
1330 | 214 postgresql_objs=$(BLDMODULES)/postgresql/postgresql.o |
771 | 215 #endif |
216 | |
217 #ifdef HAVE_WIN32_PROCESSES | |
218 process_objs=process-nt.o | |
219 #elif defined (HAVE_UNIX_PROCESSES) | |
220 process_objs=process-unix.o | |
221 #endif | |
222 | |
223 #ifdef HAVE_SETITIMER | |
224 profile_objs=profile.o | |
225 #endif | |
226 | |
442 | 227 #if defined (HEAP_IN_DATA) && !defined (PDUMP) |
228 sheap_objs=sheap.o | |
229 #endif | |
230 | |
771 | 231 #ifdef HAVE_SHLIB |
1750 | 232 shlib_objs=sysdll.o |
4872
9873ea104ef6
Fix Cygwin module builds when --with-msw=no
Ben Wing <ben@xemacs.org>
parents:
4848
diff
changeset
|
233 # ifdef WIN32_ANY |
1632 | 234 export_lib=xemacs-export.o |
235 xemacs-export.o: xemacs.def | |
236 dlltool -D xemacs-${version}.exe -d $< -l xemacs-import.a -e $@ | |
237 # endif | |
771 | 238 #endif |
239 | |
240 #ifdef SUNPRO | |
241 sunpro_objs=sunpro.o | |
428 | 242 #endif |
243 | |
771 | 244 #ifdef TOOLTALK |
245 tooltalk_objs=tooltalk.o | |
246 #endif | |
247 | |
4872
9873ea104ef6
Fix Cygwin module builds when --with-msw=no
Ben Wing <ben@xemacs.org>
parents:
4848
diff
changeset
|
248 #ifdef WIN32_ANY |
771 | 249 win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \ |
250 xemacs_res.o | |
611 | 251 #endif |
252 | |
3092 | 253 #ifdef NEW_GC |
3263 | 254 new_gc_objs=mc-alloc.o vdb.o |
3092 | 255 # if defined (WIN32_ANY) || defined (VDB_WIN32) |
256 vdb_objs=vdb-win32.o | |
257 # elif defined (VDB_MACH) | |
258 vdb_objs=vdb-mach.o | |
259 # elif defined (VDB_POSIX) | |
260 vdb_objs=vdb-posix.o | |
261 # else /* VDB_FAKE */ | |
262 vdb_objs=vdb-fake.o | |
263 # endif | |
264 #endif /* NEW_GC */ | |
265 | |
428 | 266 ## lastfile must follow all files whose initialized data areas should |
267 ## be dumped as pure by dump-emacs. | |
268 | |
269 ## NOTE: The last line cannot be all macros, because make will barf | |
270 ## if they all come out null. | |
271 | |
272 objs=\ | |
851 | 273 abbrev.o alloc.o alloca.o \ |
274 $(balloon_help_objs) blocktype.o buffer.o bytecode.o \ | |
853 | 275 callint.o casefiddle.o casetab.o chartab.o \ |
851 | 276 $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \ |
277 console-stream.o\ | |
771 | 278 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\ |
851 | 279 dynarr.o \ |
1750 | 280 editfns.o elhash.o emacs.o emodules.o eval.o events.o\ |
771 | 281 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\ |
282 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \ | |
283 font-lock.o frame.o\ | |
4708
1cecc3e9f0a0
Use giflib or libungif to provide GIF support, instead of using internal
Jerry James <james@xemacs.org>
parents:
3986
diff
changeset
|
284 gc.o general.o glyphs.o glyphs-eimage.o glyphs-shared.o\ |
793 | 285 glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \ |
286 gutter.o\ | |
771 | 287 hash.o imgproc.o indent.o insdel.o intl.o\ |
288 keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\ | |
3263 | 289 $(new_gc_objs) $(vdb_objs) \ |
771 | 290 macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\ |
1983 | 291 $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) $(number_objs) objects.o\ |
292 opaque.o $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\ | |
771 | 293 rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\ |
294 search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\ | |
295 specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\ | |
296 text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\ | |
297 widget.o window.o $(win32_objs) | |
428 | 298 |
299 obj_rtl = $(objs:.o=.c.rtl) | |
300 | |
301 #ifdef REL_ALLOC | |
302 rallocdocsrc = ralloc.c | |
303 rallocobjs = ralloc.o | |
304 #endif | |
305 | |
306 malloclib = $(libmcheck) | |
307 #ifndef SYSTEM_MALLOC | |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
308 # ifdef ERROR_CHECK_MALLOC |
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
309 # ifdef DOUG_LEA_MALLOC |
428 | 310 mallocobjs = free-hook.o vm-limit.o |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
311 # else |
428 | 312 mallocobjs = gmalloc.o free-hook.o vm-limit.o |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
313 # endif |
428 | 314 mallocdocsrc = free-hook.c |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
315 # else /* GNU malloc, sans error checking */ |
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
316 # ifdef DOUG_LEA_MALLOC |
428 | 317 mallocobjs = vm-limit.o |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
318 # else |
428 | 319 mallocobjs = gmalloc.o vm-limit.o |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
320 # endif |
428 | 321 mallocdocsrc = |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
322 # endif /* ERROR_CHECK_MALLOC */ |
428 | 323 #else /* SYSTEM_MALLOC */ |
324 mallocobjs = | |
325 mallocdocsrc = | |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
326 # ifdef USE_DEBUG_MALLOC |
428 | 327 malloclib = -ldmalloc |
4735
80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
Jerry James <james@xemacs.org>
parents:
4708
diff
changeset
|
328 # endif /* USE_DEBUG_MALLOC */ |
428 | 329 #endif /* SYSTEM_MALLOC */ |
330 | |
331 #ifdef HAVE_X_WINDOWS | |
332 | |
1330 | 333 lwlib_lib = ../lwlib/liblw.a |
334 | |
428 | 335 # ifdef EXTERNAL_WIDGET |
336 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o | |
337 | |
338 # ifdef LWLIB_USES_MOTIF | |
339 # ifdef EXTW_LINK | |
340 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1 | |
341 # else | |
342 motif_other_files = libextcli_Xm.a | |
343 # endif | |
344 #endif /* LWLIB_USES_MOTIF */ | |
345 | |
346 # ifdef EXTW_LINK | |
347 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1 | |
348 # endif | |
349 other_files=\ | |
1330 | 350 $(motif_other_files)\ |
428 | 351 libextcli_Xt.a libextcli_Xlib.a\ |
1330 | 352 $(shared_other_files) |
428 | 353 |
354 # endif /* EXTERNAL_WIDGET */ | |
355 | |
4790
bc4f2511bbea
Remove support for the OffiX drag-and-drop protocol. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
4759
diff
changeset
|
356 # if defined (HAVE_CDE) |
428 | 357 dnd_objs = @dnd_objs@ |
4790
bc4f2511bbea
Remove support for the OffiX drag-and-drop protocol. See xemacs-patches
Jerry James <james@xemacs.org>
parents:
4759
diff
changeset
|
358 # endif /* HAVE_CDE */ |
428 | 359 |
360 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs) | |
361 #endif /* HAVE_X_WINDOWS */ | |
362 | |
363 ## define otherobjs as list of object files that make-docfile | |
364 ## should not be told about. | |
1632 | 365 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs) $(export_lib) |
428 | 366 otherrtls = $(otherobjs:.o=.c.rtl) |
367 othersrcs = $(otherobjs:.o=.c) | |
368 | |
1330 | 369 LIBES = $(lwlib_lib) $(malloclib) $(ld_libs_all) $(lib_gcc) |
428 | 370 |
1315 | 371 ######################################################################### |
1330 | 372 ## Implicit rules ## |
373 ######################################################################### | |
1315 | 374 |
1330 | 375 ## For performance and consistency, no built-in rules. |
376 .SUFFIXES: | |
377 .SUFFIXES: .c .h .o .i .s .dep | |
378 | |
379 ## -Demacs is needed to make some files produce the correct version | |
380 ## for use in Emacs. | |
381 | |
2958 | 382 cppflags = $(CPPFLAGS) -Demacs -I. -I$(SRC) $(c_switch_all) |
1330 | 383 cflags = $(CFLAGS) $(cppflags) |
2502 | 384 #if defined (WIN32_NATIVE) |
1330 | 385 ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags) |
386 #else | |
387 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags) | |
388 #endif | |
389 | |
390 #ifdef SOLARIS2 | |
391 %.o : %.c | |
392 #else | |
393 .c.o: | |
394 #endif | |
395 $(CC) -c $(cflags) $< | |
1315 | 396 |
1330 | 397 ## Create preprocessor output (debugging purposes only) |
398 .c.i: | |
399 #ifdef __GNUC__ | |
400 $(CC) -E $(cppflags) -o $@ $< | |
401 #else /* works on Solaris; what about other systems? */ | |
402 $(CC) -P $(cppflags) $< | |
403 #endif /* compiler */ | |
404 | |
405 ## Create assembler output (debugging purposes only) | |
406 .c.s: | |
407 $(CC) -S -c $(cflags) $< | |
408 | |
409 ## Create RTL files | |
410 %.c.rtl : %.c | |
411 $(CC) -dr -c $(cflags) $< | |
412 | |
413 ######################################################################### | |
414 ## Primary rebuilding process ## | |
415 ######################################################################### | |
416 | |
417 #ifdef PDUMP | |
418 DUMP_TARGET = $(PROGNAME).dmp | |
419 RAW_EXE = $(PROGNAME) | |
420 DUMP_ID = dump-id.o | |
2720 | 421 #if !defined(WIN32_NATIVE) && defined(DUMP_IN_EXEC) |
2015 | 422 DUMP_TARGET = $(PROGNAME) |
2388 | 423 #ifndef CYGWIN |
2015 | 424 RAW_EXE = temacs |
2388 | 425 #else |
426 RAW_EXE = temacs.exe | |
427 #endif | |
2015 | 428 #endif |
1330 | 429 #else |
430 DUMP_TARGET = $(PROGNAME) | |
431 RAW_EXE = temacs | |
432 #endif | |
433 | |
434 DO_TEMACS = $(DUMPENV) ./$(RAW_EXE) | |
435 DO_XEMACS = ./$(PROGNAME) | |
1315 | 436 |
437 BATCH = -no-packages -batch | |
438 BATCH_PACKAGES = -vanilla -batch | |
439 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH) | |
440 XEMACS_BATCH = $(DO_XEMACS) $(BATCH) | |
441 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES) | |
442 temacs_loadup_args = -l $(LISP)/loadup.el | |
443 dump_temacs_args = $(temacs_loadup_args) dump | |
444 run_temacs_args = $(temacs_loadup_args) run-temacs | |
445 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args) | |
446 | |
447 ## Compile, dump, and make sure all .elc files are up-to-date. | |
448 | |
1330 | 449 ## NOTE NOTE NOTE: There appears to be a fundamental but non-obvious |
450 ## difference between the way that standard `make', GNU Make, and `nmake' | |
451 ## handle dependencies, and this means we have to write the dependencies in | |
452 ## Makefile.in.in and xemacs.mak differently. To illustrate this, consider | |
453 ## the following first: | |
454 | |
455 ##.PHONY: all (`make' only) | |
456 ## all: test.exe | |
457 ## | |
458 ##.PHONY: FRC.test.c (`make' only) | |
459 ##FRC.test.c: | |
460 ## | |
461 ##test.c: FRC.test.c | |
462 ## if test ! -f foo ; then touch test.c; fi (`make' only) | |
463 ## if not exist foo touch test.c (`nmake' only) | |
464 ## | |
465 ##test.obj: test.c | |
466 ## touch test.obj | |
467 ## | |
468 ##test.exe: test.obj | |
469 ## touch test.exe | |
470 | |
471 ## (GNU Make doesn't need the .PHONY declarations, but evidently some versions | |
472 ## of `make' do. nmake doesn't need them and doesn't allow them, either.) | |
473 | |
474 ## Running `make' rebuilds test.exe only if `foo' doesn't exist. | |
475 ## Running `nmake -f Makefile' rebuilds it regardless. | |
476 | |
477 ## Both conclude that test.c needs to be rebuilt since its dependent is | |
478 ## non-existent. But `make' recalculates its dependencies after running | |
479 ## the commands for test.c, and notices that test.c hasn't changed, and | |
480 ## thus test.obj and test.exe are up-to-date. `nmake' doesn't. | |
481 | |
482 ## On the other hand, consider the following: | |
428 | 483 |
1330 | 484 ##.PHONY: all (`make' only) |
485 ##all: check-foo test.exe | |
486 ## | |
487 ##.PHONY: check-foo (`make' only) | |
488 ##check-foo: | |
489 ## if test ! -f foo; then touch test.c; fi (`make' only) | |
490 ## if not exist foo touch test.c (`nmake' only) | |
491 ## | |
492 ##test.c: | |
493 ## touch test.c | |
494 ## | |
495 ##test.obj: test.c | |
496 ## touch test.obj | |
497 ## | |
498 ##test.exe: test.c test.obj | |
499 ## touch test.exe | |
500 ## | |
1315 | 501 |
1330 | 502 ## Running `nmake -f Makefile' (and `GNU make') rebuilds test.exe only if |
503 ## `foo' doesn't exist. | |
504 ## Running some versions of non-GNU `make' does nothing at all once test.c, | |
505 ## test.obj and test.exe all exist. | |
506 | |
507 ## It appears that `nmake' doesn't check dependencies for test.exe until it | |
508 ## actually needs to be rebuilt, so this "sideways" dependency script | |
509 ## works. GNU make evidently recalculates *all* dependencies after each | |
510 ## command so has no problem, either. But some makes apparently calculate | |
511 ## all dependencies at startup and then, after executing a command to build | |
512 ## a dependency, only recheck relationships involving that particular | |
513 ## dependency. | |
514 | |
515 ## In XEmacs-land, the above situation exists wrt the `NEEDTODUMP' | |
516 ## dependency, recalculated by `update-elc.el'. Thus, Makefile.in.in must | |
517 ## use the method #1 above, and nmake must use method #2. | |
518 | |
519 ## -ben | |
520 | |
521 .PHONY: build-the-mofo | |
1346 | 522 build-the-mofo: update-elc-2 $(mo_file) $(other_files) $(LISP)/finder-inf.el load-shadows |
1315 | 523 |
1346 | 524 ## (1) Compile all dependencies of the XEmacs executable |
428 | 525 |
1330 | 526 #ifdef HAVE_X_WINDOWS |
527 lwlib_deps = $(lwlib_lib) | |
528 $(lwlib_lib): | |
2427 | 529 cd ../lwlib && $(MAKE) $(RECURSIVE_MAKE_ARGS) |
1330 | 530 #endif /* HAVE_X_WINDOWS */ |
531 | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
4754
diff
changeset
|
532 link_deps = $(start_files) $(objs) $(otherobjs) $(lwlib_deps) |
1315 | 533 |
1346 | 534 $(LIB_SRC)/make-dump-id: |
2427 | 535 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-dump-id |
1346 | 536 |
537 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps) | |
538 $(LIB_SRC)/make-dump-id | |
539 | |
540 ## (2) Link the XEmacs executable | |
541 | |
2720 | 542 #if !defined(PDUMP) || !defined(DUMP_IN_EXEC) || defined(WIN32_NATIVE) |
2015 | 543 $(RAW_EXE): $(link_deps) $(DUMP_ID) |
544 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES) | |
545 #else | |
546 $(RAW_EXE): $(link_deps) $(DUMP_ID) | |
547 if test -f dump-size ; then \ | |
548 $(CC) -c $(cflags) -DMAX_SIZE=`cat dump-size` $(SRC)/dump-data.c ;\ | |
549 else \ | |
550 $(CC) -c $(cflags) -DMAX_SIZE=0 $(SRC)/dump-data.c ;\ | |
551 fi | |
552 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES) | |
553 #endif | |
1315 | 554 |
1346 | 555 ## (3) Update the .elc's needed for dumping |
556 | |
557 .PHONY: FRC.needtodump | |
558 FRC.needtodump: | |
559 | |
560 ## This file is touched by update-elc.el when redumping is necessary. | |
561 ## We use $(BLDSRC) == `.' here to help keep sync with nt/xemacs.mak, | |
562 ## where $(BLDSRC) is not `.'. | |
1406 | 563 $(BLDSRC)/NEEDTODUMP: $(RAW_EXE) FRC.needtodump |
1346 | 564 $(TEMACS_BATCH) -l $(LISP)/update-elc.el |
565 | |
566 ## (4) Build the DOC file | |
1315 | 567 |
568 obj_src = $(objs:.o=.c) | |
569 | |
1346 | 570 $(LIB_SRC)/make-docfile: |
2427 | 571 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-docfile |
1346 | 572 |
1330 | 573 $(LIB_SRC)/DOC: $(LIB_SRC)/make-docfile $(BLDSRC)/NEEDTODUMP $(temacs_deps) |
1303 | 574 #ifdef QUICK_BUILD |
575 if test ! -f $@ ; then \ | |
576 #else | |
577 if true ; then \ | |
578 #endif | |
1315 | 579 $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \ |
1330 | 580 -o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \ |
581 $(obj_src) $(mallocdocsrc) $(rallocdocsrc) \ | |
582 $(extra_doc_files) ; fi | |
428 | 583 |
1346 | 584 ## (5) Dump |
585 | |
586 $(DUMP_TARGET): $(RAW_EXE) $(BLDSRC)/NEEDTODUMP $(LIB_SRC)/DOC | |
587 #ifdef HEAP_IN_DATA | |
588 @$(RM) $@ && touch SATISFIED | |
589 $(dump_temacs) | |
590 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ | |
2427 | 591 $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; fi |
1346 | 592 #else |
593 @$(RM) $@ | |
594 $(dump_temacs) | |
595 #endif | |
2720 | 596 #if defined(PDUMP) && defined(DUMP_IN_EXEC) && !defined(WIN32_NATIVE) |
2015 | 597 if test -f dump-size; then \ |
598 $(LIB_SRC)/insert-data-in-exec $(RAW_EXE) $(DUMP_TARGET).dmp $(DUMP_TARGET) `$(DO_TEMACS) -si`; \ | |
599 ret=$$? ; \ | |
600 if test $${ret} -eq 2; then \ | |
601 $(RM) dump-size ; \ | |
602 else \ | |
603 if test $${ret} -eq 1; then \ | |
604 exit 1; \ | |
605 else \ | |
606 chmod +x $(DUMP_TARGET) ; \ | |
607 fi ; \ | |
608 fi ; \ | |
609 fi | |
2644 | 610 if test ! -f dump-size; then \ |
2015 | 611 $(LIB_SRC)/insert-data-in-exec -s $(DUMP_TARGET).dmp > dump-size ; \ |
612 $(RM) dump-data.o $(DUMP_TARGET) $(DUMP_TARGET).dmp $(RAW_EXE);\ | |
2427 | 613 $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; \ |
2015 | 614 fi |
615 #endif | |
1346 | 616 |
617 ## (6) Update the remaining .elc's, post-dumping | |
618 | |
619 .PHONY: update-elc-2 | |
620 update-elc-2: $(DUMP_TARGET) | |
621 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) | |
622 | |
623 ## (7) Other random stuff | |
1315 | 624 |
1346 | 625 $(LISP)/finder-inf.el: update-elc-2 |
626 @echo "Building finder database ..." | |
2027 | 627 $(RM) $(LISP)/finder-inf.el |
1346 | 628 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ |
3986 | 629 -eval "(setq lisp-directory \"$(LISP)\")" \ |
1346 | 630 -l finder -f finder-compile-keywords |
631 @echo "Building finder database ...(done)" | |
632 | |
633 .PHONY: load-shadows | |
634 load-shadows: update-elc-2 | |
635 #ifndef QUICK_BUILD | |
636 @echo "Testing for Lisp shadows ..." | |
637 @$(XEMACS_BATCH) -f list-load-path-shadows | |
638 #endif | |
639 | |
640 ###################### Misc targets | |
641 | |
642 release: all | |
643 -if [ -w $(LISP) ]; then \ | |
644 w=`pwd`; cd $(SRC) && $$w/$(RAW_EXE) -nd $(BATCH) -l $(LISP)/inc-vers; \ | |
645 else true; fi | |
646 -$(dump_temacs) | |
647 touch release | |
428 | 648 |
1315 | 649 .PHONY: fastdump |
1330 | 650 fastdump: $(RAW_EXE) |
651 @$(RM) $(DUMP_TARGET) && touch SATISFIED | |
652 -$(dump_temacs) | |
1315 | 653 @$(XEMACS_BATCH) -f list-load-path-shadows |
428 | 654 |
1315 | 655 .PHONY: all-elc |
656 all-elc: | |
2427 | 657 cd .. && $(MAKE) $(RECURSIVE_MAKE_ARGS) |
1315 | 658 |
659 ######################################################################### | |
1330 | 660 ## Subsidiary dependency rules ## |
661 ######################################################################### | |
428 | 662 |
1330 | 663 TopLevelEmacsShell.o : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h |
664 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 665 mv EmacsShell-sub.o TopLevelEmacsShell.o |
666 | |
1330 | 667 TopLevelEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h |
668 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 669 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl |
670 | |
1330 | 671 TransientEmacsShell.o : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h |
672 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 673 mv EmacsShell-sub.o TransientEmacsShell.o |
674 | |
1330 | 675 TransientEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h |
676 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 677 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl |
678 | |
442 | 679 ## The above rules are subject to a race condition if using a parallel make. |
680 TransientEmacsShell.o : TopLevelEmacsShell.o | |
681 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl | |
682 | |
428 | 683 ## Position-independent code for shared library creation |
684 #if USE_GCC | |
685 pic_arg = -fpic | |
686 #elif defined (IRIX) | |
687 pic_arg = -KPIC | |
688 # else | |
689 pic_arg = -K pic | |
690 #endif | |
691 | |
692 #ifdef EXTERNAL_WIDGET | |
693 | |
694 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o | |
695 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o | |
696 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o | |
697 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o | |
698 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o | |
699 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o | |
700 | |
701 ## Add dependencies so things work right with a parallel make | |
1330 | 702 ExternalClient-Xm-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o |
703 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c | |
428 | 704 mv ExternalClient.o ExternalClient-Xm-shared.o |
705 | |
1330 | 706 ExternalClient-Xt-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o |
707 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient.c | |
428 | 708 mv ExternalClient.o ExternalClient-Xt-shared.o |
709 | |
1330 | 710 ExternalClient-Xlib-shared.o: $(SRC)/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o |
711 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient-Xlib.c | |
428 | 712 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o |
713 | |
1330 | 714 ExternalClient-Xm-nonshared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o |
715 $(CC) -c $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c | |
428 | 716 mv ExternalClient.o ExternalClient-Xm-nonshared.o |
717 | |
1330 | 718 ExternalClient-Xt-nonshared.o: $(SRC)/ExternalClient.c |
719 $(CC) -c $(cflags) $(SRC)/ExternalClient.c | |
428 | 720 mv ExternalClient.o ExternalClient-Xt-nonshared.o |
721 | |
1330 | 722 ExternalClient-Xlib-nonshared.o: $(SRC)/ExternalClient-Xlib.c |
723 $(CC) -c $(cflags) $(SRC)/ExternalClient-Xlib.c | |
428 | 724 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o |
725 | |
726 ## We compile the common files twice (once with PIC and once without) | |
727 ## because on some systems, compiling with PIC but not linking into | |
728 ## a shared library messes things up. | |
729 | |
1330 | 730 extw-Xt-shared.o: $(SRC)/extw-Xt.c extw-Xt-nonshared.o |
731 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xt.c | |
428 | 732 mv extw-Xt.o extw-Xt-shared.o |
733 | |
1330 | 734 extw-Xlib-shared.o: $(SRC)/extw-Xlib.c extw-Xlib-nonshared.o |
735 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xlib.c | |
428 | 736 mv extw-Xlib.o extw-Xlib-shared.o |
737 | |
1330 | 738 extw-Xt-nonshared.o: $(SRC)/extw-Xt.c |
739 $(CC) -c $(cflags) $(SRC)/extw-Xt.c | |
428 | 740 mv extw-Xt.o extw-Xt-nonshared.o |
741 | |
1330 | 742 extw-Xlib-nonshared.o: $(SRC)/extw-Xlib.c |
743 $(CC) -c $(cflags) $(SRC)/extw-Xlib.c | |
428 | 744 mv extw-Xlib.o extw-Xlib-nonshared.o |
745 | |
1330 | 746 libextcli_Xm.a: $(external_client_motif_objs_nonshared) |
747 ar r libextcli_Xm.a $(external_client_motif_objs_nonshared) | |
428 | 748 |
1330 | 749 libextcli_Xt.a: $(external_client_xt_objs_nonshared) |
750 ar r libextcli_Xt.a $(external_client_xt_objs_nonshared) | |
428 | 751 |
1330 | 752 libextcli_Xlib.a: $(external_client_xlib_objs_nonshared) |
753 ar r libextcli_Xlib.a $(external_client_xlib_objs_nonshared) | |
428 | 754 |
1315 | 755 ## Now we try to figure out how to link a shared library. |
756 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared | |
757 ## library will not be created. | |
758 | |
759 # ifdef USE_GCC | |
760 # ifdef USG5 | |
761 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output | |
762 extw_link_beg = $(CC) -shared | |
763 extw_link_mid = -Xlinker -z -Xlinker text -o | |
764 extw_link_end = | |
765 ## I cannot figure out how to do shared a.out libraries, so just punt. | |
766 # elif !defined (LINUX) || defined (__ELF__) | |
767 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output | |
768 extw_link_beg = $(CC) -shared | |
769 extw_link_mid = -o | |
770 extw_link_end = | |
771 # endif | |
772 # elif defined (USG5) | |
773 # if defined (IRIX) | |
1330 | 774 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations objs -o output |
775 extw_link_beg = $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations | |
1315 | 776 extw_link_mid = -o |
777 extw_link_end = | |
778 # else /* not IRIX */ | |
779 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output | |
780 extw_link_beg = $(CC) -G | |
781 extw_link_mid = -z text -o | |
782 extw_link_end = | |
783 # endif /* not IRIX */ | |
784 # else /* not USG5 */ | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
4754
diff
changeset
|
785 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output |
1315 | 786 extw_link_beg = $(LD) -dc |
787 extw_link_mid = -assert pure-text -o | |
788 extw_link_end = | |
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 $(CC) -c allocax.s | |
839 $(RM) allocax.s allocatem.c | |
840 #endif /* HAVE_ALLOCA */ | |
841 #endif /* ! defined (C_ALLOCA) */ | |
842 | |
843 #ifdef HAVE_NATIVE_SOUND | |
442 | 844 sound_cflags=@sound_cflags@ |
1330 | 845 sunplay.o: $(SRC)/sunplay.c |
846 $(CC) -c $(sound_cflags) $(cflags) $(SRC)/sunplay.c | |
847 hpplay.o: $(SRC)/hpplay.c | |
848 $(CC) -c -Demacs $(sound_cflags) $(cflags) $(SRC)/hpplay.c | |
428 | 849 #endif /* HAVE_NATIVE_SOUND */ |
850 | |
462 | 851 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H) |
852 glade_files=glade.c | |
853 #endif | |
854 | |
855 #ifdef HAVE_GTK | |
856 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files) | |
857 #endif | |
858 | |
1330 | 859 xemacs_res.o: $(SRC)/../nt/xemacs.rc |
860 windres --include-dir $(SRC)/../nt -i $(SRC)/../nt/xemacs.rc -o $@ | |
442 | 861 |
1315 | 862 ######################################################################### |
1330 | 863 ## Other random crap ## |
864 ######################################################################### | |
1315 | 865 |
866 dortl : $(obj_rtl) $(otherrtls) | |
867 echo "(defvar source-files '(" > $(LISP)/source-files.el | |
868 (for a in $(obj_src) $(othersrcs);do \ | |
869 echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\ | |
870 done) | |
871 echo "))" >> $(LISP)/source-files.el | |
872 | |
1330 | 873 ###################### Lint |
1315 | 874 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) |
875 LINTFILES= $(objs:.o=.ln) | |
876 LINTINCLUDES = $(cppflags) | |
877 ## LINTFLAGS= -fd -m -p -s -u -v -x | |
878 LINTFLAGS= -fd -m -s -u -v -x | |
879 .PHONY: lint | |
880 lint: $(LINTFILES) | |
881 $(LINT.c) $(LINTFILES) | |
882 | |
1330 | 883 ###################### Automated tests |
884 testdir = $(SRC)/../tests/automated | |
885 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) | |
1315 | 886 |
887 .PHONY: check check-temacs check-features | |
888 check: | |
889 $(DO_XEMACS) $(batch_test_emacs) | |
890 check-temacs: | |
891 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs) | |
892 check-features: all | |
893 $(XEMACS_BATCH) -l check-features.el | |
894 | |
1330 | 895 ###################### Debugging targets |
896 | |
1315 | 897 ## None of the debugging products work with a dumped xemacs binary, |
898 ## because it does unexpected things like free memory that has been | |
899 ## malloc'ed in a *different* process!! So we need to run these on | |
900 ## temacs. | |
901 | |
902 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx | |
903 rtc_patch.o: | |
904 rtc_patch_area -o $@ | |
905 | |
906 rtcmacs: $(temacs_deps) rtc_patch.o | |
2427 | 907 $(RM) $(RAW_EXE); $(MAKE) $(RECURSIVE_MAKE_ARGS) $(RAW_EXE) RTC_patch_objs=rtc_patch.o |
1330 | 908 mv $(RAW_EXE) rtcmacs |
1315 | 909 |
910 .PHONY: run-rtcmacs | |
911 run-rtcmacs: rtcmacs | |
912 dbx -q -C -c \ | |
913 'dbxenv rtc_error_log_file_name /dev/fd/1; \ | |
914 dbxenv suppress_startup_message 5.0; \ | |
915 ignore POLL; \ | |
916 check -access; \ | |
917 suppress rui; \ | |
1330 | 918 runargs -nd $(BATCH) $(run_temacs_args) -vanilla; \ |
1315 | 919 run' rtcmacs |
920 | |
1330 | 921 debug-temacs: $(RAW_EXE) |
922 -gdb $(RAW_EXE) | |
1315 | 923 |
924 ## Purify, Quantify, PureCoverage are software quality products from | |
925 ## Rational, formerly Pure Atria, formerly Pure Software. | |
926 ## | |
927 ## Purify | |
928 PURIFY_PROG = purify | |
929 PURIFY_LIBS = | |
930 PURIFY_FLAGS =\ | |
931 #ifdef PDUMP | |
932 -search-mmaps=yes\ | |
933 #endif | |
934 -chain-length=32 -ignore-signals=SIGPOLL\ | |
1330 | 935 -cache-dir=$(blddir)/purecache -always-use-cache-dir=yes |
1315 | 936 |
937 puremacs: $(temacs_deps) | |
938 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) | |
1330 | 939 cp $@ $(RAW_EXE) |
1315 | 940 |
941 ## Quantify | |
942 #ifdef QUANTIFY | |
943 QUANTIFY_PROG = quantify | |
944 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` | |
945 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes | |
946 cppflags += -I$(QUANTIFY_HOME) | |
947 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a | |
948 | |
949 quantmacs: $(temacs_deps) | |
950 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) | |
1330 | 951 cp $@ $(RAW_EXE) |
1315 | 952 #endif /* QUANTIFY */ |
953 | |
954 PURECOV_PROG=purecov | |
955 covmacs: $(temacs_deps) | |
956 $(PURECOV_PROG) $(LD) $(temacs_link_args) | |
428 | 957 |
1330 | 958 ###################### Clean |
959 | |
428 | 960 .PHONY: mostlyclean clean distclean realclean versionclean extraclean |
3062 | 961 .PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig |
428 | 962 mostlyclean: |
3083 | 963 -$(RM) *.o *.i *.rtl *.ln core \ |
1330 | 964 temacs puremacs quantmacs covmacs rtcmacs temacs.exe \ |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
965 sheap-adjust.h dump-id.c dump-size $(BLDSRC)/NEEDTODUMP SATISFIED \ |
1330 | 966 $(LIB_SRC)/*.po $(LIB_SRC)/*.mo |
967 versionclean: | |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
968 -$(RM) $(RAW_EXE) $(DUMP_TARGET) $(DUMP_TARGET).dmp $(LIB_SRC)/DOC |
1330 | 969 ## Remove the generated load files here; they cause lots of problems |
970 ## when they don't work right. | |
428 | 971 clean: mostlyclean versionclean |
3083 | 972 -$(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \ |
1330 | 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! | |
3062 | 977 distclean-noconfig: clean |
3083 | 978 -$(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \ |
3062 | 979 TAGS xemacs.def xemacs.def.in |
980 ## This is used in making a distribution. | |
981 ## Do not use it on development directories! | |
982 distclean: distclean-noconfig | |
3083 | 983 -$(RM) GNUmakefile Makefile Makefile.in |
3062 | 984 realclean-noconfig: distclean-noconfig |
428 | 985 realclean: distclean |
3062 | 986 extraclean-noconfig: realclean-noconfig |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
987 -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt |
428 | 988 extraclean: realclean |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
989 -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt |
428 | 990 |
1330 | 991 ###################### Lock, unlock |
992 | |
428 | 993 .PHONY : lock unlock |
994 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \ | |
995 config.h.in README COPYING ChangeLog | |
996 unlock: | |
997 chmod u+w $(SOURCES) | |
998 | |
999 relock: | |
1000 chmod -w $(SOURCES) | |
1001 | |
1330 | 1002 ###################### Installation |
1003 | |
428 | 1004 ## Header files for ellcc |
1005 #ifdef HAVE_SHLIB | |
1006 MAKEPATH=../lib-src/make-path | |
1330 | 1007 install: $(PROGNAME) |
1008 $(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s | |
428 | 1009 -@echo "Copying include files for ellcc..." |
1010 -@hdir=`pwd`; \ | |
1330 | 1011 cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \ |
428 | 1012 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \ |
1013 (for thisdir in $$hdir; do \ | |
448 | 1014 cd $$thisdir && \ |
428 | 1015 (hdrtars=; \ |
1016 for hdrfile in *.h; do \ | |
1017 hdrtars="$$hdrtars $$hdrfile"; \ | |
1018 done; \ | |
1019 test -d s && hdrtars="$$hdrtars s/*"; \ | |
1020 test -d m && hdrtars="$$hdrtars m/*"; \ | |
1021 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \ | |
1330 | 1022 (cd $(archlibdir)/include && umask 022 && tar xf -); \ |
1023 chmod 755 $(archlibdir)/include; \ | |
1024 test -d $(archlibdir)/include/s && \ | |
1025 chmod 755 $(archlibdir)/include/s; \ | |
1026 test -d $(archlibdir)/include/m && \ | |
1027 chmod 755 $(archlibdir)/include/s;) \ | |
428 | 1028 done) |
1029 #endif | |
1030 | |
1330 | 1031 ###################### Dependencies |
1032 | |
428 | 1033 ## Dependency processing using home-grown script, not makedepend |
1034 .PHONY: depend | |
1035 FRC.depend: | |
1036 depend: FRC.depend | |
1330 | 1037 cd $(SRC) && $(RM) depend.tmp && \ |
428 | 1038 perl ./make-src-depend > depend.tmp && \ |
1039 if cmp -s depend depend.tmp; \ | |
1040 then $(RM) depend.tmp; \ | |
1041 else $(RM) depend && mv depend.tmp depend; \ | |
1042 fi | |
1330 | 1043 |
1044 ###################### Unicode encapsulation | |
1045 | |
1046 .PHONY: unicode-encapsulate | |
1047 FRC.unicode-encapsulate: | |
1048 unicode-encapsulate: FRC.unicode-encapsulate | |
1049 cd $(SRC) && \ | |
1050 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 |