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