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