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