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.
|
1315
|
6 ## Copyright (C) 2001, 2002, 2003 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
|
428
|
30 PROGNAME=@PROGNAME@
|
|
31
|
442
|
32 #define NOT_C_CODE
|
|
33 #include "config.h"
|
|
34
|
|
35 #ifdef PDUMP
|
|
36 DUMP_TARGET = ${PROGNAME}.dmp
|
|
37 EXE_TARGET = ${PROGNAME}
|
460
|
38 DUMP_ID = dump-id.o
|
442
|
39 #else
|
|
40 DUMP_TARGET = ${PROGNAME}
|
|
41 EXE_TARGET = temacs
|
|
42 #endif
|
|
43
|
428
|
44 ## For performance and consistency, no built-in rules.
|
|
45 .SUFFIXES:
|
|
46 .SUFFIXES: .c .h .o .i .s .dep
|
|
47
|
|
48 #ifdef USE_GNU_MAKE
|
|
49 RECURSIVE_MAKE=$(MAKE)
|
|
50 #else
|
|
51 @SET_MAKE@
|
|
52 RECURSIVE_MAKE=@RECURSIVE_MAKE@
|
|
53 #endif
|
|
54
|
|
55 SHELL=/bin/sh
|
|
56 RM = rm -f
|
|
57
|
|
58 lispdir = ${srcdir}/../lisp/
|
|
59 moduledir = ${srcdir}/../modules/
|
|
60 libsrc = ../lib-src/
|
|
61 etcdir = ../etc/
|
|
62
|
|
63 ## Here are the things that we expect ../configure to edit.
|
|
64 prefix=@prefix@
|
|
65 srcdir=@srcdir@
|
|
66 blddir=@blddir@
|
|
67 version=@version@
|
|
68 CC=@XEMACS_CC@
|
|
69 CPP=@CPP@
|
|
70 CFLAGS=@CFLAGS@
|
|
71 CPPFLAGS=@CPPFLAGS@
|
|
72 LDFLAGS=@LDFLAGS@
|
|
73
|
|
74 c_switch_all=@c_switch_all@
|
|
75 ld_switch_all=@ld_switch_all@
|
|
76 ld_libs_all=@ld_libs_all@
|
|
77 ld_dynamic_link_flags=@ld_dynamic_link_flags@
|
|
78
|
|
79 extra_objs=@extra_objs@
|
|
80 LN_S=@LN_S@
|
|
81
|
|
82 ld_switch_shared=@ld_switch_shared@
|
|
83 start_files=@start_files@
|
|
84 start_flags=@start_flags@
|
|
85 LD=@ld@
|
|
86 lib_gcc=@lib_gcc@
|
|
87 ##libmcheck=@libmcheck@
|
|
88
|
|
89
|
|
90 ## With the traditional VPATH setting, it is not possible to
|
|
91 ## simultaneously compile in-place and in another directory. The
|
|
92 ## mistaken definition is that *all* dependencies are searched for in
|
|
93 ## the VPATH directory, rather than just the dependencies that are not
|
|
94 ## themselves targets. Thus, if there is an up-to-date .o file in the
|
|
95 ## in-place location, it will not get recompiled in the not-in-place
|
|
96 ## location.
|
|
97
|
|
98 ## The GNU Make "vpath" directive continues this tradition, but at
|
|
99 ## least lets you restrict the classes of files that it applies to.
|
|
100 ## This allows us to kludge around the problem.
|
|
101
|
|
102 #ifdef USE_GNU_MAKE
|
|
103 vpath %.c @srcdir@
|
|
104 vpath %.h @srcdir@
|
|
105 ## now list files that should NOT be searched in the srcdir.
|
|
106 ## This includes any .c or .h built from something else
|
|
107 ## (e.g. a .in file).
|
|
108 vpath config.h
|
|
109 vpath paths.h
|
|
110 vpath Emacs.ad.h
|
|
111 vpath sheap-adjust.h
|
442
|
112 vpath dump-id.c
|
428
|
113 #else
|
|
114 VPATH=@srcdir@
|
|
115 #endif
|
|
116
|
|
117 RM = rm -f
|
|
118
|
|
119 LWLIB_SRCDIR = ${srcdir}/../lwlib
|
|
120
|
|
121 #ifdef HAVE_X_WINDOWS
|
|
122 lwlib_libs = ../lwlib/liblw.a
|
|
123 lwlib_deps = $(lwlib_libs)
|
|
124 $(lwlib_libs) :
|
|
125 cd ../lwlib && $(RECURSIVE_MAKE)
|
|
126
|
771
|
127 # ifdef AIX4
|
428
|
128 LIBI18N = -li18n
|
771
|
129 # endif
|
428
|
130
|
|
131 X11_libs = $(LIBI18N)
|
|
132 #endif /* HAVE_X_WINDOWS */
|
|
133
|
771
|
134 #########################################################################
|
|
135
|
1315
|
136 ## Object files needed for compilation, and other rebuilt files.
|
771
|
137
|
1315
|
138 ## NOTE: Some of the object files are specified in this file, and others in
|
|
139 ## configure.in. The general rule is that they be specified here whenever
|
|
140 ## possible -- in practice, that means that they have clear dependencies on
|
|
141 ## configure defines. They should be in configure.in when there is no
|
|
142 ## configure define or when there is extremely hairy code to determine
|
|
143 ## which files are needed (e.g. native sound support) and it would be
|
|
144 ## pointless to duplicate that code.
|
771
|
145
|
793
|
146 gui_objs= gui.o
|
771
|
147 #ifdef HAVE_MENUBARS
|
|
148 gui_objs += menubar.o
|
|
149 #endif
|
|
150 #ifdef HAVE_SCROLLBARS
|
|
151 gui_objs += scrollbar.o
|
|
152 #endif
|
|
153 #ifdef HAVE_DIALOGS
|
|
154 gui_objs += dialog.o
|
|
155 #endif
|
|
156 #ifdef HAVE_TOOLBARS
|
|
157 gui_objs += toolbar.o
|
|
158 #endif
|
|
159
|
|
160 #ifdef HAVE_X_WINDOWS
|
|
161 x_objs=console-x.o device-x.o event-Xt.o frame-x.o \
|
|
162 glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o
|
|
163 x_gui_objs=$(gui_objs:.o=-x.o)
|
|
164 #ifdef HAVE_TOOLBARS
|
|
165 x_gui_objs += toolbar-common.o
|
|
166 #endif
|
|
167 #endif
|
|
168
|
|
169 #ifdef HAVE_MS_WINDOWS
|
|
170 mswindows_objs=console-msw.o device-msw.o event-msw.o frame-msw.o \
|
|
171 objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o
|
|
172 mswindows_gui_objs=$(gui_objs:.o=-msw.o)
|
|
173 #endif
|
|
174
|
|
175 #ifdef HAVE_TTY
|
|
176 tty_objs=console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o \
|
|
177 redisplay-tty.o cm.o
|
|
178 #endif
|
|
179
|
|
180 #ifdef HAVE_GTK
|
|
181 gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \
|
|
182 objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \
|
|
183 gtk-xemacs.o ui-gtk.o
|
|
184 gtk_gui_objs=$(gui_objs:.o=-gtk.o)
|
|
185 #ifdef HAVE_TOOLBARS
|
|
186 gtk_gui_objs += toolbar-common.o
|
|
187 #endif
|
|
188 #endif
|
|
189
|
|
190 #ifdef HAVE_BALLOON_HELP
|
|
191 balloon_help_objs=balloon_help.o balloon-x.o
|
|
192 #endif
|
|
193
|
|
194 #ifdef CLASH_DETECTION
|
|
195 clash_detection_objs=filelock.o
|
|
196 #endif
|
|
197
|
|
198 #ifdef HAVE_DATABASE
|
|
199 database_objs=database.o
|
|
200 #endif
|
|
201
|
|
202 #ifdef DEBUG_XEMACS
|
|
203 debug_objs=debug.o tests.o
|
|
204 #endif
|
|
205
|
|
206 #ifdef HAVE_UNIXOID_EVENT_LOOP
|
|
207 event_unixoid_objs=event-unixoid.o
|
|
208 #endif
|
|
209
|
|
210 #ifdef HAVE_GIF
|
|
211 gif_objs=dgif_lib.o gif_io.o
|
|
212 #endif
|
|
213
|
|
214 #ifdef HAVE_GPM
|
|
215 gpm_objs=gpmevent.o
|
|
216 #endif
|
|
217
|
996
|
218 #if defined(HAVE_LDAP) && !defined(HAVE_SHLIB)
|
|
219 ldap_objs=../modules/ldap/eldap.o
|
771
|
220 #endif
|
|
221
|
|
222 #ifdef MULE
|
|
223 mule_objs=mule-ccl.o mule-charset.o mule-coding.o
|
|
224 #endif
|
|
225
|
|
226 #ifdef HAVE_CANNA
|
|
227 mule_canna_objs=mule-canna.o
|
|
228 #endif
|
|
229
|
|
230 #ifdef HAVE_WNN
|
|
231 mule_wnn_objs=mule-wnnfns.o
|
|
232 #endif
|
|
233
|
996
|
234 #if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB)
|
|
235 postgresql_objs=../modules/postgresql/postgresql.o
|
771
|
236 #endif
|
|
237
|
|
238 #ifdef HAVE_WIN32_PROCESSES
|
|
239 process_objs=process-nt.o
|
|
240 #elif defined (HAVE_UNIX_PROCESSES)
|
|
241 process_objs=process-unix.o
|
|
242 #endif
|
|
243
|
|
244 #ifdef HAVE_SETITIMER
|
|
245 profile_objs=profile.o
|
|
246 #endif
|
|
247
|
442
|
248 #if defined (HEAP_IN_DATA) && !defined (PDUMP)
|
|
249 sheap_objs=sheap.o
|
|
250 #endif
|
|
251
|
771
|
252 #ifdef HAVE_SHLIB
|
|
253 shlib_objs=sysdll.o emodules.o
|
|
254 #endif
|
|
255
|
|
256 #ifdef SUNPRO
|
|
257 sunpro_objs=sunpro.o
|
428
|
258 #endif
|
|
259
|
771
|
260 #ifdef TOOLTALK
|
|
261 tooltalk_objs=tooltalk.o
|
|
262 #endif
|
|
263
|
|
264 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
|
265 win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \
|
|
266 xemacs_res.o
|
611
|
267 #endif
|
|
268
|
428
|
269 ## -Demacs is needed to make some files produce the correct version
|
|
270 ## for use in Emacs.
|
|
271
|
|
272 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
|
|
273 cflags = $(CFLAGS) $(cppflags)
|
448
|
274 #if defined (WIN32_NATIVE) || defined (CYGWIN)
|
606
|
275 ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags)
|
1213
|
276 # if defined (CYGWIN)
|
|
277 ldflags += -Wl,--script=s/cygwin.sc
|
|
278 # endif
|
448
|
279 #else
|
428
|
280 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
|
448
|
281 #endif
|
428
|
282
|
|
283 #ifdef SOLARIS2
|
|
284 %.o : %.c
|
|
285 #else
|
|
286 .c.o:
|
|
287 #endif
|
|
288 $(CC) -c $(cflags) $<
|
|
289
|
|
290 ## Create preprocessor output (debugging purposes only)
|
|
291 .c.i:
|
|
292 #ifdef __GNUC__
|
|
293 $(CC) -E $(cppflags) -o $@ $<
|
|
294 #else /* works on Solaris; what about other systems? */
|
|
295 $(CC) -P $(cppflags) $<
|
|
296 #endif /* compiler */
|
|
297
|
|
298 ## Create assembler output (debugging purposes only)
|
|
299 .c.s:
|
|
300 $(CC) -S -c $(cflags) $<
|
|
301
|
|
302 ## Create RTL files
|
|
303 %.c.rtl : %.c
|
|
304 $(CC) -dr -c $(cflags) $<
|
|
305
|
|
306 ## lastfile must follow all files whose initialized data areas should
|
|
307 ## be dumped as pure by dump-emacs.
|
|
308
|
|
309 ## NOTE: The last line cannot be all macros, because make will barf
|
|
310 ## if they all come out null.
|
|
311
|
|
312 objs=\
|
851
|
313 abbrev.o alloc.o alloca.o \
|
|
314 $(balloon_help_objs) blocktype.o buffer.o bytecode.o \
|
853
|
315 callint.o casefiddle.o casetab.o chartab.o \
|
851
|
316 $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \
|
|
317 console-stream.o\
|
771
|
318 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
|
851
|
319 dynarr.o \
|
771
|
320 editfns.o elhash.o emacs.o eval.o events.o\
|
|
321 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
|
|
322 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
|
|
323 font-lock.o frame.o\
|
|
324 general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\
|
793
|
325 glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
|
|
326 gutter.o\
|
771
|
327 hash.o imgproc.o indent.o insdel.o intl.o\
|
|
328 keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\
|
|
329 macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\
|
|
330 $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) objects.o opaque.o\
|
|
331 $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\
|
|
332 rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\
|
|
333 search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\
|
|
334 specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\
|
|
335 text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\
|
|
336 widget.o window.o $(win32_objs)
|
428
|
337
|
|
338 obj_rtl = $(objs:.o=.c.rtl)
|
|
339
|
|
340 #ifdef REL_ALLOC
|
|
341 rallocdocsrc = ralloc.c
|
|
342 rallocobjs = ralloc.o
|
|
343 #endif
|
|
344
|
|
345 malloclib = $(libmcheck)
|
|
346 #ifndef SYSTEM_MALLOC
|
|
347 # ifdef GNU_MALLOC /* GNU malloc */
|
|
348 # ifdef ERROR_CHECK_MALLOC
|
|
349 #ifdef DOUG_LEA_MALLOC
|
|
350 mallocobjs = free-hook.o vm-limit.o
|
|
351 #else
|
|
352 mallocobjs = gmalloc.o free-hook.o vm-limit.o
|
|
353 #endif
|
|
354 mallocdocsrc = free-hook.c
|
|
355 # else /* New GNU malloc, sans error checking */
|
|
356 #ifdef DOUG_LEA_MALLOC
|
|
357 mallocobjs = vm-limit.o
|
|
358 #else
|
|
359 mallocobjs = gmalloc.o vm-limit.o
|
|
360 #endif
|
|
361 mallocdocsrc =
|
|
362 # endif /* ERROR_CHECK_MALLOC */
|
|
363 # else /* Older GNU malloc */
|
|
364 mallocobjs = malloc.o
|
|
365 mallocdocsrc =
|
|
366 # endif /* Older GNU malloc */
|
|
367 #else /* SYSTEM_MALLOC */
|
|
368 mallocobjs =
|
|
369 mallocdocsrc =
|
|
370 #ifdef USE_DEBUG_MALLOC
|
|
371 malloclib = -ldmalloc
|
|
372 #endif /* USE_DEBUG_MALLOC */
|
|
373 #endif /* SYSTEM_MALLOC */
|
|
374
|
|
375 #ifdef HAVE_X_WINDOWS
|
|
376
|
|
377 # ifdef EXTERNAL_WIDGET
|
|
378 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
379
|
|
380 # ifdef LWLIB_USES_MOTIF
|
|
381 # ifdef EXTW_LINK
|
|
382 motif_other_files = libextcli_Xm.a libextcli_Xm.so.1
|
|
383 # else
|
|
384 motif_other_files = libextcli_Xm.a
|
|
385 # endif
|
|
386 #endif /* LWLIB_USES_MOTIF */
|
|
387
|
|
388 # ifdef EXTW_LINK
|
|
389 shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1
|
|
390 # endif
|
|
391 other_files=\
|
|
392 ${motif_other_files}\
|
|
393 libextcli_Xt.a libextcli_Xlib.a\
|
|
394 ${shared_other_files}
|
|
395
|
|
396 # endif /* EXTERNAL_WIDGET */
|
|
397
|
|
398 # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE)
|
|
399 dnd_objs = @dnd_objs@
|
|
400 # endif /* HAVE_OFFIX_DND || HAVE_CDE */
|
|
401
|
|
402 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs)
|
|
403 #endif /* HAVE_X_WINDOWS */
|
|
404
|
|
405 ## define otherobjs as list of object files that make-docfile
|
|
406 ## should not be told about.
|
|
407 otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
|
|
408 otherrtls = $(otherobjs:.o=.c.rtl)
|
|
409 othersrcs = $(otherobjs:.o=.c)
|
|
410
|
|
411 LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc)
|
|
412
|
|
413 #ifdef I18N3
|
|
414 mo_dir = ${etcdir}
|
|
415 mo_file = ${mo_dir}emacs.mo
|
|
416 #endif
|
|
417
|
1315
|
418 #########################################################################
|
|
419
|
|
420 ## Primary rebuilding process
|
|
421
|
|
422 DO_TEMACS = ${DUMPENV} ./${EXE_TARGET}
|
|
423 DO_XEMACS = ./${PROGNAME}
|
|
424 LISP = ${srcdir}/../lisp
|
|
425
|
|
426 BATCH = -no-packages -batch
|
|
427 BATCH_PACKAGES = -vanilla -batch
|
|
428 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
|
|
429 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
|
|
430 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
|
|
431 temacs_loadup_args = -l $(LISP)/loadup.el
|
|
432 dump_temacs_args = $(temacs_loadup_args) dump
|
|
433 run_temacs_args = $(temacs_loadup_args) run-temacs
|
|
434 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
|
|
435
|
|
436 debug_temacs = gdb $(EXE_TARGET)
|
|
437
|
|
438 .PHONY : build-the-mofo release update-elc update-elc-2 load-shadows
|
|
439
|
|
440 ## Compile, dump, and make sure all .elc files are up-to-date.
|
|
441
|
|
442 ## NOTE: The dependencies would (should) look like the following
|
|
443 ## commented-out statement in linear order, but apparently this causes
|
|
444 ## problems with some versions of `make' because there is insufficient
|
|
445 ## serialization of the build steps. Evidently the .NO_PARALLEL directive
|
|
446 ## doesn't help. `make' really seems to be designed to have all
|
|
447 ## dependencies proceed upward, not across, and to be all calculable before
|
|
448 ## actually running anything. The problem here is that update-elc may
|
|
449 ## touch NEEDTODUMP and thus create an additional dependency
|
|
450 ## -- but *NOT UNTIL* that step is run. There is no way I can come up with
|
|
451 ## to express such a dependency in upward fashion.
|
428
|
452
|
1315
|
453 ## build-the-mofo: ${EXE_TARGET} update-elc ${libsrc}DOC $(mo_file) ${other_files} ${DUMP_TARGET} update-elc-2 $(LISP)/finder-inf.el load-shadows
|
|
454
|
1324
|
455 build-the-mofo: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} ${DUMP_TARGET} load-shadows
|
1315
|
456 .NO_PARALLEL: ${EXE_TARGET} update-elc ${libsrc}DOC ${DUMP_TARGET} update-elc-2
|
|
457
|
|
458 release: all
|
|
459 -if [ -w $(LISP) ]; then \
|
|
460 w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd ${BATCH} -l $(LISP)/inc-vers; \
|
428
|
461 else true; fi
|
1315
|
462 -${dump_temacs}
|
428
|
463 touch release
|
1315
|
464
|
|
465 update-elc: $(EXE_TARGET)
|
|
466 $(TEMACS_BATCH) -l $(LISP)/update-elc.el
|
|
467
|
|
468 ## Update out-of-date .elcs, other than needed for dumping.
|
1324
|
469 update-elc-2: update-elc $(EXE_TARGET) $(DUMP_TARGET)
|
1315
|
470 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
|
428
|
471
|
1315
|
472 $(LISP)/finder-inf.el: update-elc-2 $(EXE_TARGET) $(DUMP_TARGET)
|
|
473 @echo "Building finder database ..."
|
|
474 $(XEMACS_BATCH) -eval '(setq finder-compile-keywords-quiet t)' \
|
|
475 -l finder -f finder-compile-keywords
|
|
476 @echo "Building finder database ...(done)"
|
|
477
|
|
478 load-shadows: $(LISP)/finder-inf.el $(EXE_TARGET) $(DUMP_TARGET)
|
|
479 #ifndef QUICK_BUILD
|
|
480 @echo "Testing for Lisp shadows ..."
|
|
481 @$(XEMACS_BATCH) -f list-load-path-shadows
|
|
482 #endif
|
|
483
|
|
484 ## This file is touched by update-elc.el when redumping is necessary.
|
|
485 NEEDTODUMP:
|
|
486 touch NEEDTODUMP
|
|
487
|
|
488 ${DUMP_TARGET}: ${EXE_TARGET} NEEDTODUMP
|
428
|
489 #ifdef HEAP_IN_DATA
|
442
|
490 @$(RM) $@ && touch SATISFIED
|
1315
|
491 ${dump_temacs}
|
|
492 @if test -f SATISFIED; then $(RM) SATISFIED; else $(RM) $@; \
|
|
493 $(RECURSIVE_MAKE) $@; fi
|
428
|
494 #else
|
442
|
495 @$(RM) $@
|
440
|
496 ${dump_temacs}
|
428
|
497 #endif
|
|
498
|
|
499 #ifdef DYNODUMP
|
|
500 dynodump_deps = ../dynodump/dynodump.so
|
|
501 ../dynodump/dynodump.so:
|
|
502 cd ../dynodump && $(RECURSIVE_MAKE)
|
|
503 #endif /* DYNODUMP */
|
|
504
|
1315
|
505 link_deps = $(start_files) ${objs} ${otherobjs} $(lwlib_deps) $(dynodump_deps)
|
|
506
|
|
507 temacs_deps = $(link_deps) ${DUMP_ID}
|
|
508
|
|
509 temacs_link_args = \
|
|
510 ${start_flags} ${ldflags} \
|
|
511 -o $@ ${start_files} ${objs} ${otherobjs} ${DUMP_ID} ${LIBES}
|
|
512
|
|
513 ${EXE_TARGET}: $(temacs_deps)
|
|
514 $(LD) $(temacs_link_args)
|
|
515
|
|
516 dump-id.c: ${libsrc}make-dump-id ${link_deps}
|
|
517 ${libsrc}make-dump-id
|
|
518
|
|
519 obj_src = $(objs:.o=.c)
|
|
520
|
1324
|
521 ${libsrc}DOC: ${libsrc}make-docfile NEEDTODUMP ${temacs_deps} ${EXE_TARGET}
|
1303
|
522 #ifdef QUICK_BUILD
|
|
523 if test ! -f $@ ; then \
|
|
524 #else
|
|
525 if true ; then \
|
|
526 #endif
|
1315
|
527 $(TEMACS_BATCH) -l $(LISP)/make-docfile.el -- \
|
428
|
528 -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
|
1303
|
529 ${obj_src} ${mallocdocsrc} ${rallocdocsrc} \
|
|
530 ${extra_doc_files} ; fi
|
428
|
531
|
1315
|
532 ${libsrc}make-dump-id:
|
|
533 cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id
|
|
534
|
|
535 ${libsrc}make-docfile:
|
|
536 cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
|
428
|
537
|
1315
|
538 .PHONY: fastdump
|
|
539 fastdump: ${EXE_TARGET}
|
|
540 @$(RM) ${DUMP_TARGET} && touch SATISFIED
|
|
541 -${dump_temacs}
|
|
542 @$(XEMACS_BATCH) -f list-load-path-shadows
|
428
|
543
|
1315
|
544 .PHONY: all-elc
|
|
545 all-elc:
|
|
546 cd .. && $(RECURSIVE_MAKE)
|
|
547
|
|
548 #########################################################################
|
|
549
|
|
550 ## Subsidiary dependency rules
|
428
|
551
|
|
552 #ifdef I18N3
|
|
553
|
|
554 # if defined(SPARC) && !defined(USG)
|
|
555 xgettext= /usr/openwin/bin/xgettext
|
|
556 xgettext_args= -o emacs -m_X messages
|
|
557 msgfmt= /usr/openwin/bin/msgfmt
|
|
558 # else
|
|
559 xgettext= xgettext
|
|
560 xgettext_args= -s -d emacs -M_X messages
|
|
561 msgfmt= msgfmt
|
|
562 #endif
|
|
563
|
|
564 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs}
|
|
565 ${libsrc}make-msgfile -o ${libsrc}messages ${objs}
|
|
566 cd ${libsrc} && ${xgettext} ${xgettext_args}
|
|
567 $(RM) ${mo_dir}emacs.po
|
|
568 cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
|
|
569
|
|
570 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
|
|
571 cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po
|
|
572
|
|
573 ${libsrc}make-msgfile:
|
|
574 cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile
|
|
575
|
|
576 ${libsrc}make-po:
|
|
577 cd ${libsrc} && $(RECURSIVE_MAKE) make-po
|
|
578
|
|
579 #endif /* I18N3 */
|
|
580
|
|
581 TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
582 $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
583 mv EmacsShell-sub.o TopLevelEmacsShell.o
|
|
584
|
|
585 TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h
|
|
586 $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
587 mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl
|
|
588
|
|
589 TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
590 $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
591 mv EmacsShell-sub.o TransientEmacsShell.o
|
|
592
|
|
593 TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h
|
|
594 $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
|
|
595 mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
|
|
596
|
442
|
597 ## The above rules are subject to a race condition if using a parallel make.
|
|
598 TransientEmacsShell.o : TopLevelEmacsShell.o
|
|
599 TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
|
|
600
|
428
|
601 ## Position-independent code for shared library creation
|
|
602 #if USE_GCC
|
|
603 pic_arg = -fpic
|
|
604 #elif defined (IRIX)
|
|
605 pic_arg = -KPIC
|
|
606 # else
|
|
607 pic_arg = -K pic
|
|
608 #endif
|
|
609
|
|
610 #ifdef EXTERNAL_WIDGET
|
|
611
|
|
612 external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
613 external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o
|
|
614 external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o
|
|
615 external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
616 external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
|
|
617 external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
|
|
618
|
|
619 ## Add dependencies so things work right with a parallel make
|
|
620 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
|
|
621 $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
|
622 mv ExternalClient.o ExternalClient-Xm-shared.o
|
|
623
|
|
624 ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
625 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c
|
|
626 mv ExternalClient.o ExternalClient-Xt-shared.o
|
|
627
|
|
628 ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o
|
|
629 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
|
630 mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o
|
|
631
|
|
632 ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o
|
|
633 $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
|
|
634 mv ExternalClient.o ExternalClient-Xm-nonshared.o
|
|
635
|
|
636 ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c
|
|
637 $(CC) -c $(cflags) ${srcdir}/ExternalClient.c
|
|
638 mv ExternalClient.o ExternalClient-Xt-nonshared.o
|
|
639
|
|
640 ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c
|
|
641 $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
|
|
642 mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
|
|
643
|
|
644 ## We compile the common files twice (once with PIC and once without)
|
|
645 ## because on some systems, compiling with PIC but not linking into
|
|
646 ## a shared library messes things up.
|
|
647
|
|
648 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
|
|
649 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
|
|
650 mv extw-Xt.o extw-Xt-shared.o
|
|
651
|
|
652 extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o
|
|
653 $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c
|
|
654 mv extw-Xlib.o extw-Xlib-shared.o
|
|
655
|
|
656 extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c
|
|
657 $(CC) -c $(cflags) ${srcdir}/extw-Xt.c
|
|
658 mv extw-Xt.o extw-Xt-nonshared.o
|
|
659
|
|
660 extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c
|
|
661 $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c
|
|
662 mv extw-Xlib.o extw-Xlib-nonshared.o
|
|
663
|
|
664 libextcli_Xm.a: ${external_client_motif_objs_nonshared}
|
|
665 ar r libextcli_Xm.a ${external_client_motif_objs_nonshared}
|
|
666
|
|
667 libextcli_Xt.a: ${external_client_xt_objs_nonshared}
|
|
668 ar r libextcli_Xt.a ${external_client_xt_objs_nonshared}
|
|
669
|
|
670 libextcli_Xlib.a: ${external_client_xlib_objs_nonshared}
|
|
671 ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared}
|
|
672
|
1315
|
673 ## Now we try to figure out how to link a shared library.
|
|
674 ## If we cannot figure it out, leave EXTW_LINK undefined and a shared
|
|
675 ## library will not be created.
|
|
676
|
|
677 # ifdef USE_GCC
|
|
678 # ifdef USG5
|
|
679 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
|
|
680 extw_link_beg = $(CC) -shared
|
|
681 extw_link_mid = -Xlinker -z -Xlinker text -o
|
|
682 extw_link_end =
|
|
683 ## I cannot figure out how to do shared a.out libraries, so just punt.
|
|
684 # elif !defined (LINUX) || defined (__ELF__)
|
|
685 # define EXTW_LINK(objs, output) $(CC) -shared objs -o output
|
|
686 extw_link_beg = $(CC) -shared
|
|
687 extw_link_mid = -o
|
|
688 extw_link_end =
|
|
689 # endif
|
|
690 # elif defined (USG5)
|
|
691 # if defined (IRIX)
|
|
692 # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output
|
|
693 extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations
|
|
694 extw_link_mid = -o
|
|
695 extw_link_end =
|
|
696 # else /* not IRIX */
|
|
697 # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output
|
|
698 extw_link_beg = $(CC) -G
|
|
699 extw_link_mid = -z text -o
|
|
700 extw_link_end =
|
|
701 # endif /* not IRIX */
|
|
702 # else /* not USG5 */
|
|
703 # if defined (DEC_ALPHA) && defined (OSF1)
|
|
704 # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
|
|
705 extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d
|
|
706 extw_link_mid = -o
|
|
707 extw_link_end = $(LIBES)
|
|
708 # else /* !(DEC_ALPHA && OSF1) */
|
|
709 # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
|
|
710 extw_link_beg = $(LD) -dc
|
|
711 extw_link_mid = -assert pure-text -o
|
|
712 extw_link_end =
|
|
713 # endif /* !(DEC_ALPHA && OSF1) */
|
|
714 # endif /* not USG5 */
|
|
715
|
428
|
716 #ifdef EXTW_LINK
|
|
717
|
|
718 libextcli_Xm.so.1: ${external_client_motif_objs_shared}
|
|
719 ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end}
|
|
720
|
|
721 libextcli_Xt.so.1: ${external_client_xt_objs_shared}
|
|
722 ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end}
|
|
723
|
|
724 libextcli_Xlib.so.1: ${external_client_xlib_objs_shared}
|
|
725 ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end}
|
|
726
|
|
727 #endif /* EXTW_LINK */
|
|
728
|
|
729 #endif /* EXTERNAL_WIDGET */
|
|
730
|
|
731 config.h: ${srcdir}/config.h.in
|
|
732 Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
|
|
733
|
|
734 config.h sheap-adjust.h paths.h Emacs.ad.h :
|
|
735 @echo "The file $@ needs to be re-generated."
|
|
736 @echo "Please run a make in the top level directory."
|
|
737 @echo "Consult the file \`INSTALL' for instructions for building XEmacs."
|
|
738 @exit 1
|
|
739
|
|
740 ## Some machines have alloca built-in.
|
|
741 ## They should define HAVE_ALLOCA, or may just let alloca.s
|
|
742 ## be used but generate no code.
|
|
743 ## Some have it written in assembler in alloca.s.
|
|
744 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
|
851
|
745 ## Nowadays we always compile in the C version and use it to avoid stack
|
|
746 ## overflow.
|
428
|
747
|
|
748 #ifdef C_ALLOCA
|
|
749 #else
|
|
750 #ifndef HAVE_ALLOCA
|
851
|
751 allocax.o : ${srcdir}/alloca.s config.h
|
428
|
752 ## $(CPP) is cc -E, which may get confused by filenames
|
|
753 ## that do not end in .c. So copy file to a safe name. */
|
|
754 ## cp ${srcdir}/alloca.s allocatem.c
|
|
755 ## Remove any ^L, blank lines, and preprocessor comments,
|
|
756 ## since some assemblers barf on them. Use a different basename for the
|
|
757 ## output file, since some stupid compilers (Green Hill) use that
|
|
758 ## name for the intermediate assembler file.
|
|
759 $(CPP) $(cppflags) allocatem.c | \
|
|
760 sed -e 's///' -e 's/^#.*//' | \
|
|
761 sed -n -e '/^..*$$/p' > allocax.s
|
|
762 @$(RM) alloca.o
|
|
763 ## Xenix, in particular, needs to run assembler via cc.
|
|
764 $(CC) -c allocax.s
|
|
765 $(RM) allocax.s allocatem.c
|
|
766 #endif /* HAVE_ALLOCA */
|
|
767 #endif /* ! defined (C_ALLOCA) */
|
|
768
|
|
769 #ifdef HAVE_NATIVE_SOUND
|
442
|
770 sound_cflags=@sound_cflags@
|
428
|
771 sunplay.o: ${srcdir}/sunplay.c
|
|
772 $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
|
|
773 hpplay.o: ${srcdir}/hpplay.c
|
|
774 $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c
|
|
775 #endif /* HAVE_NATIVE_SOUND */
|
|
776
|
462
|
777 #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H)
|
|
778 glade_files=glade.c
|
|
779 #endif
|
|
780
|
|
781 #ifdef HAVE_GTK
|
|
782 extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files)
|
|
783 #endif
|
|
784
|
442
|
785 xemacs_res.o: ${srcdir}/../nt/xemacs.rc
|
|
786 windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@
|
|
787
|
1315
|
788 #########################################################################
|
|
789
|
|
790 ## Other random crap
|
|
791
|
|
792 dortl : $(obj_rtl) $(otherrtls)
|
|
793 echo "(defvar source-files '(" > $(LISP)/source-files.el
|
|
794 (for a in $(obj_src) $(othersrcs);do \
|
|
795 echo -n "\""$$a"\"" >> $(LISP)/source-files.el ;\
|
|
796 done)
|
|
797 echo "))" >> $(LISP)/source-files.el
|
|
798
|
|
799 ## Lint Section
|
|
800 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
|
|
801 LINTFILES= $(objs:.o=.ln)
|
|
802 LINTINCLUDES = $(cppflags)
|
|
803 ## LINTFLAGS= -fd -m -p -s -u -v -x
|
|
804 LINTFLAGS= -fd -m -s -u -v -x
|
|
805 .PHONY: lint
|
|
806 lint: $(LINTFILES)
|
|
807 $(LINT.c) $(LINTFILES)
|
|
808 ## end of Lint Section
|
|
809
|
|
810 ## We have automated tests!!
|
|
811 testdir = ${srcdir}/../tests/automated
|
|
812 batch_test_emacs = ${BATCH_PACKAGES} -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir}
|
|
813
|
|
814 .PHONY: check check-temacs check-features
|
|
815 check:
|
|
816 $(DO_XEMACS) $(batch_test_emacs)
|
|
817 check-temacs:
|
|
818 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
|
|
819 check-features: all
|
|
820 $(XEMACS_BATCH) -l check-features.el
|
|
821
|
|
822 ## Debugging targets:
|
|
823 ##
|
|
824 ## None of the debugging products work with a dumped xemacs binary,
|
|
825 ## because it does unexpected things like free memory that has been
|
|
826 ## malloc'ed in a *different* process!! So we need to run these on
|
|
827 ## temacs.
|
|
828
|
|
829 ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx
|
|
830 rtc_patch.o:
|
|
831 rtc_patch_area -o $@
|
|
832
|
|
833 rtcmacs: $(temacs_deps) rtc_patch.o
|
|
834 $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o
|
|
835 mv ${EXE_TARGET} rtcmacs
|
|
836
|
|
837 .PHONY: run-rtcmacs
|
|
838 run-rtcmacs: rtcmacs
|
|
839 dbx -q -C -c \
|
|
840 'dbxenv rtc_error_log_file_name /dev/fd/1; \
|
|
841 dbxenv suppress_startup_message 5.0; \
|
|
842 ignore POLL; \
|
|
843 check -access; \
|
|
844 suppress rui; \
|
|
845 runargs -nd ${BATCH} ${run_temacs_args} -vanilla; \
|
|
846 run' rtcmacs
|
|
847
|
|
848 debug-temacs: ${EXE_TARGET}
|
|
849 -${debug_temacs}
|
|
850
|
|
851 ## Purify, Quantify, PureCoverage are software quality products from
|
|
852 ## Rational, formerly Pure Atria, formerly Pure Software.
|
|
853 ##
|
|
854 ## Purify
|
|
855 PURIFY_PROG = purify
|
|
856 PURIFY_LIBS =
|
|
857 PURIFY_FLAGS =\
|
|
858 #ifdef PDUMP
|
|
859 -search-mmaps=yes\
|
|
860 #endif
|
|
861 -chain-length=32 -ignore-signals=SIGPOLL\
|
|
862 -cache-dir=${blddir}/purecache -always-use-cache-dir=yes
|
|
863
|
|
864 puremacs: $(temacs_deps)
|
|
865 $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
|
|
866 cp $@ ${EXE_TARGET}
|
|
867
|
|
868 ## Quantify
|
|
869 #ifdef QUANTIFY
|
|
870 QUANTIFY_PROG = quantify
|
|
871 QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir`
|
|
872 QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes
|
|
873 cppflags += -I$(QUANTIFY_HOME)
|
|
874 temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a
|
|
875
|
|
876 quantmacs: $(temacs_deps)
|
|
877 $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
|
|
878 cp $@ ${EXE_TARGET}
|
|
879 #endif /* QUANTIFY */
|
|
880
|
|
881 PURECOV_PROG=purecov
|
|
882 covmacs: $(temacs_deps)
|
|
883 $(PURECOV_PROG) $(LD) $(temacs_link_args)
|
428
|
884
|
|
885 .PHONY: mostlyclean clean distclean realclean versionclean extraclean
|
|
886 mostlyclean:
|
442
|
887 $(RM) temacs puremacs quantmacs *.o *.i \
|
428
|
888 core temacs.exe sheap-adjust.h
|
|
889 clean: mostlyclean versionclean
|
1315
|
890 $(RM) libextcli*
|
428
|
891 ## This is used in making a distribution.
|
|
892 ## Do not use it on development directories!
|
|
893 distclean: clean
|
|
894 $(RM) config.h paths.h Emacs.ad.h \
|
|
895 GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.*
|
|
896 realclean: distclean
|
|
897 versionclean:
|
442
|
898 $(RM) ${EXE_TARGET} ${DUMP_TARGET} ${libsrc}DOC
|
428
|
899 extraclean: realclean
|
|
900 $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#*
|
|
901
|
|
902 .PHONY : lock unlock
|
|
903 SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \
|
|
904 config.h.in README COPYING ChangeLog
|
|
905 unlock:
|
|
906 chmod u+w $(SOURCES)
|
|
907
|
|
908 relock:
|
|
909 chmod -w $(SOURCES)
|
|
910
|
|
911 ## Header files for ellcc
|
|
912 #ifdef HAVE_SHLIB
|
|
913 MAKEPATH=../lib-src/make-path
|
|
914 install: ${PROGNAME}
|
|
915 ${MAKEPATH} ${archlibdir}/include ${archlibdir}/include/m ${archlibdir}/include/s
|
|
916 -@echo "Copying include files for ellcc..."
|
|
917 -@hdir=`pwd`; \
|
|
918 cd ${srcdir}; hdrdir2=`pwd`; cd $$hdir; \
|
|
919 test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \
|
|
920 (for thisdir in $$hdir; do \
|
448
|
921 cd $$thisdir && \
|
428
|
922 (hdrtars=; \
|
|
923 for hdrfile in *.h; do \
|
|
924 hdrtars="$$hdrtars $$hdrfile"; \
|
|
925 done; \
|
|
926 test -d s && hdrtars="$$hdrtars s/*"; \
|
|
927 test -d m && hdrtars="$$hdrtars m/*"; \
|
|
928 test -n "$$hdrtars" && (tar cf - $$hdrtars) | \
|
|
929 (cd ${archlibdir}/include && umask 022 && tar xf -); \
|
|
930 chmod 755 ${archlibdir}/include; \
|
|
931 test -d ${archlibdir}/include/s && \
|
|
932 chmod 755 ${archlibdir}/include/s; \
|
|
933 test -d ${archlibdir}/include/m && \
|
|
934 chmod 755 ${archlibdir}/include/s;) \
|
|
935 done)
|
|
936 #endif
|
|
937
|
|
938 ## Dependency processing using home-grown script, not makedepend
|
|
939 .PHONY: depend
|
|
940 FRC.depend:
|
|
941 depend: FRC.depend
|
|
942 cd ${srcdir} && $(RM) depend.tmp && \
|
|
943 perl ./make-src-depend > depend.tmp && \
|
|
944 if cmp -s depend depend.tmp; \
|
|
945 then $(RM) depend.tmp; \
|
|
946 else $(RM) depend && mv depend.tmp depend; \
|
|
947 fi
|