163
|
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.
|
0
|
5
|
163
|
6 ## This file is part of XEmacs.
|
0
|
7
|
163
|
8 ## XEmacs is free software; you can redistribute it and/or modify it
|
|
9 ## under the terms of the GNU General Public License as published by the
|
|
10 ## Free Software Foundation; either version 2, or (at your option) any
|
|
11 ## later version.
|
0
|
12
|
163
|
13 ## XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
14 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
15 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
16 ## for more details.
|
0
|
17
|
163
|
18 ## You should have received a copy of the GNU General Public License
|
|
19 ## along with XEmacs; see the file COPYING. If not, write to
|
|
20 ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 ## Boston, MA 02111-1307, USA.
|
0
|
22
|
163
|
23 ## Synched up with: Not synched with FSF.
|
0
|
24
|
280
|
25 PROGNAME=@PROGNAME@
|
|
26
|
|
27 all: ${PROGNAME}
|
183
|
28 .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
|
0
|
29
|
163
|
30 ## For performance and consistency, no built-in rules.
|
70
|
31 .SUFFIXES:
|
272
|
32 .SUFFIXES: .c .h .o .i .s .dep
|
0
|
33
|
380
|
34 #ifdef USE_GNU_MAKE
|
|
35 RECURSIVE_MAKE=$(MAKE)
|
|
36 #else
|
173
|
37 @SET_MAKE@
|
380
|
38 RECURSIVE_MAKE=@RECURSIVE_MAKE@
|
|
39 #endif
|
|
40
|
173
|
41 SHELL=/bin/sh
|
|
42 RM = rm -f
|
|
43
|
163
|
44 lispdir = ${srcdir}/../lisp/
|
|
45 libsrc = ../lib-src/
|
|
46 etcdir = ../etc/
|
|
47
|
|
48 ## Here are the things that we expect ../configure to edit.
|
203
|
49 prefix=@prefix@
|
0
|
50 srcdir=@srcdir@
|
263
|
51 blddir=@blddir@
|
203
|
52 version=@version@
|
380
|
53 CC=@XEMACS_CC@
|
0
|
54 CPP=@CPP@
|
|
55 CFLAGS=@CFLAGS@
|
149
|
56 CPPFLAGS=@CPPFLAGS@
|
|
57 LDFLAGS=@LDFLAGS@
|
|
58
|
|
59 c_switch_all=@c_switch_all@
|
|
60 ld_switch_all=@ld_switch_all@
|
|
61 ld_libs_all=@ld_libs_all@
|
263
|
62 ld_dynamic_link_flags=@ld_dynamic_link_flags@
|
149
|
63
|
|
64 extra_objs=@extra_objs@
|
0
|
65 LN_S=@LN_S@
|
|
66
|
163
|
67 ld_switch_shared=@ld_switch_shared@
|
|
68 start_files=@start_files@
|
|
69 start_flags=@start_flags@
|
|
70 LD=@ld@
|
|
71 lib_gcc=@lib_gcc@
|
269
|
72 ##libmcheck=@libmcheck@
|
163
|
73
|
0
|
74 #define NOT_C_CODE
|
|
75 #include "config.h"
|
|
76
|
163
|
77 ## With the traditional VPATH setting, it is not possible to
|
|
78 ## simultaneously compile in-place and in another directory. The
|
|
79 ## mistaken definition is that *all* dependencies are searched for in
|
|
80 ## the VPATH directory, rather than just the dependencies that are not
|
|
81 ## themselves targets. Thus, if there is an up-to-date .o file in the
|
|
82 ## in-place location, it will not get recompiled in the not-in-place
|
|
83 ## location.
|
0
|
84
|
163
|
85 ## The GNU Make "vpath" directive continues this tradition, but at
|
|
86 ## least lets you restrict the classes of files that it applies to.
|
|
87 ## This allows us to kludge around the problem.
|
|
88
|
0
|
89 #ifdef USE_GNU_MAKE
|
|
90 vpath %.c @srcdir@
|
|
91 vpath %.h @srcdir@
|
163
|
92 ## now list files that should NOT be searched in the srcdir.
|
|
93 ## This includes any .c or .h built from something else
|
|
94 ## (e.g. a .in file).
|
0
|
95 vpath config.h
|
|
96 vpath paths.h
|
|
97 vpath Emacs.ad.h
|
183
|
98 vpath puresize-adjust.h
|
251
|
99 vpath sheap-adjust.h
|
0
|
100 #else
|
|
101 VPATH=@srcdir@
|
|
102 #endif
|
|
103
|
163
|
104 RM = rm -f
|
0
|
105
|
|
106 #ifdef HAVE_NATIVE_SOUND
|
149
|
107 sound_cflags=@sound_cflags@
|
0
|
108 #endif
|
|
109
|
163
|
110 LWLIB_SRCDIR = ${srcdir}/../lwlib
|
70
|
111
|
149
|
112 #ifdef HAVE_X_WINDOWS
|
163
|
113 lwlib_libs = ../lwlib/liblw.a
|
|
114 lwlib_deps = $(lwlib_libs)
|
|
115 $(lwlib_libs) :
|
173
|
116 cd ../lwlib && $(RECURSIVE_MAKE)
|
0
|
117
|
371
|
118 x_objs=balloon_help.o balloon-x.o console-x.o device-x.o event-Xt.o frame-x.o\
|
267
|
119 glyphs-x.o objects-x.o redisplay-x.o xgccache.o xselect.o
|
70
|
120
|
149
|
121 #ifdef AIX4
|
|
122 LIBI18N = -li18n
|
|
123 #endif /* AIX4 */
|
70
|
124
|
272
|
125 X11_libs = $(LIBI18N)
|
149
|
126 #endif /* HAVE_X_WINDOWS */
|
0
|
127
|
251
|
128 #ifdef HEAP_IN_DATA
|
|
129 sheap_obj=sheap.o
|
|
130 #endif
|
|
131
|
163
|
132 ## -Demacs is needed to make some files produce the correct version
|
|
133 ## for use in Emacs.
|
0
|
134
|
157
|
135 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
163
|
136 cflags = $(CFLAGS) $(cppflags)
|
272
|
137 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
0
|
138
|
193
|
139 #ifdef SOLARIS2
|
|
140 %.o : %.c
|
|
141 #else
|
0
|
142 .c.o:
|
193
|
143 #endif
|
149
|
144 $(CC) -c $(cflags) $<
|
0
|
145
|
163
|
146 ## Create preprocessor output (debugging purposes only)
|
70
|
147 .c.i:
|
272
|
148 #ifdef __GNUC__
|
|
149 $(CC) -E $(cppflags) -o $@ $<
|
|
150 #else /* works on Solaris; what about other systems? */
|
149
|
151 $(CC) -P $(cppflags) $<
|
272
|
152 #endif /* compiler */
|
|
153
|
|
154 ## Create assembler output (debugging purposes only)
|
|
155 .c.s:
|
|
156 $(CC) -S -c $(cflags) $<
|
0
|
157
|
263
|
158 ## Create RTL files
|
|
159 %.c.rtl : %.c
|
|
160 $(CC) -dr -c $(cflags) $<
|
|
161
|
163
|
162 ## lastfile must follow all files whose initialized data areas should
|
|
163 ## be dumped as pure by dump-emacs.
|
0
|
164
|
163
|
165 ## NOTE: The last line cannot be all macros, because make will barf
|
|
166 ## if they all come out null.
|
0
|
167
|
157
|
168 objs=\
|
|
169 abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
|
|
170 callint.o callproc.o casefiddle.o casetab.o chartab.o\
|
|
171 cmdloop.o cmds.o console.o console-stream.o\
|
|
172 data.o device.o dired.o doc.o doprnt.o dynarr.o\
|
|
173 editfns.o elhash.o emacs.o\
|
217
|
174 eval.o events.o $(extra_objs)\
|
163
|
175 event-stream.o extents.o faces.o\
|
173
|
176 fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o font-lock.o\
|
278
|
177 frame.o general.o getloadavg.o glyphs.o glyphs-eimage.o\
|
267
|
178 $(gui_objs) hash.o imgproc.o indent.o insdel.o intl.o\
|
211
|
179 keymap.o $(RTC_patch_objs) line-number.o lread.o lstream.o\
|
157
|
180 macros.o marker.o md5.o minibuf.o objects.o opaque.o\
|
380
|
181 print.o process.o profile.o\
|
157
|
182 rangetab.o redisplay.o redisplay-output.o regex.o\
|
251
|
183 search.o $(sheap_obj) signal.o sound.o\
|
157
|
184 specifier.o strftime.o symbols.o syntax.o sysdep.o\
|
195
|
185 undo.o $(x_objs) widget.o window.o
|
0
|
186
|
263
|
187 obj_rtl = $(objs:.o=.c.rtl)
|
|
188
|
0
|
189 #ifdef REL_ALLOC
|
149
|
190 rallocdocsrc = ralloc.c
|
0
|
191 rallocobjs = ralloc.o
|
|
192 #endif
|
|
193
|
267
|
194 malloclib = $(libmcheck)
|
0
|
195 #ifndef SYSTEM_MALLOC
|
255
|
196 # ifdef GNU_MALLOC /* GNU malloc */
|
0
|
197 # ifdef ERROR_CHECK_MALLOC
|
255
|
198 #ifdef DOUG_LEA_MALLOC
|
|
199 mallocobjs = free-hook.o vm-limit.o
|
|
200 #else
|
0
|
201 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
255
|
202 #endif
|
0
|
203 mallocdocsrc = free-hook.c
|
149
|
204 # else /* New GNU malloc, sans error checking */
|
255
|
205 #ifdef DOUG_LEA_MALLOC
|
|
206 mallocobjs = vm-limit.o
|
|
207 #else
|
0
|
208 mallocobjs = gmalloc.o vm-limit.o
|
255
|
209 #endif
|
0
|
210 mallocdocsrc =
|
149
|
211 # endif /* ERROR_CHECK_MALLOC */
|
255
|
212 # else /* Older GNU malloc */
|
0
|
213 mallocobjs = malloc.o
|
|
214 mallocdocsrc =
|
255
|
215 # endif /* Older GNU malloc */
|
149
|
216 #else /* SYSTEM_MALLOC */
|
0
|
217 mallocobjs =
|
|
218 mallocdocsrc =
|
177
|
219 #ifdef USE_DEBUG_MALLOC
|
|
220 malloclib = -ldmalloc
|
|
221 #endif /* USE_DEBUG_MALLOC */
|
0
|
222 #endif /* SYSTEM_MALLOC */
|
|
223
|
|
224 #ifdef HAVE_X_WINDOWS
|
|
225
|
|
226 # ifdef EXTERNAL_WIDGET
|
149
|
227 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
0
|
228
|
163
|
229 ## Now we try to figure out how to link a shared library.
|
|
230 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
231 ## library will not be created.
|
0
|
232
|
|
233 # ifdef USE_GCC
|
|
234 # ifdef USG5
|
|
235 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
294
|
236 extw_link_beg = $(CC) -shared
|
|
237 extw_link_mid = -Xlinker -z -Xlinker text -o
|
|
238 extw_link_end =
|
163
|
239 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
0
|
240 # elif !defined (LINUX) || defined (__ELF__)
|
|
241 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
294
|
242 extw_link_beg = $(CC) -shared
|
|
243 extw_link_mid = -o
|
|
244 extw_link_end =
|
0
|
245 # endif
|
|
246 # elif defined (USG5)
|
|
247 # if defined (IRIX)
|
|
248 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
|
294
|
249 extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
|
|
250 extw_link_mid = -o
|
|
251 extw_link_end =
|
0
|
252 # else /* not IRIX */
|
|
253 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
294
|
254 extw_link_beg = $(CC) -G
|
|
255 extw_link_mid = -z text -o
|
|
256 extw_link_end =
|
0
|
257 # endif /* not IRIX */
|
|
258 # else /* not USG5 */
|
|
259 # if defined (DEC_ALPHA) && defined (OSF1)
|
163
|
260 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
294
|
261 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
|
|
262 extw_link_mid = -o
|
|
263 extw_link_end = $(LIBES)
|
0
|
264 # else /* !(DEC_ALPHA && OSF1) */
|
|
265 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
294
|
266 extw_link_beg = $(LD) -dc
|
|
267 extw_link_mid = -assert pure-text -o
|
|
268 extw_link_end =
|
0
|
269 # endif /* !(DEC_ALPHA && OSF1) */
|
|
270 # endif /* not USG5 */
|
|
271
|
|
272 # ifdef LWLIB_USES_MOTIF
|
|
273 # ifdef EXTW_LINK
|
157
|
274 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
0
|
275 # else
|
157
|
276 motif_other_files = libextcli_Xm.a
|
0
|
277 # endif
|
223
|
278 #endif /* LWLIB_USES_MOTIF */
|
0
|
279
|
|
280 # ifdef EXTW_LINK
|
157
|
281 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
0
|
282 # endif
|
157
|
283 other_files=\
|
|
284 ${motif_other_files}\
|
|
285 libextcli_Xt.a libextcli_Xlib.a\
|
|
286 ${shared_other_files}
|
165
|
287
|
|
288 all: ${other_files}
|
149
|
289 # endif /* EXTERNAL_WIDGET */
|
0
|
290
|
274
|
291 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
292 dnd_objs = @dnd_objs@
|
|
293 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
294
|
|
295 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
149
|
296 #endif /* HAVE_X_WINDOWS */
|
0
|
297
|
163
|
298 ## define otherobjs as list of object files that make-docfile
|
|
299 ## should not be told about.
|
380
|
300 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
263
|
301 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
302 othersrcs = $(otherobjs:.o=.c)
|
0
|
303
|
380
|
304 LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
0
|
305
|
|
306 #ifdef I18N3
|
149
|
307 mo_dir = ${etcdir}
|
|
308 mo_file = ${mo_dir}emacs.mo
|
0
|
309 #endif
|
|
310
|
267
|
311 LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
|
0
|
312 DUMPENV = $(LOADPATH)
|
380
|
313 temacs_loadup = $(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el
|
|
314 dump_temacs = ${temacs_loadup} dump
|
|
315 run_temacs = ${temacs_loadup} run-temacs
|
0
|
316
|
167
|
317 release: temacs ${libsrc}DOC $(mo_file) ${other_files}
|
0
|
318 #ifdef CANNOT_DUMP
|
280
|
319 ln temacs ${PROGNAME}
|
0
|
320 #else
|
|
321 #ifdef HAVE_SHM
|
|
322 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
323 w=`pwd`; cd ${srcdir} && $${w}/temacs -nl -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
324 else true; fi
|
104
|
325 @touch SATISFIED
|
267
|
326 -$(DUMPENV) ./temacs -nl -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
327 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
328 @$(RM) SATISFIED
|
0
|
329 #else /* ! defined (HAVE_SHM) */
|
|
330 -if [ -w ${srcdir}/../lisp ]; then \
|
267
|
331 w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \
|
0
|
332 else true; fi
|
104
|
333 @touch SATISFIED
|
267
|
334 -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
|
173
|
335 @if test ! -f SATISFIED; then $(RECURSIVE_MAKE) $@; fi
|
163
|
336 @$(RM) SATISFIED
|
0
|
337 #endif /* ! defined (HAVE_SHM) */
|
|
338 touch release
|
|
339 #endif /* ! defined (CANNOT_DUMP) */
|
|
340
|
280
|
341 ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
|
183
|
342 @$(RM) $@ && touch SATISFIED
|
380
|
343 -${dump_temacs}
|
|
344 @if test -f $@; then if test -f SATISFIED; then \
|
272
|
345 echo "Testing for Lisp shadows ..."; \
|
280
|
346 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
193
|
347 $(RM) SATISFIED; exit 0; fi; \
|
251
|
348 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
|
|
349 $(RECURSIVE_MAKE) $@;
|
173
|
350
|
267
|
351 fastdump: temacs
|
280
|
352 @$(RM) ${PROGNAME} && touch SATISFIED
|
382
|
353 -${dump_temacs}
|
380
|
354 @if test -f ${PROGNAME}; then if test -f SATISFIED; then \
|
280
|
355 ./${PROGNAME} -batch -vanilla -f list-load-path-shadows; fi; \
|
267
|
356 $(RM) SATISFIED; exit 0; fi; \
|
|
357 if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi;
|
|
358
|
183
|
359 FRC.update-elc.stamp :
|
|
360
|
215
|
361 update-elc.stamp : temacs FRC.update-elc.stamp
|
173
|
362 @touch NOBYTECOMPILE
|
267
|
363 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
183
|
364 @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
|
|
365 $(RM) NOBYTECOMPILE
|
0
|
366
|
|
367 obj_src = $(objs:.o=.c)
|
|
368
|
263
|
369 dortl : $(obj_rtl) $(otherrtls)
|
272
|
370 echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el
|
263
|
371 (for a in $(obj_src) $(othersrcs);do \
|
|
372 echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\
|
272
|
373 done)
|
263
|
374 echo "))" >> ${srcdir}/../lisp/source-files.el
|
|
375
|
70
|
376 #ifdef DYNODUMP
|
163
|
377 dynodump_deps = ../dynodump/dynodump.so
|
|
378 ../dynodump/dynodump.so:
|
173
|
379 cd ../dynodump && $(RECURSIVE_MAKE)
|
149
|
380 #endif /* DYNODUMP */
|
0
|
381
|
185
|
382 ${libsrc}DOC: temacs update-elc.stamp
|
169
|
383 $(RM) ${libsrc}DOC; \
|
267
|
384 ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \
|
163
|
385 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
|
|
386 ${obj_src} ${mallocdocsrc} ${rallocdocsrc}
|
0
|
387
|
|
388 dump_elcs: dump-elcs
|
|
389
|
|
390 dump-elcs: temacs
|
267
|
391 -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
|
0
|
392
|
80
|
393 all-elc all-elcs:
|
173
|
394 cd .. && $(RECURSIVE_MAKE) all-elc
|
80
|
395
|
70
|
396 #ifdef I18N3
|
|
397
|
|
398 # if defined(SPARC) && !defined(USG)
|
|
399 xgettext= /usr/openwin/bin/xgettext
|
|
400 xgettext_args= -o emacs -m_X messages
|
|
401 msgfmt= /usr/openwin/bin/msgfmt
|
|
402 # else
|
|
403 xgettext= xgettext
|
|
404 xgettext_args= -s -d emacs -M_X messages
|
|
405 msgfmt= msgfmt
|
|
406 #endif
|
|
407
|
167
|
408 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
|
|
409 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
|
80
|
410 cd ${libsrc} && ${xgettext} ${xgettext_args}
|
163
|
411 $(RM) ${mo_dir}emacs.po
|
149
|
412 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
|
70
|
413
|
149
|
414 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
|
|
415 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
|
70
|
416
|
|
417 ${libsrc}make-msgfile:
|
173
|
418 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
|
70
|
419
|
|
420 ${libsrc}make-po:
|
173
|
421 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
|
70
|
422
|
|
423 #endif /* I18N3 */
|
|
424
|
0
|
425 ${libsrc}make-docfile:
|
173
|
426 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
|
0
|
427
|
163
|
428 ## Lint Section
|
153
|
429 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
0
|
430 LINTFILES= $(objs:.o=.ln)
|
149
|
431 LINTINCLUDES = $(cppflags)
|
163
|
432 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
2
|
433 LINTFLAGS= -fd -m -s -u -v -x
|
0
|
434 lint: $(LINTFILES)
|
|
435 $(LINT.c) $(LINTFILES)
|
163
|
436 ## end of Lint Section
|
0
|
437
|
157
|
438 temacs_deps=\
|
183
|
439 $(start_files) ${objs} ${otherobjs}\
|
255
|
440 $(lwlib_deps) $(dynodump_deps)
|
0
|
441
|
157
|
442 temacs_link_args=\
|
173
|
443 ${start_flags} ${ldflags}\
|
163
|
444 -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
|
0
|
445
|
149
|
446 temacs: $(temacs_deps)
|
183
|
447 $(LD) $(temacs_link_args)
|
|
448
|
|
449 .PHONY : run-temacs
|
|
450
|
219
|
451 run-temacs: temacs
|
380
|
452 -${run_temacs}
|
|
453
|
|
454 ## We have automated tests!!
|
|
455 testdir = ${srcdir}/../tests/automated
|
|
456 tests = \
|
382
|
457 ${testdir}/hash-table-tests.el \
|
|
458 ${testdir}/lisp-tests.el \
|
|
459 ${testdir}/database-tests.el \
|
|
460 ${testdir}/byte-compiler-tests.el \
|
|
461 ${testdir}/md5-tests.el
|
380
|
462 batch_test_emacs = -batch -l ${testdir}/test-harness.el -f batch-test-emacs ${tests}
|
|
463
|
|
464 .PHONY: check check-temacs
|
|
465 check:
|
|
466 ./${PROGNAME} ${batch_test_emacs}
|
|
467 check-temacs:
|
|
468 ${run_temacs} ${batch_test_emacs}
|
183
|
469
|
|
470 ## Debugging targets:
|
|
471 ##
|
380
|
472 ## None of the debugging products work with a dumped xemacs binary,
|
|
473 ## because it does unexpected things like free memory that has been
|
|
474 ## malloc'ed in a *different* process!! So we need to run these on
|
|
475 ## temacs.
|
183
|
476
|
380
|
477 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
|
78
|
478 rtc_patch.o:
|
|
479 rtc_patch_area -o $@
|
|
480
|
149
|
481 rtcmacs: $(temacs_deps) rtc_patch.o
|
173
|
482 $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
|
78
|
483 mv temacs rtcmacs
|
|
484
|
380
|
485 .PHONY: run-rtcmacs
|
183
|
486 run-rtcmacs: rtcmacs
|
78
|
487 dbx -q -C -c \
|
|
488 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
489 dbxenv suppress_startup_message 5.0; \
|
|
490 ignore POLL; \
|
|
491 check -access; \
|
|
492 suppress rui; \
|
267
|
493 runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
|
78
|
494 run' rtcmacs
|
|
495
|
380
|
496 ## Purify, Quantify, PureCoverage are software quality products from
|
|
497 ## Rational, formerly Pure Atria, formerly Pure Software.
|
|
498 ##
|
183
|
499 ## Purify
|
380
|
500 PURIFY_PROG = purify
|
|
501 PURIFY_FLAGS = -chain-length=32 -ignore-signals=SIGPOLL -threads=yes \
|
371
|
502 -cache-dir=./purecache -always-use-cache-dir=yes -pointer-mask=0x0fffffff
|
380
|
503 PURIFY_LIBS = -lpthread
|
149
|
504 puremacs: $(temacs_deps)
|
380
|
505 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
|
|
506 cp $@ temacs
|
0
|
507
|
183
|
508 ## Quantify
|
|
509 #ifdef QUANTIFY
|
380
|
510 QUANTIFY_PROG = quantify
|
|
511 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
|
|
512 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
|
|
513 cppflags += -I$(QUANTIFY_HOME)
|
|
514 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
|
183
|
515
|
149
|
516 quantmacs: $(temacs_deps)
|
380
|
517 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
|
|
518 cp $@ temacs
|
183
|
519 #endif /* QUANTIFY */
|
0
|
520
|
380
|
521
|
183
|
522 PURECOV_PROG=purecov
|
149
|
523 covmacs: $(temacs_deps)
|
|
524 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
0
|
525
|
183
|
526
|
223
|
527 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
149
|
528 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
529 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
530
|
263
|
531 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
532 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
533 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
534
|
223
|
535 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
149
|
536 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
0
|
537 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
538
|
263
|
539 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
540 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
541 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
542
|
163
|
543 ## Position-independent code for shared library creation
|
149
|
544 #if USE_GCC
|
|
545 pic_arg = -fpic
|
|
546 #elif defined (IRIX)
|
|
547 pic_arg = -KPIC
|
|
548 # else
|
|
549 pic_arg = -K pic
|
|
550 #endif
|
|
551
|
0
|
552 #ifdef EXTERNAL_WIDGET
|
|
553
|
157
|
554 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
555 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
556 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
557 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
558 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
559 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
0
|
560
|
163
|
561 ## Add dependencies so things work right with a parallel make
|
0
|
562 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
149
|
563 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
564 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
565
|
|
566 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
567 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
|
0
|
568 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
569
|
|
570 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
149
|
571 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
572 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
573
|
|
574 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
149
|
575 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
0
|
576 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
577
|
|
578 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
|
149
|
579 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
|
0
|
580 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
581
|
|
582 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
|
149
|
583 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
0
|
584 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
585
|
163
|
586 ## We compile the common files twice (once with PIC and once without)
|
|
587 ## because on some systems, compiling with PIC but not linking into
|
|
588 ## a shared library messes things up.
|
|
589
|
0
|
590 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
|
149
|
591 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
|
0
|
592 mv extw-Xt.o extw-Xt-shared.o
|
|
593
|
|
594 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
|
149
|
595 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
596 mv extw-Xlib.o extw-Xlib-shared.o
|
|
597
|
|
598 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
|
149
|
599 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
|
0
|
600 mv extw-Xt.o extw-Xt-nonshared.o
|
|
601
|
|
602 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
|
149
|
603 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
|
0
|
604 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
605
|
157
|
606 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
|
|
607 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
|
0
|
608
|
157
|
609 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
|
|
610 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
|
0
|
611
|
157
|
612 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
|
|
613 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
|
0
|
614
|
|
615 #ifdef EXTW_LINK
|
|
616
|
157
|
617 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
|
294
|
618 ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end}
|
0
|
619
|
157
|
620 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
|
294
|
621 ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end}
|
0
|
622
|
157
|
623 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
|
294
|
624 ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end}
|
0
|
625
|
149
|
626 #endif /* EXTW_LINK */
|
0
|
627
|
|
628 #endif /* EXTERNAL_WIDGET */
|
|
629
|
|
630 config.h: ${srcdir}/config.h.in
|
183
|
631 puresize-adjust.h: ${srcdir}/puresize.h
|
163
|
632 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
|
0
|
633
|
251
|
634 config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h :
|
163
|
635 @echo "The file $@ needs to be re-generated."
|
|
636 @echo "Please run a make in the top level directory."
|
|
637 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
638 @exit 1
|
0
|
639
|
163
|
640 ## Some machines have alloca built-in.
|
|
641 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
642 ## be used but generate no code.
|
|
643 ## Some have it written in assembler in alloca.s.
|
|
644 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
|
645
|
0
|
646
|
|
647 #ifdef C_ALLOCA
|
163
|
648 ## We could put something in alloca.c to #define free and malloc
|
|
649 ## whenever emacs was #defined, but that's not appropriate for all
|
|
650 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
|
|
651
|
0
|
652 alloca.o : ${srcdir}/alloca.c
|
193
|
653 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
|
0
|
654 #else
|
|
655 #ifndef HAVE_ALLOCA
|
|
656 alloca.o : ${srcdir}/alloca.s config.h
|
163
|
657 ## $(CPP) is cc -E, which may get confused by filenames
|
|
658 ## that do not end in .c. So copy file to a safe name. */
|
|
659 ## cp ${srcdir}/alloca.s allocatem.c
|
|
660 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
661 ## since some assemblers barf on them. Use a different basename for the
|
|
662 ## output file, since some stupid compilers (Green Hill) use that
|
|
663 ## name for the intermediate assembler file.
|
149
|
664 $(CPP) $(cppflags) allocatem.c | \
|
0
|
665 sed -e 's///' -e 's/^#.*//' | \
|
|
666 sed -n -e '/^..*$$/p' > allocax.s
|
163
|
667 @$(RM) alloca.o
|
|
668 ## Xenix, in particular, needs to run assembler via cc.
|
0
|
669 $(CC) -c allocax.s
|
|
670 mv allocax.o alloca.o
|
163
|
671 $(RM) allocax.s allocatem.c
|
0
|
672 #endif /* HAVE_ALLOCA */
|
|
673 #endif /* ! defined (C_ALLOCA) */
|
|
674
|
|
675 #ifdef HAVE_NATIVE_SOUND
|
|
676 sunplay.o: ${srcdir}/sunplay.c
|
193
|
677 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
|
0
|
678 hpplay.o: ${srcdir}/hpplay.c
|
193
|
679 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
|
0
|
680 #endif /* HAVE_NATIVE_SOUND */
|
|
681
|
163
|
682 ## System-specific programs to be made.
|
|
683 ## ${other_files}, $(objects_system) and $(objects_machine)
|
|
684 ## select which of these should be compiled. */
|
|
685
|
171
|
686 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
0
|
687 mostlyclean:
|
272
|
688 $(RM) temacs puremacs quantmacs prefix-args *.o *.i \
|
259
|
689 core temacs.exe puresize-adjust.h sheap-adjust.h
|
171
|
690 clean: mostlyclean versionclean
|
183
|
691 $(RM) libextcli* update-elc.stamp
|
163
|
692 ## This is used in making a distribution.
|
|
693 ## Do not use it on development directories!
|
171
|
694 distclean: clean
|
276
|
695 $(RM) config.h paths.h Emacs.ad.h \
|
382
|
696 GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
|
0
|
697 realclean: distclean
|
|
698 versionclean:
|
280
|
699 $(RM) ${PROGNAME} ${PROGNAME}.exe ${libsrc}DOC
|
0
|
700 extraclean: realclean
|
171
|
701 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
0
|
702
|
163
|
703 .PHONY : lock unlock
|
276
|
704 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
120
|
705 config.h.in README COPYING ChangeLog
|
0
|
706 unlock:
|
|
707 chmod u+w $(SOURCES)
|
|
708
|
|
709 relock:
|
|
710 chmod -w $(SOURCES)
|
|
711
|
272
|
712 ## Dependency processing using home-grown script, not makedepend
|
380
|
713 .PHONY: depend
|
|
714 FRC.depend:
|
272
|
715 depend: FRC.depend
|
380
|
716 cd ${srcdir} && $(RM) depend.tmp && \
|
|
717 perl make-src-depend > depend.tmp && \
|
|
718 $(RM) depend && mv depend.tmp depend
|