Mercurial > hg > xemacs-beta
view src/Makefile.in.in @ 853:2b6fa2618f76
[xemacs-hg @ 2002-05-28 08:44:22 by ben]
merge my stderr-proc ws
make-docfile.c: Fix places where we forget to check for EOF.
code-init.el: Don't use CRLF conversion by default on process output. CMD.EXE and
friends work both ways but Cygwin programs don't like the CRs.
code-process.el, multicast.el, process.el: Removed.
Improvements to call-process-internal:
-- allows a buffer to be specified for input and stderr output
-- use it on all systems
-- implement C-g as documented
-- clean up and comment
call-process-region uses new call-process facilities; no temp file.
remove duplicate funs in process.el.
comment exactly how coding systems work and fix various problems.
open-multicast-group now does similar coding-system frobbing to
open-network-stream.
dumped-lisp.el, faces.el, msw-faces.el: Fix some hidden errors due to code not being defined at the right time.
xemacs.mak: Add -DSTRICT.
================================================================
ALLOW SEPARATION OF STDOUT AND STDERR IN PROCESSES
================================================================
Standard output and standard error can be processed separately in
a process. Each can have its own buffer, its own mark in that buffer,
and its filter function. You can specify a separate buffer for stderr
in `start-process' to get things started, or use the new primitives:
set-process-stderr-buffer
process-stderr-buffer
process-stderr-mark
set-process-stderr-filter
process-stderr-filter
Also, process-send-region takes a 4th optional arg, a buffer.
Currently always uses a pipe() under Unix to read the error output.
(#### Would a PTY be better?)
sysdep.h, sysproc.h, unexfreebsd.c, unexsunos4.c, nt.c, emacs.c, callproc.c, symsinit.h, sysdep.c, Makefile.in.in, process-unix.c: Delete callproc.c. Move child_setup() to process-unix.c.
wait_for_termination() now only needed on a few really old systems.
console-msw.h, event-Xt.c, event-msw.c, event-stream.c, event-tty.c, event-unixoid.c, events.h, process-nt.c, process-unix.c, process.c, process.h, procimpl.h: Rewrite the process methods to handle a separate channel for
error input. Create Lstreams for reading in the error channel.
Many process methods need change. In general the changes are
fairly clear as they involve duplicating what's used for reading
the normal stdout and changing for stderr -- although tedious,
as such changes are required throughout the entire process code.
Rewrote the code that reads process output to do two loops, one
for stdout and one for stderr.
gpmevent.c, tooltalk.c: set_process_filter takes an argument for stderr.
================================================================
NEW ERROR-TRAPPING MECHANISM
================================================================
Totally rewrite error trapping code to be unified and support more
features. Basic function is call_trapping_problems(), which lets
you specify, by means of flags, what sorts of problems you want
trapped. these can include
-- quit
-- errors
-- throws past the function
-- creation of "display objects" (e.g. buffers)
-- deletion of already-existing "display objects" (e.g. buffers)
-- modification of already-existing buffers
-- entering the debugger
-- gc
-- errors->warnings (ala suspended errors)
etc. All other error funs rewritten in terms of this one.
Various older mechanisms removed or rewritten.
window.c, insdel.c, console.c, buffer.c, device.c, frame.c: When creating a display object, added call to
note_object_created(), for use with trapping_problems mechanism.
When deleting, call check_allowed_operation() and note_object
deleted().
The trapping-problems code records the objects created since the
call-trapping-problems began. Those objects can be deleted, but
none others (i.e. previously existing ones).
bytecode.c, cmdloop.c: internal_catch takes another arg.
eval.c: Add long comments describing the "five lists" used to maintain
state (backtrace, gcpro, specbind, etc.) in the Lisp engine.
backtrace.h, eval.c: Implement trapping-problems mechanism, eliminate old mechanisms or
redo in terms of new one.
frame.c, gutter.c: Flush out the concept of "critical display section", defined by
the in_display() var. Use an internal_bind() to get it reset,
rather than just doing it at end, because there may be a non-local
exit.
event-msw.c, event-stream.c, console-msw.h, device.c, dialog-msw.c, frame.c, frame.h, intl.c, toolbar.c, menubar-msw.c, redisplay.c, alloc.c, menubar-x.c: Make use of new trapping-errors stuff and rewrite code based on
old mechanisms.
glyphs-widget.c, redisplay.h: Protect calling Lisp in redisplay.
insdel.c: Protect hooks against deleting existing buffers.
frame-msw.c: Use EQ, not EQUAL in hash tables whose keys are just numbers.
Otherwise we run into stickiness in redisplay because
internal_equal() can QUIT.
================================================================
SIGNAL, C-G CHANGES
================================================================
Here we change the way that C-g interacts with event reading. The
idea is that a C-g occurring while we're reading a user event
should be read as C-g, but elsewhere should be a QUIT. The former
code did all sorts of bizarreness -- requiring that no QUIT occurs
anywhere in event-reading code (impossible to enforce given the
stuff called or Lisp code invoked), and having some weird system
involving enqueue/dequeue of a C-g and interaction with Vquit_flag
-- and it didn't work.
Now, we simply enclose all code where we want C-g read as an event
with {begin/end}_dont_check_for_quit(). This completely turns off
the mechanism that checks (and may remove or alter) C-g in the
read-ahead queues, so we just get the C-g normal.
Signal.c documents this very carefully.
cmdloop.c: Correct use of dont_check_for_quit to new scheme, remove old
out-of-date comments.
event-stream.c: Fix C-g handling to actually work.
device-x.c: Disable quit checking when err out.
signal.c: Cleanup. Add large descriptive comment.
process-unix.c, process-nt.c, sysdep.c: Use QUIT instead of REALLY_QUIT.
It's not necessary to use REALLY_QUIT and just confuses the issue.
lisp.h: Comment quit handlers.
================================================================
CONS CHANGES
================================================================
free_cons() now takes a Lisp_Object not the result of XCONS().
car and cdr have been renamed so that they don't get used directly;
go through XCAR(), XCDR() instead.
alloc.c, dired.c, editfns.c, emodules.c, fns.c, glyphs-msw.c, glyphs-x.c, glyphs.c, keymap.c, minibuf.c, search.c, eval.c, lread.c, lisp.h: Correct free_cons calling convention: now takes Lisp_Object,
not Lisp_Cons
chartab.c: Eliminate direct use of ->car, ->cdr, should be black box.
callint.c: Rewrote using EXTERNAL_LIST_LOOP to avoid use of Lisp_Cons.
================================================================
USE INTERNAL-BIND-*
================================================================
eval.c: Cleanups of these funs.
alloc.c, fileio.c, undo.c, specifier.c, text.c, profile.c, lread.c, redisplay.c, menubar-x.c, macros.c: Rewrote to use internal_bind_int() and internal_bind_lisp_object()
in place of whatever varied and cumbersome mechanisms were
formerly there.
================================================================
SPECBIND SANITY
================================================================
backtrace.h: - Improved comments
backtrace.h, bytecode.c, eval.c: Add new mechanism check_specbind_stack_sanity() for sanity
checking code each time the catchlist or specbind stack change.
Removed older prototype of same mechanism.
================================================================
MISC
================================================================
lisp.h, insdel.c, window.c, device.c, console.c, buffer.c: Fleshed out authorship.
device-msw.c: Correct bad Unicode-ization.
print.c: Be more careful when not initialized or in fatal error handling.
search.c: Eliminate running_asynch_code, an FSF holdover.
alloc.c: Added comments about gc-cons-threshold.
dialog-x.c: Use begin_gc_forbidden() around code to build up a widget value
tree, like in menubar-x.c.
gui.c: Use Qunbound not Qnil as the default for
gethash.
lisp-disunion.h, lisp-union.h: Added warnings on use of VOID_TO_LISP().
lisp.h: Use ERROR_CHECK_STRUCTURES to turn on
ERROR_CHECK_TRAPPING_PROBLEMS and ERROR_CHECK_TYPECHECK
lisp.h: Add assert_with_message.
lisp.h: Add macros for gcproing entire arrays. (You could do this before
but it required manual twiddling the gcpro structure.)
lisp.h: Add prototypes for new functions defined elsewhere.
author | ben |
---|---|
date | Tue, 28 May 2002 08:45:36 +0000 |
parents | e7ee5f8bde58 |
children | 25e260cb7994 |
line wrap: on
line source
## Makefile for src subdirectory in XEmacs. ## Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. ## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois ## Copyright (C) 1996, 1997 Sun Microsystems, Inc. ## Copyright (C) 1998, 1999 J. Kean Johnston. ## Copyright (C) 2001, 2002 Ben Wing. ## This file is part of XEmacs. ## XEmacs is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the ## Free Software Foundation; either version 2, or (at your option) any ## later version. ## XEmacs is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## for more details. ## You should have received a copy of the GNU General Public License ## along with XEmacs; see the file COPYING. If not, write to ## the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ## Boston, MA 02111-1307, USA. ## Synched up with: Not synched with FSF. PROGNAME=@PROGNAME@ #define NOT_C_CODE #include "config.h" #ifdef PDUMP DUMP_TARGET = ${PROGNAME}.dmp EXE_TARGET = ${PROGNAME} DUMP_ID = dump-id.o #else DUMP_TARGET = ${PROGNAME} EXE_TARGET = temacs #endif all: ${DUMP_TARGET} .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint ## For performance and consistency, no built-in rules. .SUFFIXES: .SUFFIXES: .c .h .o .i .s .dep #ifdef USE_GNU_MAKE RECURSIVE_MAKE=$(MAKE) #else @SET_MAKE@ RECURSIVE_MAKE=@RECURSIVE_MAKE@ #endif SHELL=/bin/sh RM = rm -f lispdir = ${srcdir}/../lisp/ moduledir = ${srcdir}/../modules/ libsrc = ../lib-src/ etcdir = ../etc/ ## Here are the things that we expect ../configure to edit. prefix=@prefix@ srcdir=@srcdir@ blddir=@blddir@ version=@version@ CC=@XEMACS_CC@ CPP=@CPP@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ LDFLAGS=@LDFLAGS@ c_switch_all=@c_switch_all@ ld_switch_all=@ld_switch_all@ ld_libs_all=@ld_libs_all@ ld_dynamic_link_flags=@ld_dynamic_link_flags@ extra_objs=@extra_objs@ LN_S=@LN_S@ ld_switch_shared=@ld_switch_shared@ start_files=@start_files@ start_flags=@start_flags@ LD=@ld@ lib_gcc=@lib_gcc@ ##libmcheck=@libmcheck@ ## With the traditional VPATH setting, it is not possible to ## simultaneously compile in-place and in another directory. The ## mistaken definition is that *all* dependencies are searched for in ## the VPATH directory, rather than just the dependencies that are not ## themselves targets. Thus, if there is an up-to-date .o file in the ## in-place location, it will not get recompiled in the not-in-place ## location. ## The GNU Make "vpath" directive continues this tradition, but at ## least lets you restrict the classes of files that it applies to. ## This allows us to kludge around the problem. #ifdef USE_GNU_MAKE vpath %.c @srcdir@ vpath %.h @srcdir@ ## now list files that should NOT be searched in the srcdir. ## This includes any .c or .h built from something else ## (e.g. a .in file). vpath config.h vpath paths.h vpath Emacs.ad.h vpath sheap-adjust.h vpath dump-id.c #else VPATH=@srcdir@ #endif RM = rm -f LWLIB_SRCDIR = ${srcdir}/../lwlib #ifdef HAVE_X_WINDOWS lwlib_libs = ../lwlib/liblw.a lwlib_deps = $(lwlib_libs) $(lwlib_libs) : cd ../lwlib && $(RECURSIVE_MAKE) # ifdef AIX4 LIBI18N = -li18n # endif X11_libs = $(LIBI18N) #endif /* HAVE_X_WINDOWS */ ######################################################################### ## Object files needed for compilation. ## NOTE: Some of the object files are specified in this file, and ## others in configure.in. The general rule is that they be specified ## here whenever they have clear dependencies on configure defines. ## They should be in configure.in when there is no configure define or ## when there is extremely hairy code to determine which files are ## needed (e.g. native sound support) and it would be pointless to ## duplicate that code. gui_objs= gui.o #ifdef HAVE_MENUBARS gui_objs += menubar.o #endif #ifdef HAVE_SCROLLBARS gui_objs += scrollbar.o #endif #ifdef HAVE_DIALOGS gui_objs += dialog.o #endif #ifdef HAVE_TOOLBARS gui_objs += toolbar.o #endif #ifdef HAVE_X_WINDOWS x_objs=console-x.o device-x.o event-Xt.o frame-x.o \ glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o x_gui_objs=$(gui_objs:.o=-x.o) #ifdef HAVE_TOOLBARS x_gui_objs += toolbar-common.o #endif #endif #ifdef HAVE_MS_WINDOWS mswindows_objs=console-msw.o device-msw.o event-msw.o frame-msw.o \ objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o mswindows_gui_objs=$(gui_objs:.o=-msw.o) #endif #ifdef HAVE_TTY tty_objs=console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o \ redisplay-tty.o cm.o #endif #ifdef HAVE_GTK gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \ objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \ gtk-xemacs.o ui-gtk.o gtk_gui_objs=$(gui_objs:.o=-gtk.o) #ifdef HAVE_TOOLBARS gtk_gui_objs += toolbar-common.o #endif #endif #ifdef HAVE_BALLOON_HELP balloon_help_objs=balloon_help.o balloon-x.o #endif #ifdef CLASH_DETECTION clash_detection_objs=filelock.o #endif #ifdef HAVE_DATABASE database_objs=database.o #endif #ifdef DEBUG_XEMACS debug_objs=debug.o tests.o #endif #ifdef HAVE_UNIXOID_EVENT_LOOP event_unixoid_objs=event-unixoid.o #endif #ifdef HAVE_GIF gif_objs=dgif_lib.o gif_io.o #endif #ifdef HAVE_GPM gpm_objs=gpmevent.o #endif #ifdef HAVE_LDAP ldap_objs=eldap.o #endif #ifdef MULE mule_objs=mule-ccl.o mule-charset.o mule-coding.o #endif #ifdef HAVE_CANNA mule_canna_objs=mule-canna.o #endif #ifdef HAVE_WNN mule_wnn_objs=mule-wnnfns.o #endif #ifdef HAVE_POSTGRESQL postgresql_objs=postgresql.o #endif #ifdef HAVE_WIN32_PROCESSES process_objs=process-nt.o #elif defined (HAVE_UNIX_PROCESSES) process_objs=process-unix.o #endif #ifdef HAVE_SETITIMER profile_objs=profile.o #endif #if defined (HEAP_IN_DATA) && !defined (PDUMP) sheap_objs=sheap.o #endif #ifdef HAVE_SHLIB shlib_objs=sysdll.o emodules.o #endif #ifdef SUNPRO sunpro_objs=sunpro.o #endif #ifdef TOOLTALK tooltalk_objs=tooltalk.o #endif #if defined (WIN32_NATIVE) || defined (CYGWIN) win32_objs=win32.o intl-win32.o intl-auto-encap-win32.o intl-encap-win32.o \ xemacs_res.o #endif ## -Demacs is needed to make some files produce the correct version ## for use in Emacs. cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all) cflags = $(CFLAGS) $(cppflags) #if defined (WIN32_NATIVE) || defined (CYGWIN) ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all) $(ld_dynamic_link_flags) #else ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags) #endif #ifdef SOLARIS2 %.o : %.c #else .c.o: #endif $(CC) -c $(cflags) $< ## Create preprocessor output (debugging purposes only) .c.i: #ifdef __GNUC__ $(CC) -E $(cppflags) -o $@ $< #else /* works on Solaris; what about other systems? */ $(CC) -P $(cppflags) $< #endif /* compiler */ ## Create assembler output (debugging purposes only) .c.s: $(CC) -S -c $(cflags) $< ## Create RTL files %.c.rtl : %.c $(CC) -dr -c $(cflags) $< ## lastfile must follow all files whose initialized data areas should ## be dumped as pure by dump-emacs. ## NOTE: The last line cannot be all macros, because make will barf ## if they all come out null. objs=\ abbrev.o alloc.o alloca.o \ $(balloon_help_objs) blocktype.o buffer.o bytecode.o \ callint.o casefiddle.o casetab.o chartab.o \ $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \ console-stream.o\ data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\ dynarr.o \ editfns.o elhash.o emacs.o eval.o events.o\ event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\ faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \ font-lock.o frame.o\ general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\ glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \ gutter.o\ hash.o imgproc.o indent.o insdel.o intl.o\ keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\ macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\ $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) objects.o opaque.o\ $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\ rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\ search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\ specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\ text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\ widget.o window.o $(win32_objs) obj_rtl = $(objs:.o=.c.rtl) #ifdef REL_ALLOC rallocdocsrc = ralloc.c rallocobjs = ralloc.o #endif malloclib = $(libmcheck) #ifndef SYSTEM_MALLOC # ifdef GNU_MALLOC /* GNU malloc */ # ifdef ERROR_CHECK_MALLOC #ifdef DOUG_LEA_MALLOC mallocobjs = free-hook.o vm-limit.o #else mallocobjs = gmalloc.o free-hook.o vm-limit.o #endif mallocdocsrc = free-hook.c # else /* New GNU malloc, sans error checking */ #ifdef DOUG_LEA_MALLOC mallocobjs = vm-limit.o #else mallocobjs = gmalloc.o vm-limit.o #endif mallocdocsrc = # endif /* ERROR_CHECK_MALLOC */ # else /* Older GNU malloc */ mallocobjs = malloc.o mallocdocsrc = # endif /* Older GNU malloc */ #else /* SYSTEM_MALLOC */ mallocobjs = mallocdocsrc = #ifdef USE_DEBUG_MALLOC malloclib = -ldmalloc #endif /* USE_DEBUG_MALLOC */ #endif /* SYSTEM_MALLOC */ #ifdef HAVE_X_WINDOWS # ifdef EXTERNAL_WIDGET external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o ## Now we try to figure out how to link a shared library. ## If we cannot figure it out, leave EXTW_LINK undefined and a shared ## library will not be created. # ifdef USE_GCC # ifdef USG5 # define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output extw_link_beg = $(CC) -shared extw_link_mid = -Xlinker -z -Xlinker text -o extw_link_end = ## I cannot figure out how to do shared a.out libraries, so just punt. # elif !defined (LINUX) || defined (__ELF__) # define EXTW_LINK(objs, output) $(CC) -shared objs -o output extw_link_beg = $(CC) -shared extw_link_mid = -o extw_link_end = # endif # elif defined (USG5) # if defined (IRIX) # define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output extw_link_beg = $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations extw_link_mid = -o extw_link_end = # else /* not IRIX */ # define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output extw_link_beg = $(CC) -G extw_link_mid = -z text -o extw_link_end = # endif /* not IRIX */ # else /* not USG5 */ # if defined (DEC_ALPHA) && defined (OSF1) # define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES) extw_link_beg = $(LD) $(ldflags) $(ld_switch_shared) -d extw_link_mid = -o extw_link_end = $(LIBES) # else /* !(DEC_ALPHA && OSF1) */ # define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output extw_link_beg = $(LD) -dc extw_link_mid = -assert pure-text -o extw_link_end = # endif /* !(DEC_ALPHA && OSF1) */ # endif /* not USG5 */ # ifdef LWLIB_USES_MOTIF # ifdef EXTW_LINK motif_other_files = libextcli_Xm.a libextcli_Xm.so.1 # else motif_other_files = libextcli_Xm.a # endif #endif /* LWLIB_USES_MOTIF */ # ifdef EXTW_LINK shared_other_files = libextcli_Xt.so.1 libextcli_Xlib.so.1 # endif other_files=\ ${motif_other_files}\ libextcli_Xt.a libextcli_Xlib.a\ ${shared_other_files} all: ${other_files} # endif /* EXTERNAL_WIDGET */ # if defined (HAVE_OFFIX_DND) || defined (HAVE_CDE) dnd_objs = @dnd_objs@ # endif /* HAVE_OFFIX_DND || HAVE_CDE */ X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs) $(dnd_objs) #endif /* HAVE_X_WINDOWS */ ## define otherobjs as list of object files that make-docfile ## should not be told about. otherobjs = lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs) otherrtls = $(otherobjs:.o=.c.rtl) othersrcs = $(otherobjs:.o=.c) LIBES = $(lwlib_libs) $(malloclib) $(ld_libs_all) $(lib_gcc) #ifdef I18N3 mo_dir = ${etcdir} mo_file = ${mo_dir}emacs.mo #endif batch = -no-packages -batch batch_packages = -vanilla -batch temacs_loadup = ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/loadup.el dump_temacs = ${temacs_loadup} dump run_temacs = ${temacs_loadup} run-temacs debug_temacs = gdb ${EXE_TARGET} release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} #ifdef CANNOT_DUMP ln ${EXE_TARGET} ${PROGNAME} #else -if [ -w ${srcdir}/../lisp ]; then \ w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/inc-vers; \ else true; fi -./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/loadup.el dump touch release #endif /* ! defined (CANNOT_DUMP) */ ${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp #ifdef HEAP_IN_DATA @$(RM) $@ && touch SATISFIED -${dump_temacs} @if test -f $@; then if test -f SATISFIED; then \ echo "Testing for Lisp shadows ..."; \ ./${PROGNAME} ${batch} -f list-load-path-shadows; fi; \ $(RM) SATISFIED; exit 0; fi; \ if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ $(RM) $@; \ $(RECURSIVE_MAKE) $@; #else @$(RM) $@ ${dump_temacs} @echo "Testing for Lisp shadows ..." @./${PROGNAME} ${batch} -f list-load-path-shadows #endif fastdump: ${EXE_TARGET} @$(RM) ${DUMP_TARGET} && touch SATISFIED -${dump_temacs} @./${PROGNAME} ${batch} -f list-load-path-shadows FRC.update-elc.stamp : update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp @touch NOBYTECOMPILE ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/update-elc.el @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \ $(RM) NOBYTECOMPILE obj_src = $(objs:.o=.c) dortl : $(obj_rtl) $(otherrtls) echo "(defvar source-files '(" > ${srcdir}/../lisp/source-files.el (for a in $(obj_src) $(othersrcs);do \ echo -n "\""$$a"\"" >> ${srcdir}/../lisp/source-files.el ;\ done) echo "))" >> ${srcdir}/../lisp/source-files.el #ifdef DYNODUMP dynodump_deps = ../dynodump/dynodump.so ../dynodump/dynodump.so: cd ../dynodump && $(RECURSIVE_MAKE) #endif /* DYNODUMP */ ${libsrc}DOC: ${EXE_TARGET} update-elc.stamp $(RM) ${libsrc}DOC; \ ${DUMPENV} ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/make-docfile.el -- \ -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \ ${obj_src} ${mallocdocsrc} ${rallocdocsrc} ${extra_doc_files} dump_elcs: dump-elcs dump-elcs: ${EXE_TARGET} -${DUMPENV} ./${EXE_TARGET} -nd ${batch} -l ${srcdir}/../lisp/update-elc.el all-elc all-elcs: cd .. && $(RECURSIVE_MAKE) all-elc #ifdef I18N3 # if defined(SPARC) && !defined(USG) xgettext= /usr/openwin/bin/xgettext xgettext_args= -o emacs -m_X messages msgfmt= /usr/openwin/bin/msgfmt # else xgettext= xgettext xgettext_args= -s -d emacs -M_X messages msgfmt= msgfmt #endif ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs} ${libsrc}make-msgfile -o ${libsrc}messages ${objs} cd ${libsrc} && ${xgettext} ${xgettext_args} $(RM) ${mo_dir}emacs.po cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC ${mo_dir}emacs.mo: ${mo_dir}emacs.po cd ${mo_dir} && ${msgfmt} -o emacs.mo emacs.po ${libsrc}make-msgfile: cd ${libsrc} && $(RECURSIVE_MAKE) make-msgfile ${libsrc}make-po: cd ${libsrc} && $(RECURSIVE_MAKE) make-po #endif /* I18N3 */ ${libsrc}make-dump-id: cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id ${libsrc}make-docfile: cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile ## Lint Section LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) LINTFILES= $(objs:.o=.ln) LINTINCLUDES = $(cppflags) ## LINTFLAGS= -fd -m -p -s -u -v -x LINTFLAGS= -fd -m -s -u -v -x lint: $(LINTFILES) $(LINT.c) $(LINTFILES) ## end of Lint Section link_deps=\ $(start_files) ${objs} ${otherobjs}\ $(lwlib_deps) $(dynodump_deps) temacs_deps = $(link_deps) ${DUMP_ID} temacs_link_args=\ ${start_flags} ${ldflags}\ -o $@ ${start_files} ${objs} ${otherobjs} ${DUMP_ID} ${LIBES} ${EXE_TARGET}: $(temacs_deps) $(LD) $(temacs_link_args) dump-id.c: ${libsrc}make-dump-id ${link_deps} ${libsrc}make-dump-id .PHONY : run-temacs run-temacs: ${EXE_TARGET} -${run_temacs} ## We have automated tests!! testdir = ${srcdir}/../tests/automated batch_test_emacs = ${batch_packages} -l ${testdir}/test-harness.el -f batch-test-emacs ${testdir} .PHONY: check check-temacs check: ./${PROGNAME} ${batch_test_emacs} check-temacs: ${run_temacs} ${batch_test_emacs} ## Debugging targets: ## ## None of the debugging products work with a dumped xemacs binary, ## because it does unexpected things like free memory that has been ## malloc'ed in a *different* process!! So we need to run these on ## temacs. ## RTC is Sun WorkShop's Run Time Checking, integrated with dbx rtc_patch.o: rtc_patch_area -o $@ rtcmacs: $(temacs_deps) rtc_patch.o $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o mv ${EXE_TARGET} rtcmacs .PHONY: run-rtcmacs run-rtcmacs: rtcmacs dbx -q -C -c \ 'dbxenv rtc_error_log_file_name /dev/fd/1; \ dbxenv suppress_startup_message 5.0; \ ignore POLL; \ check -access; \ suppress rui; \ runargs ${batch} -l ${srcdir}/../lisp/loadup.el run-temacs -vanilla; \ run' rtcmacs debug-temacs: ${EXE_TARGET} -${debug_temacs} ## Purify, Quantify, PureCoverage are software quality products from ## Rational, formerly Pure Atria, formerly Pure Software. ## ## Purify PURIFY_PROG = purify PURIFY_LIBS = PURIFY_FLAGS =\ #ifdef PDUMP -search-mmaps=yes\ #endif -chain-length=32 -ignore-signals=SIGPOLL\ -cache-dir=${blddir}/purecache -always-use-cache-dir=yes puremacs: $(temacs_deps) $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) cp $@ ${EXE_TARGET} ## Quantify #ifdef QUANTIFY QUANTIFY_PROG = quantify QUANTIFY_HOME = `$(QUANTIFY_PROG) -print-home-dir` QUANTIFY_FLAGS = -cache-dir=./purecache -always-use-cache-dir=yes cppflags += -I$(QUANTIFY_HOME) temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a quantmacs: $(temacs_deps) $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) cp $@ ${EXE_TARGET} #endif /* QUANTIFY */ PURECOV_PROG=purecov covmacs: $(temacs_deps) $(PURECOV_PROG) $(LD) $(temacs_link_args) TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h $(CC) -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.o TopLevelEmacsShell.o TopLevelEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c config.h xintrinsicp.h EmacsShellP.h $(CC) -dr -c $(cflags) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.c.rtl TopLevelEmacsShell.c.rtl TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h $(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.o TransientEmacsShell.o TransientEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h xintrinsicp.h EmacsShellP.h $(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl ## The above rules are subject to a race condition if using a parallel make. TransientEmacsShell.o : TopLevelEmacsShell.o TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl ## Position-independent code for shared library creation #if USE_GCC pic_arg = -fpic #elif defined (IRIX) pic_arg = -KPIC # else pic_arg = -K pic #endif #ifdef EXTERNAL_WIDGET external_client_motif_objs_shared = ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o external_client_xt_objs_shared = ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o external_client_xlib_objs_shared = ExternalClient-Xlib-shared.o extw-Xlib-shared.o external_client_motif_objs_nonshared = ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o external_client_xt_objs_nonshared = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o external_client_xlib_objs_nonshared = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o ## Add dependencies so things work right with a parallel make ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o $(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c mv ExternalClient.o ExternalClient-Xm-shared.o ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient.c mv ExternalClient.o ExternalClient-Xt-shared.o ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o $(CC) -c $(pic_arg) $(cflags) ${srcdir}/ExternalClient-Xlib.c mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o $(CC) -c $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c mv ExternalClient.o ExternalClient-Xm-nonshared.o ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c $(CC) -c $(cflags) ${srcdir}/ExternalClient.c mv ExternalClient.o ExternalClient-Xt-nonshared.o ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c $(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o ## We compile the common files twice (once with PIC and once without) ## because on some systems, compiling with PIC but not linking into ## a shared library messes things up. extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c mv extw-Xt.o extw-Xt-shared.o extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o $(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xlib.c mv extw-Xlib.o extw-Xlib-shared.o extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c $(CC) -c $(cflags) ${srcdir}/extw-Xt.c mv extw-Xt.o extw-Xt-nonshared.o extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c $(CC) -c $(cflags) ${srcdir}/extw-Xlib.c mv extw-Xlib.o extw-Xlib-nonshared.o libextcli_Xm.a: ${external_client_motif_objs_nonshared} ar r libextcli_Xm.a ${external_client_motif_objs_nonshared} libextcli_Xt.a: ${external_client_xt_objs_nonshared} ar r libextcli_Xt.a ${external_client_xt_objs_nonshared} libextcli_Xlib.a: ${external_client_xlib_objs_nonshared} ar r libextcli_Xlib.a ${external_client_xlib_objs_nonshared} #ifdef EXTW_LINK libextcli_Xm.so.1: ${external_client_motif_objs_shared} ${extw_link_beg} ${external_client_motif_objs_shared} ${extw_link_mid} libextcli_Xm.so.1 ${extw_link_end} libextcli_Xt.so.1: ${external_client_xt_objs_shared} ${extw_link_beg} ${external_client_xt_objs_shared} ${extw_link_mid} libextcli_Xt.so.1 ${extw_link_end} libextcli_Xlib.so.1: ${external_client_xlib_objs_shared} ${extw_link_beg} ${external_client_xlib_objs_shared} ${extw_link_mid} libextcli_Xlib.so.1 ${extw_link_end} #endif /* EXTW_LINK */ #endif /* EXTERNAL_WIDGET */ config.h: ${srcdir}/config.h.in Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad config.h sheap-adjust.h paths.h Emacs.ad.h : @echo "The file $@ needs to be re-generated." @echo "Please run a make in the top level directory." @echo "Consult the file \`INSTALL' for instructions for building XEmacs." @exit 1 ## Some machines have alloca built-in. ## They should define HAVE_ALLOCA, or may just let alloca.s ## be used but generate no code. ## Some have it written in assembler in alloca.s. ## Some use the C version in alloca.c (these define C_ALLOCA in config.h). ## Nowadays we always compile in the C version and use it to avoid stack ## overflow. #ifdef C_ALLOCA #else #ifndef HAVE_ALLOCA allocax.o : ${srcdir}/alloca.s config.h ## $(CPP) is cc -E, which may get confused by filenames ## that do not end in .c. So copy file to a safe name. */ ## cp ${srcdir}/alloca.s allocatem.c ## Remove any ^L, blank lines, and preprocessor comments, ## since some assemblers barf on them. Use a different basename for the ## output file, since some stupid compilers (Green Hill) use that ## name for the intermediate assembler file. $(CPP) $(cppflags) allocatem.c | \ sed -e 's///' -e 's/^#.*//' | \ sed -n -e '/^..*$$/p' > allocax.s @$(RM) alloca.o ## Xenix, in particular, needs to run assembler via cc. $(CC) -c allocax.s $(RM) allocax.s allocatem.c #endif /* HAVE_ALLOCA */ #endif /* ! defined (C_ALLOCA) */ #ifdef HAVE_NATIVE_SOUND sound_cflags=@sound_cflags@ sunplay.o: ${srcdir}/sunplay.c $(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c hpplay.o: ${srcdir}/hpplay.c $(CC) -c -Demacs $(sound_cflags) $(cflags) ${srcdir}/hpplay.c #endif /* HAVE_NATIVE_SOUND */ #if defined(HAVE_GLADE_GLADE_H) || defined(HAVE_GLADE_H) glade_files=glade.c #endif #ifdef HAVE_GTK extra_doc_files=emacs-widget-accessors.c ui-byhand.c $(glade_files) #endif xemacs_res.o: ${srcdir}/../nt/xemacs.rc windres --include-dir ${srcdir}/../nt -i ${srcdir}/../nt/xemacs.rc -o $@ ## System-specific programs to be made. ## ${other_files}, $(objects_system) and $(objects_machine) ## select which of these should be compiled. */ .PHONY: mostlyclean clean distclean realclean versionclean extraclean mostlyclean: $(RM) temacs puremacs quantmacs *.o *.i \ core temacs.exe sheap-adjust.h clean: mostlyclean versionclean $(RM) libextcli* update-elc.stamp ## This is used in making a distribution. ## Do not use it on development directories! distclean: clean $(RM) config.h paths.h Emacs.ad.h \ GNUmakefile Makefile Makefile.in TAGS ${PROGNAME}.* realclean: distclean versionclean: $(RM) ${EXE_TARGET} ${DUMP_TARGET} ${libsrc}DOC extraclean: realclean $(RM) *~ \#* m/*~ m/\#* s/*~ s/\#* .PHONY : lock unlock SOURCES = *.[chm] *.pswm [sm]/* COPYING paths.h.in Makefile.in.in \ config.h.in README COPYING ChangeLog unlock: chmod u+w $(SOURCES) relock: chmod -w $(SOURCES) ## Header files for ellcc #ifdef HAVE_SHLIB MAKEPATH=../lib-src/make-path install: ${PROGNAME} ${MAKEPATH} ${archlibdir}/include ${archlibdir}/include/m ${archlibdir}/include/s -@echo "Copying include files for ellcc..." -@hdir=`pwd`; \ cd ${srcdir}; hdrdir2=`pwd`; cd $$hdir; \ test "$$hdrdir2" != "$$hdir" && hdir="$$hdir $$hdrdir2"; \ (for thisdir in $$hdir; do \ cd $$thisdir && \ (hdrtars=; \ for hdrfile in *.h; do \ hdrtars="$$hdrtars $$hdrfile"; \ done; \ test -d s && hdrtars="$$hdrtars s/*"; \ test -d m && hdrtars="$$hdrtars m/*"; \ test -n "$$hdrtars" && (tar cf - $$hdrtars) | \ (cd ${archlibdir}/include && umask 022 && tar xf -); \ chmod 755 ${archlibdir}/include; \ test -d ${archlibdir}/include/s && \ chmod 755 ${archlibdir}/include/s; \ test -d ${archlibdir}/include/m && \ chmod 755 ${archlibdir}/include/s;) \ done) #endif ## Dependency processing using home-grown script, not makedepend .PHONY: depend FRC.depend: depend: FRC.depend cd ${srcdir} && $(RM) depend.tmp && \ perl ./make-src-depend > depend.tmp && \ if cmp -s depend depend.tmp; \ then $(RM) depend.tmp; \ else $(RM) depend && mv depend.tmp depend; \ fi