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