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