Mercurial > hg > xemacs-beta
annotate src/Makefile.in.in @ 4790:bc4f2511bbea
Remove support for the OffiX drag-and-drop protocol. See xemacs-patches
message with ID <870180fe0912211421m3e3d7891pdadefef167b50cb4@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Tue, 22 Dec 2009 15:52:06 -0700 |
parents | aa5ed11f473b |
children | bde90bc762f2 |
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 |
1632 | 233 # ifdef HAVE_MS_WINDOWS |
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 | |
248 #if defined (WIN32_NATIVE) || defined (CYGWIN) | |
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 |
371 #ifdef I18N3 | |
1330 | 372 mo_file = $(LIB_SRC)/emacs.mo |
428 | 373 #endif |
374 | |
1315 | 375 ######################################################################### |
1330 | 376 ## Implicit rules ## |
377 ######################################################################### | |
1315 | 378 |
1330 | 379 ## For performance and consistency, no built-in rules. |
380 .SUFFIXES: | |
381 .SUFFIXES: .c .h .o .i .s .dep | |
382 | |
383 ## -Demacs is needed to make some files produce the correct version | |
384 ## for use in Emacs. | |
385 | |
2958 | 386 cppflags = $(CPPFLAGS) -Demacs -I. -I$(SRC) $(c_switch_all) |
1330 | 387 cflags = $(CFLAGS) $(cppflags) |
2502 | 388 #if defined (WIN32_NATIVE) |
1330 | 389 ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags) |
390 #else | |
391 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags) | |
392 #endif | |
393 | |
2502 | 394 #if defined (CYGWIN) && !defined (PDUMP) |
395 ldflags += -Wl,--script=s/cygwin.sc | |
396 #endif | |
397 | |
1330 | 398 #ifdef SOLARIS2 |
399 %.o : %.c | |
400 #else | |
401 .c.o: | |
402 #endif | |
403 $(CC) -c $(cflags) $< | |
1315 | 404 |
1330 | 405 ## Create preprocessor output (debugging purposes only) |
406 .c.i: | |
407 #ifdef __GNUC__ | |
408 $(CC) -E $(cppflags) -o $@ $< | |
409 #else /* works on Solaris; what about other systems? */ | |
410 $(CC) -P $(cppflags) $< | |
411 #endif /* compiler */ | |
412 | |
413 ## Create assembler output (debugging purposes only) | |
414 .c.s: | |
415 $(CC) -S -c $(cflags) $< | |
416 | |
417 ## Create RTL files | |
418 %.c.rtl : %.c | |
419 $(CC) -dr -c $(cflags) $< | |
420 | |
421 ######################################################################### | |
422 ## Primary rebuilding process ## | |
423 ######################################################################### | |
424 | |
425 #ifdef PDUMP | |
426 DUMP_TARGET = $(PROGNAME).dmp | |
427 RAW_EXE = $(PROGNAME) | |
428 DUMP_ID = dump-id.o | |
2720 | 429 #if !defined(WIN32_NATIVE) && defined(DUMP_IN_EXEC) |
2015 | 430 DUMP_TARGET = $(PROGNAME) |
2388 | 431 #ifndef CYGWIN |
2015 | 432 RAW_EXE = temacs |
2388 | 433 #else |
434 RAW_EXE = temacs.exe | |
435 #endif | |
2015 | 436 #endif |
1330 | 437 #else |
438 DUMP_TARGET = $(PROGNAME) | |
439 RAW_EXE = temacs | |
440 #endif | |
441 | |
442 DO_TEMACS = $(DUMPENV) ./$(RAW_EXE) | |
443 DO_XEMACS = ./$(PROGNAME) | |
1315 | 444 |
445 BATCH = -no-packages -batch | |
446 BATCH_PACKAGES = -vanilla -batch | |
447 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH) | |
448 XEMACS_BATCH = $(DO_XEMACS) $(BATCH) | |
449 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES) | |
450 temacs_loadup_args = -l $(LISP)/loadup.el | |
451 dump_temacs_args = $(temacs_loadup_args) dump | |
452 run_temacs_args = $(temacs_loadup_args) run-temacs | |
453 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args) | |
454 | |
455 ## Compile, dump, and make sure all .elc files are up-to-date. | |
456 | |
1330 | 457 ## NOTE NOTE NOTE: There appears to be a fundamental but non-obvious |
458 ## difference between the way that standard `make', GNU Make, and `nmake' | |
459 ## handle dependencies, and this means we have to write the dependencies in | |
460 ## Makefile.in.in and xemacs.mak differently. To illustrate this, consider | |
461 ## the following first: | |
462 | |
463 ##.PHONY: all (`make' only) | |
464 ## all: test.exe | |
465 ## | |
466 ##.PHONY: FRC.test.c (`make' only) | |
467 ##FRC.test.c: | |
468 ## | |
469 ##test.c: FRC.test.c | |
470 ## if test ! -f foo ; then touch test.c; fi (`make' only) | |
471 ## if not exist foo touch test.c (`nmake' only) | |
472 ## | |
473 ##test.obj: test.c | |
474 ## touch test.obj | |
475 ## | |
476 ##test.exe: test.obj | |
477 ## touch test.exe | |
478 | |
479 ## (GNU Make doesn't need the .PHONY declarations, but evidently some versions | |
480 ## of `make' do. nmake doesn't need them and doesn't allow them, either.) | |
481 | |
482 ## Running `make' rebuilds test.exe only if `foo' doesn't exist. | |
483 ## Running `nmake -f Makefile' rebuilds it regardless. | |
484 | |
485 ## Both conclude that test.c needs to be rebuilt since its dependent is | |
486 ## non-existent. But `make' recalculates its dependencies after running | |
487 ## the commands for test.c, and notices that test.c hasn't changed, and | |
488 ## thus test.obj and test.exe are up-to-date. `nmake' doesn't. | |
489 | |
490 ## On the other hand, consider the following: | |
428 | 491 |
1330 | 492 ##.PHONY: all (`make' only) |
493 ##all: check-foo test.exe | |
494 ## | |
495 ##.PHONY: check-foo (`make' only) | |
496 ##check-foo: | |
497 ## if test ! -f foo; then touch test.c; fi (`make' only) | |
498 ## if not exist foo touch test.c (`nmake' only) | |
499 ## | |
500 ##test.c: | |
501 ## touch test.c | |
502 ## | |
503 ##test.obj: test.c | |
504 ## touch test.obj | |
505 ## | |
506 ##test.exe: test.c test.obj | |
507 ## touch test.exe | |
508 ## | |
1315 | 509 |
1330 | 510 ## Running `nmake -f Makefile' (and `GNU make') rebuilds test.exe only if |
511 ## `foo' doesn't exist. | |
512 ## Running some versions of non-GNU `make' does nothing at all once test.c, | |
513 ## test.obj and test.exe all exist. | |
514 | |
515 ## It appears that `nmake' doesn't check dependencies for test.exe until it | |
516 ## actually needs to be rebuilt, so this "sideways" dependency script | |
517 ## works. GNU make evidently recalculates *all* dependencies after each | |
518 ## command so has no problem, either. But some makes apparently calculate | |
519 ## all dependencies at startup and then, after executing a command to build | |
520 ## a dependency, only recheck relationships involving that particular | |
521 ## dependency. | |
522 | |
523 ## In XEmacs-land, the above situation exists wrt the `NEEDTODUMP' | |
524 ## dependency, recalculated by `update-elc.el'. Thus, Makefile.in.in must | |
525 ## use the method #1 above, and nmake must use method #2. | |
526 | |
527 ## -ben | |
528 | |
529 .PHONY: build-the-mofo | |
1346 | 530 build-the-mofo: update-elc-2 $(mo_file) $(other_files) $(LISP)/finder-inf.el load-shadows |
1315 | 531 |
1346 | 532 ## (1) Compile all dependencies of the XEmacs executable |
428 | 533 |
1330 | 534 #ifdef HAVE_X_WINDOWS |
535 lwlib_deps = $(lwlib_lib) | |
536 $(lwlib_lib): | |
2427 | 537 cd ../lwlib && $(MAKE) $(RECURSIVE_MAKE_ARGS) |
1330 | 538 #endif /* HAVE_X_WINDOWS */ |
539 | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
4754
diff
changeset
|
540 link_deps = $(start_files) $(objs) $(otherobjs) $(lwlib_deps) |
1315 | 541 |
1346 | 542 $(LIB_SRC)/make-dump-id: |
2427 | 543 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-dump-id |
1346 | 544 |
545 dump-id.c: $(LIB_SRC)/make-dump-id $(link_deps) | |
546 $(LIB_SRC)/make-dump-id | |
547 | |
548 ## (2) Link the XEmacs executable | |
549 | |
2720 | 550 #if !defined(PDUMP) || !defined(DUMP_IN_EXEC) || defined(WIN32_NATIVE) |
2015 | 551 $(RAW_EXE): $(link_deps) $(DUMP_ID) |
552 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) $(LIBES) | |
553 #else | |
554 $(RAW_EXE): $(link_deps) $(DUMP_ID) | |
555 if test -f dump-size ; then \ | |
556 $(CC) -c $(cflags) -DMAX_SIZE=`cat dump-size` $(SRC)/dump-data.c ;\ | |
557 else \ | |
558 $(CC) -c $(cflags) -DMAX_SIZE=0 $(SRC)/dump-data.c ;\ | |
559 fi | |
560 $(LD) $(start_flags) $(ldflags) -o $@ $(start_files) $(objs) $(otherobjs) $(DUMP_ID) dump-data.o $(LIBES) | |
561 #endif | |
1315 | 562 |
1346 | 563 ## (3) Update the .elc's needed for dumping |
564 | |
565 .PHONY: FRC.needtodump | |
566 FRC.needtodump: | |
567 | |
568 ## This file is touched by update-elc.el when redumping is necessary. | |
569 ## We use $(BLDSRC) == `.' here to help keep sync with nt/xemacs.mak, | |
570 ## where $(BLDSRC) is not `.'. | |
1406 | 571 $(BLDSRC)/NEEDTODUMP: $(RAW_EXE) FRC.needtodump |
1346 | 572 $(TEMACS_BATCH) -l $(LISP)/update-elc.el |
573 | |
574 ## (4) Build the DOC file | |
1315 | 575 |
576 obj_src = $(objs:.o=.c) | |
577 | |
1346 | 578 $(LIB_SRC)/make-docfile: |
2427 | 579 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-docfile |
1346 | 580 |
1330 | 581 $(LIB_SRC)/DOC: $(LIB_SRC)/make-docfile $(BLDSRC)/NEEDTODUMP $(temacs_deps) |
1303 | 582 #ifdef QUICK_BUILD |
583 if test ! -f $@ ; then \ | |
584 #else | |
585 if true ; then \ | |
586 #endif | |
1315 | 587 $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \ |
1330 | 588 -o $(LIB_SRC)/DOC -d $(SRC) -i $(LIB_SRC)/../site-packages \ |
589 $(obj_src) $(mallocdocsrc) $(rallocdocsrc) \ | |
590 $(extra_doc_files) ; fi | |
428 | 591 |
1346 | 592 ## (5) Dump |
593 | |
594 $(DUMP_TARGET): $(RAW_EXE) $(BLDSRC)/NEEDTODUMP $(LIB_SRC)/DOC | |
595 #ifdef HEAP_IN_DATA | |
596 @$(RM) $@ && touch SATISFIED | |
597 $(dump_temacs) | |
598 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \ | |
2427 | 599 $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; fi |
1346 | 600 #else |
601 @$(RM) $@ | |
602 $(dump_temacs) | |
603 #endif | |
2720 | 604 #if defined(PDUMP) && defined(DUMP_IN_EXEC) && !defined(WIN32_NATIVE) |
2015 | 605 if test -f dump-size; then \ |
606 $(LIB_SRC)/insert-data-in-exec $(RAW_EXE) $(DUMP_TARGET).dmp $(DUMP_TARGET) `$(DO_TEMACS) -si`; \ | |
607 ret=$$? ; \ | |
608 if test $${ret} -eq 2; then \ | |
609 $(RM) dump-size ; \ | |
610 else \ | |
611 if test $${ret} -eq 1; then \ | |
612 exit 1; \ | |
613 else \ | |
614 chmod +x $(DUMP_TARGET) ; \ | |
615 fi ; \ | |
616 fi ; \ | |
617 fi | |
2644 | 618 if test ! -f dump-size; then \ |
2015 | 619 $(LIB_SRC)/insert-data-in-exec -s $(DUMP_TARGET).dmp > dump-size ; \ |
620 $(RM) dump-data.o $(DUMP_TARGET) $(DUMP_TARGET).dmp $(RAW_EXE);\ | |
2427 | 621 $(MAKE) $(RECURSIVE_MAKE_ARGS) $@; \ |
2015 | 622 fi |
623 #endif | |
1346 | 624 |
625 ## (6) Update the remaining .elc's, post-dumping | |
626 | |
627 .PHONY: update-elc-2 | |
628 update-elc-2: $(DUMP_TARGET) | |
629 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP) | |
630 | |
631 ## (7) Other random stuff | |
1315 | 632 |
1346 | 633 $(LISP)/finder-inf.el: update-elc-2 |
634 @echo "Building finder database ..." | |
2027 | 635 $(RM) $(LISP)/finder-inf.el |
1346 | 636 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ |
3986 | 637 -eval "(setq lisp-directory \"$(LISP)\")" \ |
1346 | 638 -l finder -f finder-compile-keywords |
639 @echo "Building finder database ...(done)" | |
640 | |
641 .PHONY: load-shadows | |
642 load-shadows: update-elc-2 | |
643 #ifndef QUICK_BUILD | |
644 @echo "Testing for Lisp shadows ..." | |
645 @$(XEMACS_BATCH) -f list-load-path-shadows | |
646 #endif | |
647 | |
648 ###################### Misc targets | |
649 | |
650 release: all | |
651 -if [ -w $(LISP) ]; then \ | |
652 w=`pwd`; cd $(SRC) && $$w/$(RAW_EXE) -nd $(BATCH) -l $(LISP)/inc-vers; \ | |
653 else true; fi | |
654 -$(dump_temacs) | |
655 touch release | |
428 | 656 |
1315 | 657 .PHONY: fastdump |
1330 | 658 fastdump: $(RAW_EXE) |
659 @$(RM) $(DUMP_TARGET) && touch SATISFIED | |
660 -$(dump_temacs) | |
1315 | 661 @$(XEMACS_BATCH) -f list-load-path-shadows |
428 | 662 |
1315 | 663 .PHONY: all-elc |
664 all-elc: | |
2427 | 665 cd .. && $(MAKE) $(RECURSIVE_MAKE_ARGS) |
1315 | 666 |
667 ######################################################################### | |
1330 | 668 ## Subsidiary dependency rules ## |
669 ######################################################################### | |
428 | 670 |
671 #ifdef I18N3 | |
672 | |
673 # if defined(SPARC) && !defined(USG) | |
674 xgettext= /usr/openwin/bin/xgettext | |
675 xgettext_args= -o emacs -m_X messages | |
676 msgfmt= /usr/openwin/bin/msgfmt | |
677 # else | |
678 xgettext= xgettext | |
679 xgettext_args= -s -d emacs -M_X messages | |
680 msgfmt= msgfmt | |
681 #endif | |
682 | |
1330 | 683 $(LIB_SRC)/emacs.po: $(LIB_SRC)/make-msgfile $(LIB_SRC)/make-po $(objs) |
684 $(LIB_SRC)/make-msgfile -o $(LIB_SRC)/messages $(objs) | |
685 cd $(LIB_SRC) && $(xgettext) $(xgettext_args) | |
686 $(RM) $(LIB_SRC)/emacs.po | |
687 cd $(LIB_SRC) && $(LIB_SRC)/make-po -a $(LIB_SRC)/emacs.po DOC | |
428 | 688 |
1330 | 689 $(LIB_SRC)/emacs.mo: $(LIB_SRC)/emacs.po |
690 cd $(LIB_SRC)/ && $(msgfmt) -o emacs.mo emacs.po | |
428 | 691 |
1330 | 692 $(LIB_SRC)/make-msgfile: |
2427 | 693 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-msgfile |
428 | 694 |
1330 | 695 $(LIB_SRC)/make-po: |
2427 | 696 cd $(LIB_SRC) && $(MAKE) $(RECURSIVE_MAKE_ARGS) make-po |
428 | 697 |
698 #endif /* I18N3 */ | |
699 | |
1330 | 700 TopLevelEmacsShell.o : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h |
701 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 702 mv EmacsShell-sub.o TopLevelEmacsShell.o |
703 | |
1330 | 704 TopLevelEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h |
705 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 706 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl |
707 | |
1330 | 708 TransientEmacsShell.o : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h |
709 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 710 mv EmacsShell-sub.o TransientEmacsShell.o |
711 | |
1330 | 712 TransientEmacsShell.c.rtl : $(SRC)/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h |
713 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c | |
428 | 714 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl |
715 | |
442 | 716 ## The above rules are subject to a race condition if using a parallel make. |
717 TransientEmacsShell.o : TopLevelEmacsShell.o | |
718 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl | |
719 | |
428 | 720 ## Position-independent code for shared library creation |
721 #if USE_GCC | |
722 pic_arg = -fpic | |
723 #elif defined (IRIX) | |
724 pic_arg = -KPIC | |
725 # else | |
726 pic_arg = -K pic | |
727 #endif | |
728 | |
729 #ifdef EXTERNAL_WIDGET | |
730 | |
731 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o | |
732 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o | |
733 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o | |
734 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o | |
735 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o | |
736 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o | |
737 | |
738 ## Add dependencies so things work right with a parallel make | |
1330 | 739 ExternalClient-Xm-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o |
740 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c | |
428 | 741 mv ExternalClient.o ExternalClient-Xm-shared.o |
742 | |
1330 | 743 ExternalClient-Xt-shared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o |
744 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient.c | |
428 | 745 mv ExternalClient.o ExternalClient-Xt-shared.o |
746 | |
1330 | 747 ExternalClient-Xlib-shared.o: $(SRC)/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o |
748 $(CC) -c $(pic_arg) $(cflags) $(SRC)/ExternalClient-Xlib.c | |
428 | 749 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o |
750 | |
1330 | 751 ExternalClient-Xm-nonshared.o: $(SRC)/ExternalClient.c ExternalClient-Xt-nonshared.o |
752 $(CC) -c $(cflags) -DEXTW_USES_MOTIF $(SRC)/ExternalClient.c | |
428 | 753 mv ExternalClient.o ExternalClient-Xm-nonshared.o |
754 | |
1330 | 755 ExternalClient-Xt-nonshared.o: $(SRC)/ExternalClient.c |
756 $(CC) -c $(cflags) $(SRC)/ExternalClient.c | |
428 | 757 mv ExternalClient.o ExternalClient-Xt-nonshared.o |
758 | |
1330 | 759 ExternalClient-Xlib-nonshared.o: $(SRC)/ExternalClient-Xlib.c |
760 $(CC) -c $(cflags) $(SRC)/ExternalClient-Xlib.c | |
428 | 761 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o |
762 | |
763 ## We compile the common files twice (once with PIC and once without) | |
764 ## because on some systems, compiling with PIC but not linking into | |
765 ## a shared library messes things up. | |
766 | |
1330 | 767 extw-Xt-shared.o: $(SRC)/extw-Xt.c extw-Xt-nonshared.o |
768 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xt.c | |
428 | 769 mv extw-Xt.o extw-Xt-shared.o |
770 | |
1330 | 771 extw-Xlib-shared.o: $(SRC)/extw-Xlib.c extw-Xlib-nonshared.o |
772 $(CC) -c $(pic_arg) $(cflags) $(SRC)/extw-Xlib.c | |
428 | 773 mv extw-Xlib.o extw-Xlib-shared.o |
774 | |
1330 | 775 extw-Xt-nonshared.o: $(SRC)/extw-Xt.c |
776 $(CC) -c $(cflags) $(SRC)/extw-Xt.c | |
428 | 777 mv extw-Xt.o extw-Xt-nonshared.o |
778 | |
1330 | 779 extw-Xlib-nonshared.o: $(SRC)/extw-Xlib.c |
780 $(CC) -c $(cflags) $(SRC)/extw-Xlib.c | |
428 | 781 mv extw-Xlib.o extw-Xlib-nonshared.o |
782 | |
1330 | 783 libextcli_Xm.a: $(external_client_motif_objs_nonshared) |
784 ar r libextcli_Xm.a $(external_client_motif_objs_nonshared) | |
428 | 785 |
1330 | 786 libextcli_Xt.a: $(external_client_xt_objs_nonshared) |
787 ar r libextcli_Xt.a $(external_client_xt_objs_nonshared) | |
428 | 788 |
1330 | 789 libextcli_Xlib.a: $(external_client_xlib_objs_nonshared) |
790 ar r libextcli_Xlib.a $(external_client_xlib_objs_nonshared) | |
428 | 791 |
1315 | 792 ## Now we try to figure out how to link a shared library. |
793 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared | |
794 ## library will not be created. | |
795 | |
796 # ifdef USE_GCC | |
797 # ifdef USG5 | |
798 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output | |
799 extw_link_beg = $(CC) -shared | |
800 extw_link_mid = -Xlinker -z -Xlinker text -o | |
801 extw_link_end = | |
802 ## I cannot figure out how to do shared a.out libraries, so just punt. | |
803 # elif !defined (LINUX) || defined (__ELF__) | |
804 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output | |
805 extw_link_beg = $(CC) -shared | |
806 extw_link_mid = -o | |
807 extw_link_end = | |
808 # endif | |
809 # elif defined (USG5) | |
810 # if defined (IRIX) | |
1330 | 811 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations objs -o output |
812 extw_link_beg = $(LD) -shared -g -check_registry $(TOOLROOT)/usr/lib/so_locations | |
1315 | 813 extw_link_mid = -o |
814 extw_link_end = | |
815 # else /* not IRIX */ | |
816 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output | |
817 extw_link_beg = $(CC) -G | |
818 extw_link_mid = -z text -o | |
819 extw_link_end = | |
820 # endif /* not IRIX */ | |
821 # 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
|
822 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output |
1315 | 823 extw_link_beg = $(LD) -dc |
824 extw_link_mid = -assert pure-text -o | |
825 extw_link_end = | |
826 # endif /* not USG5 */ | |
827 | |
428 | 828 #ifdef EXTW_LINK |
829 | |
1330 | 830 libextcli_Xm.so.1: $(external_client_motif_objs_shared) |
831 $(extw_link_beg) $(external_client_motif_objs_shared) $(extw_link_mid) libextcli_Xm.so.1 $(extw_link_end) | |
428 | 832 |
1330 | 833 libextcli_Xt.so.1: $(external_client_xt_objs_shared) |
834 $(extw_link_beg) $(external_client_xt_objs_shared) $(extw_link_mid) libextcli_Xt.so.1 $(extw_link_end) | |
428 | 835 |
1330 | 836 libextcli_Xlib.so.1: $(external_client_xlib_objs_shared) |
837 $(extw_link_beg) $(external_client_xlib_objs_shared) $(extw_link_mid) libextcli_Xlib.so.1 $(extw_link_end) | |
428 | 838 |
839 #endif /* EXTW_LINK */ | |
840 | |
841 #endif /* EXTERNAL_WIDGET */ | |
842 | |
1330 | 843 config.h: $(SRC)/config.h.in |
844 Emacs.ad.h: $(ETC)/Emacs.ad | |
428 | 845 |
846 config.h sheap-adjust.h paths.h Emacs.ad.h : | |
847 @echo "The file $@ needs to be re-generated." | |
848 @echo "Please run a make in the top level directory." | |
849 @echo "Consult the file \`INSTALL' for instructions for building XEmacs." | |
850 @exit 1 | |
851 | |
852 ## Some machines have alloca built-in. | |
853 ## They should define HAVE_ALLOCA, or may just let alloca.s | |
854 ## be used but generate no code. | |
855 ## Some have it written in assembler in alloca.s. | |
856 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h). | |
851 | 857 ## Nowadays we always compile in the C version and use it to avoid stack |
858 ## overflow. | |
428 | 859 |
860 #ifdef C_ALLOCA | |
861 #else | |
862 #ifndef HAVE_ALLOCA | |
1330 | 863 allocax.o : $(SRC)/alloca.s config.h |
428 | 864 ## $(CPP) is cc -E, which may get confused by filenames |
865 ## that do not end in .c. So copy file to a safe name. */ | |
1330 | 866 ## cp $(SRC)/alloca.s allocatem.c |
428 | 867 ## Remove any ^L, blank lines, and preprocessor comments, |
868 ## since some assemblers barf on them. Use a different basename for the | |
869 ## output file, since some stupid compilers (Green Hill) use that | |
870 ## name for the intermediate assembler file. | |
871 $(CPP) $(cppflags) allocatem.c | \ | |
872 sed -e 's///' -e 's/^#.*//' | \ | |
873 sed -n -e '/^..*$$/p' > allocax.s | |
874 @$(RM) alloca.o | |
875 $(CC) -c allocax.s | |
876 $(RM) allocax.s allocatem.c | |
877 #endif /* HAVE_ALLOCA */ | |
878 #endif /* ! defined (C_ALLOCA) */ | |
879 | |
880 #ifdef HAVE_NATIVE_SOUND | |
442 | 881 sound_cflags=@sound_cflags@ |
1330 | 882 sunplay.o: $(SRC)/sunplay.c |
883 $(CC) -c $(sound_cflags) $(cflags) $(SRC)/sunplay.c | |
884 hpplay.o: $(SRC)/hpplay.c | |
885 $(CC) -c -Demacs $(sound_cflags) $(cflags) $(SRC)/hpplay.c | |
428 | 886 #endif /* HAVE_NATIVE_SOUND */ |
887 | |
462 | 888 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H) |
889 glade_files=glade.c | |
890 #endif | |
891 | |
892 #ifdef HAVE_GTK | |
893 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files) | |
894 #endif | |
895 | |
1330 | 896 xemacs_res.o: $(SRC)/../nt/xemacs.rc |
897 windres --include-dir $(SRC)/../nt -i $(SRC)/../nt/xemacs.rc -o $@ | |
442 | 898 |
1315 | 899 ######################################################################### |
1330 | 900 ## Other random crap ## |
901 ######################################################################### | |
1315 | 902 |
903 dortl : $(obj_rtl) $(otherrtls) | |
904 echo "(defvar source-files '(" > $(LISP)/source-files.el | |
905 (for a in $(obj_src) $(othersrcs);do \ | |
906 echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\ | |
907 done) | |
908 echo "))" >> $(LISP)/source-files.el | |
909 | |
1330 | 910 ###################### Lint |
1315 | 911 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) |
912 LINTFILES= $(objs:.o=.ln) | |
913 LINTINCLUDES = $(cppflags) | |
914 ## LINTFLAGS= -fd -m -p -s -u -v -x | |
915 LINTFLAGS= -fd -m -s -u -v -x | |
916 .PHONY: lint | |
917 lint: $(LINTFILES) | |
918 $(LINT.c) $(LINTFILES) | |
919 | |
1330 | 920 ###################### Automated tests |
921 testdir = $(SRC)/../tests/automated | |
922 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir) | |
1315 | 923 |
924 .PHONY: check check-temacs check-features | |
925 check: | |
926 $(DO_XEMACS) $(batch_test_emacs) | |
927 check-temacs: | |
928 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs) | |
929 check-features: all | |
930 $(XEMACS_BATCH) -l check-features.el | |
931 | |
1330 | 932 ###################### Debugging targets |
933 | |
1315 | 934 ## None of the debugging products work with a dumped xemacs binary, |
935 ## because it does unexpected things like free memory that has been | |
936 ## malloc'ed in a *different* process!! So we need to run these on | |
937 ## temacs. | |
938 | |
939 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx | |
940 rtc_patch.o: | |
941 rtc_patch_area -o $@ | |
942 | |
943 rtcmacs: $(temacs_deps) rtc_patch.o | |
2427 | 944 $(RM) $(RAW_EXE); $(MAKE) $(RECURSIVE_MAKE_ARGS) $(RAW_EXE) RTC_patch_objs=rtc_patch.o |
1330 | 945 mv $(RAW_EXE) rtcmacs |
1315 | 946 |
947 .PHONY: run-rtcmacs | |
948 run-rtcmacs: rtcmacs | |
949 dbx -q -C -c \ | |
950 'dbxenv rtc_error_log_file_name /dev/fd/1; \ | |
951 dbxenv suppress_startup_message 5.0; \ | |
952 ignore POLL; \ | |
953 check -access; \ | |
954 suppress rui; \ | |
1330 | 955 runargs -nd $(BATCH) $(run_temacs_args) -vanilla; \ |
1315 | 956 run' rtcmacs |
957 | |
1330 | 958 debug-temacs: $(RAW_EXE) |
959 -gdb $(RAW_EXE) | |
1315 | 960 |
961 ## Purify, Quantify, PureCoverage are software quality products from | |
962 ## Rational, formerly Pure Atria, formerly Pure Software. | |
963 ## | |
964 ## Purify | |
965 PURIFY_PROG = purify | |
966 PURIFY_LIBS = | |
967 PURIFY_FLAGS =\ | |
968 #ifdef PDUMP | |
969 -search-mmaps=yes\ | |
970 #endif | |
971 -chain-length=32 -ignore-signals=SIGPOLL\ | |
1330 | 972 -cache-dir=$(blddir)/purecache -always-use-cache-dir=yes |
1315 | 973 |
974 puremacs: $(temacs_deps) | |
975 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) | |
1330 | 976 cp $@ $(RAW_EXE) |
1315 | 977 |
978 ## Quantify | |
979 #ifdef QUANTIFY | |
980 QUANTIFY_PROG = quantify | |
981 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` | |
982 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes | |
983 cppflags += -I$(QUANTIFY_HOME) | |
984 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a | |
985 | |
986 quantmacs: $(temacs_deps) | |
987 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) | |
1330 | 988 cp $@ $(RAW_EXE) |
1315 | 989 #endif /* QUANTIFY */ |
990 | |
991 PURECOV_PROG=purecov | |
992 covmacs: $(temacs_deps) | |
993 $(PURECOV_PROG) $(LD) $(temacs_link_args) | |
428 | 994 |
1330 | 995 ###################### Clean |
996 | |
428 | 997 .PHONY: mostlyclean clean distclean realclean versionclean extraclean |
3062 | 998 .PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig |
428 | 999 mostlyclean: |
3083 | 1000 -$(RM) *.o *.i *.rtl *.ln core \ |
1330 | 1001 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
|
1002 sheap-adjust.h dump-id.c dump-size $(BLDSRC)/NEEDTODUMP SATISFIED \ |
1330 | 1003 $(LIB_SRC)/*.po $(LIB_SRC)/*.mo |
1004 versionclean: | |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
1005 -$(RM) $(RAW_EXE) $(DUMP_TARGET) $(DUMP_TARGET).dmp $(LIB_SRC)/DOC |
1330 | 1006 ## Remove the generated load files here; they cause lots of problems |
1007 ## when they don't work right. | |
428 | 1008 clean: mostlyclean versionclean |
3083 | 1009 -$(RM) libextcli* $(LISP)/auto-autoloads.el* $(LISP)/custom-load.el* \ |
1330 | 1010 $(LISP)/mule/auto-autoloads.el* $(LISP)/mule/custom-load.el* \ |
1011 $(SRCMODULES)/auto-autoloads.el* $(SRCMODULES)/custom-load.el* | |
428 | 1012 ## This is used in making a distribution. |
1013 ## Do not use it on development directories! | |
3062 | 1014 distclean-noconfig: clean |
3083 | 1015 -$(RM) config.h paths.h Emacs.ad.h $(LISP)/finder-inf.el* \ |
3062 | 1016 TAGS xemacs.def xemacs.def.in |
1017 ## This is used in making a distribution. | |
1018 ## Do not use it on development directories! | |
1019 distclean: distclean-noconfig | |
3083 | 1020 -$(RM) GNUmakefile Makefile Makefile.in |
3062 | 1021 realclean-noconfig: distclean-noconfig |
428 | 1022 realclean: distclean |
3062 | 1023 extraclean-noconfig: realclean-noconfig |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
1024 -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt |
428 | 1025 extraclean: realclean |
4754
5dc1b4681e33
Sun Oct 18 00:27:27 2009 +0900
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4735
diff
changeset
|
1026 -$(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* *.s gdb.txt |
428 | 1027 |
1330 | 1028 ###################### Lock, unlock |
1029 | |
428 | 1030 .PHONY : lock unlock |
1031 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \ | |
1032 config.h.in README COPYING ChangeLog | |
1033 unlock: | |
1034 chmod u+w $(SOURCES) | |
1035 | |
1036 relock: | |
1037 chmod -w $(SOURCES) | |
1038 | |
1330 | 1039 ###################### Installation |
1040 | |
428 | 1041 ## Header files for ellcc |
1042 #ifdef HAVE_SHLIB | |
1043 MAKEPATH=../lib-src/make-path | |
1330 | 1044 install: $(PROGNAME) |
1045 $(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s | |
428 | 1046 -@echo "Copying include files for ellcc..." |
1047 -@hdir=`pwd`; \ | |
1330 | 1048 cd $(SRC); hdrdir2=`pwd`; cd $$hdir; \ |
428 | 1049 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \ |
1050 (for thisdir in $$hdir; do \ | |
448 | 1051 cd $$thisdir && \ |
428 | 1052 (hdrtars=; \ |
1053 for hdrfile in *.h; do \ | |
1054 hdrtars="$$hdrtars $$hdrfile"; \ | |
1055 done; \ | |
1056 test -d s && hdrtars="$$hdrtars s/*"; \ | |
1057 test -d m && hdrtars="$$hdrtars m/*"; \ | |
1058 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \ | |
1330 | 1059 (cd $(archlibdir)/include && umask 022 && tar xf -); \ |
1060 chmod 755 $(archlibdir)/include; \ | |
1061 test -d $(archlibdir)/include/s && \ | |
1062 chmod 755 $(archlibdir)/include/s; \ | |
1063 test -d $(archlibdir)/include/m && \ | |
1064 chmod 755 $(archlibdir)/include/s;) \ | |
428 | 1065 done) |
1066 #endif | |
1067 | |
1330 | 1068 ###################### Dependencies |
1069 | |
428 | 1070 ## Dependency processing using home-grown script, not makedepend |
1071 .PHONY: depend | |
1072 FRC.depend: | |
1073 depend: FRC.depend | |
1330 | 1074 cd $(SRC) && $(RM) depend.tmp && \ |
428 | 1075 perl ./make-src-depend > depend.tmp && \ |
1076 if cmp -s depend depend.tmp; \ | |
1077 then $(RM) depend.tmp; \ | |
1078 else $(RM) depend && mv depend.tmp depend; \ | |
1079 fi | |
1330 | 1080 |
1081 ###################### Unicode encapsulation | |
1082 | |
1083 .PHONY: unicode-encapsulate | |
1084 FRC.unicode-encapsulate: | |
1085 unicode-encapsulate: FRC.unicode-encapsulate | |
1086 cd $(SRC) && \ | |
1087 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 |