/* Makefile for GNU Emacs on VMS. Copyright (C) 1985, 1987, 1988, 1993 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs 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. GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef vms #undef vms /* let's depend on VMS, right? */ #endif dot = . #define LINK_FILE(fn,en) set file/enter=en fn CC_COMPILE_SWITCH = /* In the following rule, extra_defs is initialized to the empty string. It is used in the macro ALL_CFLAGS. */ /* Here are the things that we expect ../configure to edit. */ srcdir_dev=@srcdir_dev@ srcdir_dir=@srcdir_dir@ srcdir=@srcdir@ VPATH=@srcdir@ CC=@CC@ CPP=@CPP@ CFLAGS=@CFLAGS@ LDFLAGS=@LDFLAGS@ C_SWITCH_SYSTEM= LN_S=@LN_S@ sys_includes=@sys_includes@ x_includes=@x_includes@ lispdir = $(srcdir_dev)[$(srcdir_dir).-.lisp] vmsdir=$(srcdir_dev)[$(srcdir_dir).-.vms] libsrc = [-.lib-src] etc = [-.etc] shortnamesdir = [-.shortnames] cppdir = [-.cpp] oldXMenudir = [-.oldXMenu] config_h = config.h #define NO_SHORTNAMES #define THIS_IS_YMAKEFILE #define NOT_C_CODE #include "config.h" /* Use HAVE_X11 as an alias for X11 in this file to avoid problems with X11 as a subdirectory name in -I and other such options which pass through this file. */ #ifdef X11 #define HAVE_X11 #undef X11 #endif /* vms (lower case) is totally unneeded, as VMS (upper case) exists. and we use vms (lower) as directory spec, so... */ #ifdef vms #undef vms #endif /* On some machines #define register is done in config; don't let it interfere with this file. */ #undef register /* On some systems we may not be able to use the system make command. */ #ifdef MAKE_COMMAND MAKE = MAKE_COMMAND #else MAKE=mms #endif #ifdef C_COMPILER CC = C_COMPILER #endif /* Some machines don't find the standard C libraries in the usual place. */ #ifndef ORDINARY_LINK #ifndef LIB_STANDARD #define LIB_STANDARD -lc #endif #else #ifndef LIB_STANDARD #define LIB_STANDARD #endif #endif /* Unless inhibited or changed, use -lg to link for debugging. */ #ifndef LIBS_DEBUG #define LIBS_DEBUG #endif /* Some s/*.h files define this to request special libraries. */ #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif /* Some m/*.h files define this to request special libraries. */ #ifndef LIBS_MACHINE #define LIBS_MACHINE #endif #ifndef LIB_MATH # ifdef LISP_FLOAT_TYPE # define LIB_MATH -lm # else /* ! defined (LISP_FLOAT_TYPE) */ # define LIB_MATH # endif /* ! defined (LISP_FLOAT_TYPE) */ #endif /* LIB_MATH */ /* Some s/*.h files define this to request special switches in ld. */ #ifndef LD_SWITCH_SYSTEM #if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF))) #define LD_SWITCH_SYSTEM -X #else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ #define LD_SWITCH_SYSTEM #endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ #endif /* LD_SWITCH_SYSTEM */ /* Some m/*.h files define this to request special switches in ld. */ #ifndef LD_SWITCH_MACHINE #define LD_SWITCH_MACHINE #endif /* Some m/*.h files define this to request special switches in cc. */ #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif /* Some s/*.h files define this to request special switches in cc. */ #ifndef C_SWITCH_SYSTEM #define C_SWITCH_SYSTEM #endif /* These macros are for switches specifically related to X Windows. */ #ifndef C_SWITCH_X_MACHINE #define C_SWITCH_X_MACHINE #endif #ifndef C_SWITCH_X_SYSTEM #define C_SWITCH_X_SYSTEM #endif #ifndef C_SWITCH_X_SITE #define C_SWITCH_X_SITE #endif #ifndef LD_SWITCH_X_SITE #define LD_SWITCH_X_SITE #endif /* These can be passed in from config.h to define special load and compile switches needed by individual sites */ #ifndef LD_SWITCH_SITE #define LD_SWITCH_SITE #endif #ifndef C_SWITCH_SITE #define C_SWITCH_SITE #endif #ifndef ORDINARY_LINK #ifndef CRT0_COMPILE #define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM #endif #ifndef START_FILES #ifdef NO_REMAP #ifdef COFF_ENCAPSULATE #define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o #else /* ! defined (COFF_ENCAPSULATE) */ #define START_FILES pre-crt0.o /lib/crt0.o #endif /* ! defined (COFF_ENCAPSULATE) */ #else /* ! defined (NO_REMAP) */ #define START_FILES crt0.o #endif /* ! defined (NO_REMAP) */ #endif /* START_FILES */ STARTFILES = START_FILES #else /* ORDINARY_LINK */ /* config.h might want to force START_FILES anyway */ #ifdef START_FILES STARTFILES = START_FILES #endif /* START_FILES */ #endif /* not ORDINARY_LINK */ /* cc switches needed to make `asm' keyword work. Nothing special needed on most machines. */ #ifndef C_SWITCH_ASM #define C_SWITCH_ASM #endif /* Figure out whether the system cpp can handle long names. Do it by testing it right now. If it loses, arrange to use the GNU cpp. */ #define LONGNAMEBBBFOOX #ifdef LONGNAMEBBBARFOOX /* Installed cpp fails to distinguish those names! */ /* Arrange to compile the GNU cpp later on */ #define NEED_CPP /* Cause cc to invoke the cpp that comes with Emacs, which will be in a file named localcpp. */ MYCPPFLAG= -Blocal /* LOCALCPP is the local one or nothing. CPP is the local one or the standardone. */ LOCALCPP= localcpp #endif /* ! defined (LONGNAMEBBBARFOOX) */ #ifdef SHORTNAMES SHORT= shortnames #endif /* DO NOT use -R. There is a special hack described in lastfile.c which is used instead. Some initialized data areas are modified at initial startup, then labeled as part of the text area when Emacs is dumped for the first time, and never changed again. */ /* If you want to debug, you can add C_DEBUG_SWITCH to this list. If you want to optimize, you can add C_OPTIMIZE_SWITCH to the list. */ /* -Demacs is needed to make some files produce the correct version for use in Emacs. -DHAVE_CONFIG_H is needed for some other files to take advantage of the information in `config.h'. */ #ifdef VMS ALL_CFLAGS = /define=("emacs",HAVE_CONFIG_H 'extra_defs')\ /include=(SYS$DISK:[],$(srcdir),$(srcdir_dev)[$(srcdir_dir).-.oldXmenu],\ $(vmsdir)) C_SWITCH_MACHINE C_SWITCH_X_MACHINE C_SWITCH_SYSTEM \ C_SWITCH_X_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE $(CFLAGS) C_DEBUG_SWITCH #else /* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM since it may have -I options that should override those two. */ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. -I${srcdir} \ C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_SITE C_SWITCH_X_SITE \ C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM ${CFLAGS} #endif .c.obj : on error then sh process/quota $(CC) $(CC_COMPILE_SWITCH) $(CPPFLAGS) $(ALL_CFLAGS) $< - /obj = sys$disk:[]$*.obj !/list=sys$disk:[]$*.lis/show=all #ifndef LIBX10_MACHINE #define LIBX10_MACHINE #endif #ifndef LIBX11_MACHINE #define LIBX11_MACHINE #endif #ifndef LIBX10_SYSTEM #define LIBX10_SYSTEM #endif #ifndef LIBX11_SYSTEM #define LIBX11_SYSTEM #endif #ifndef LIB_X11_LIB #define LIB_X11_LIB -lX11 #endif #ifdef HAVE_X_WINDOWS #ifdef HAVE_X_MENU /* Include xmenu.obj in the list of X object files. */ XOBJ= , xterm.obj, xfns.obj, xfaces.obj, xmenu.obj, xselect.obj, xrdb.obj /* The X Menu stuff is present in the X10 distribution, but missing from X11. If we have X10, just use the installed library; otherwise, use our own copy. */ #ifdef HAVE_X11 OLDXMENU= $(oldXmenudir)libXMenu11.olb LIBXMENU= $(OLDXMENU)/lib #else /* ! defined (HAVE_X11) */ LIBXMENU= -lXMenu #endif /* ! defined (HAVE_X11) */ #else /* ! defined (HAVE_X_MENU) */ /* Otherwise, omit xmenu.obj from the list of X object files, and don't worry about the menu library at all. */ XOBJ= , xterm.obj, xfns.obj, xfaces.obj, xselect.obj, xrdb.obj LIBXMENU= #endif /* ! defined (HAVE_X_MENU) */ #ifdef HAVE_X11 LIBX= $(LIBXMENU) LD_SWITCH_X_SITE LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM #else /* ! defined (HAVE_X11) */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM #endif /* ! defined (HAVE_X11) */ #endif /* ! defined (HAVE_X_WINDOWS) */ #ifndef ORDINARY_LINK /* Fix linking if compiled with GCC. */ #ifdef __GNUC__ #if __GNUC__ > 1 /* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure places that are difficult to figure out at make time. Fortunately, these same versions allow you to pass arbitrary flags on to the linker, so there's no reason not to use it as a linker. Well, it's not quite perfect. The `-nostdlib' keeps GCC from searching for libraries in its internal directories, so we have to ask GCC explicitly where to find libgcc.a. */ #ifndef LINKER #define LINKER $(CC) -nostdlib #endif #ifndef LIB_GCC /* Ask GCC where to find libgcc.a. */ #define LIB_GCC `$(CC) -print-libgcc-file-name` #endif /* LIB_GCC */ GNULIB_VAR = LIB_GCC /* GCC passes any argument prefixed with -Xlinker directly to the linker. See prefix-args.c for an explanation of why we don't do this with the shell's `for' construct. Note that some people don't have '.' in their paths, so we must use ./prefix-args. */ #define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` #else /* __GNUC__ < 2 */ #ifndef LIB_GCC #define LIB_GCC /usr/local/lib/gcc-gnulib #endif /* LIB_GCC */ GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi` #endif /* __GNUC__ < 2 */ #else /* ! defined (__GNUC__) */ GNULIB_VAR = #endif /* ! defined (__GNUC__) */ #endif /* not ORDINARY_LINK */ #ifdef VMS VMSLIBFILE = SYS$DISK:[-.vms]vmslib.olb VMSLIB = $(VMSLIBFILE)/lib #endif /* Specify address for ld to start loading at, if requested by configuration. */ #ifdef LD_TEXT_START_ADDR STARTFLAGS = -T LD_TEXT_START_ADDR -e __start #endif #ifdef ORDINARY_LINK LD = link #else #ifdef COFF_ENCAPSULATE LD=$(CC) -nostdlib #else /* not ORDINARY_LINK */ #ifdef LINKER LD=LINKER #else /* ! defined (LINKER) */ LD=ld #endif /* ! defined (LINKER) */ #endif /* ! defined (COFF_ENCAPSULATE) */ #endif /* not ORDINARY_LINK */ ALL_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_MACHINE LD_SWITCH_SITE $(LDFLAGS) /* A macro which other sections of ymakefile can redefine to munge the flags before they're passed to LD. This is helpful if you have redefined LD to something odd, like "gcc". */ #ifndef YMF_PASS_LDFLAGS #define YMF_PASS_LDFLAGS(flags) flags #endif /* Allow config.h to specify a replacement file for unexec.c. */ #ifndef UNEXEC #define UNEXEC , unexec.o #endif #ifndef UNEXEC_SRC #define UNEXEC_SRC $(srcdir)unexec.c #endif #ifndef UNEXEC_HDRS #define UNEXEC_HDRS #endif #ifdef USE_TEXT_PROPERTIES #define INTERVAL_SRC $(srcdir)intervals.h #define INTERVAL_OBJ ,intervals.obj, textprop.obj #else #define INTERVAL_SRC #define INTERVAL_OBJ #endif #ifdef HAVE_GETLOADAVG #define GETLOADAVG_OBJ #else #define GETLOADAVG_OBJ ,getloadavg.obj #endif /* lastfile must follow all files whose initialized data areas should be dumped as pure by dump-emacs. */ obj1= dispnew.obj, frame.obj, scroll.obj, xdisp.obj, window.obj, - term.obj, cm.obj $(XOBJ) obj2= emacs.obj, keyboard.obj, macros.obj, keymap.obj, sysdep.obj, - buffer.obj, filelock.obj, insdel.obj, marker.obj INTERVAL_OBJ obj3= minibuf.obj, fileio.obj, dired.obj, filemode.obj, - cmds.obj, casetab.obj, casefiddle.obj, indent.obj, search.obj obj4= regex.obj, undo.obj, alloc.obj, data.obj, doc.obj, editfns.obj, - callint.obj, eval.obj, floatfns.obj, fns.obj, print.obj, lread.obj obj5= abbrev.obj, syntax.obj UNEXEC, mocklisp.obj, bytecode.obj, - process.obj, callproc.obj, doprnt.obj GETLOADAVG_OBJ obj6= vmsfns.obj, vmsproc.obj, vmstime.obj obj=$(obj1), $(obj2), $(obj3), $(obj4), $(obj5), $(obj6) #ifdef TERMINFO /* Used to be -ltermcap here. If your machine needs that, define LIBS_TERMCAP in the m/*.h file. */ #ifndef LIBS_TERMCAP #define LIBS_TERMCAP -lcurses #endif /* LIBS_TERMCAP */ termcapobj = terminfo.obj #else /* ! defined (TERMINFO) */ #ifndef LIBS_TERMCAP #define LIBS_TERMCAP termcapobj = termcap.obj, tparam.obj #else /* LIBS_TERMCAP */ termcapobj = tparam.obj #endif /* LIBS_TERMCAP */ #endif /* ! defined (TERMINFO) */ #ifndef SYSTEM_MALLOC #ifdef GNU_MALLOC /* New GNU malloc */ #ifdef REL_ALLOC mallocobj = ,vmsgmalloc.obj, ralloc.obj, vm-limit.obj #else /* ! defined (REL_ALLOC) */ mallocobj = ,vmsgmalloc.obj, vm-limit.obj #endif /* ! defined (REL_ALLOC) */ #else /* Old GNU malloc */ mallocobj = ,malloc.obj #endif /* Old GNU malloc */ #endif /* SYSTEM_MALLOC */ #ifndef HAVE_ALLOCA allocaobj = ,alloca.obj #else allocaobj = #endif /* define otherobj as list of object files that make-docfile should not be told about. */ otherobj= $(termcapobj), lastfile.obj $(mallocobj) $(allocaobj) #ifdef LISP_FLOAT_TYPE #define FLOAT_SUPPORT $(lispdir)float-sup.elc #else #define FLOAT_SUPPORT #endif #ifdef MULTI_FRAME #define FRAME_SUPPORT $(lispdir)frame.elc $(lispdir)mouse.elc $(lispdir)select.elc $(lispdir)scroll-bar.elc #else #define FRAME_SUPPORT #endif #ifdef VMS #define VMS_SUPPORT $(lispdir)vmsproc.elc $(lispdir)vms-patch.elc \ $(lispdir)vms-date.el #else #define VMS_SUPPORT #endif /* List of Lisp files loaded into the dumped Emacs. It's arranged like this because it's easier to generate it semi-mechanically from loadup.el this way. Note that this list should not include lisp files which might not be present, like site-load.el and site-init.el; this makefile expects them all to be either present or buildable. It should not include version.el. That file is often changed by the build process itself, but most of the files which want to depend on lisp.h don't care about those changes. */ lisp1= $(lispdir)abbrev.elc - $(lispdir)buff-menu.elc - $(lispdir)byte-run.elc - $(lispdir)c-mode.elc lisp2= $(lispdir)files.elc - $(lispdir)fill.elc lisp3= FLOAT_SUPPORT lisp4= FRAME_SUPPORT lisp5= $(lispdir)help.elc - $(lispdir)indent.elc - $(lispdir)isearch.elc - $(lispdir)lisp-mode.elc lisp6= $(lispdir)lisp.elc - $(lispdir)loaddefs.el - $(lispdir)map-ynp.elc - $(lispdir)page.elc lisp7= $(lispdir)paragraphs.elc - $(lispdir)paths.el - $(lispdir)register.elc - $(lispdir)replace.elc lisp8= $(lispdir)simple.elc - $(lispdir)startup.elc - $(lispdir)subr.elc lisp9= $(lispdir)text-mode.elc - $(lispdir)vc-hooks.elc lisp10= VMS_SUPPORT - $(lispdir)window.elc lisp=$(lisp1) $(lisp2) $(lisp3) $(lisp4) $(lisp5) $(lisp6) $(lisp7) - $(lisp8) $(lisp9) $(lisp10) /* Construct full set of libraries to be linked. Note that SunOS needs -lm to come before -lc; otherwise, you get duplicated symbols. If the standard libraries were compiled with GCC, we might need gnulib again after them. */ LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP LIBS_DEBUG \ $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) $(VMSLIB) /* Enable recompilation of certain other files depending on system type. */ #ifndef OTHER_FILES #define OTHER_FILES #endif /* Enable inclusion of object files in temacs depending on system type. */ #ifndef OBJECTS_SYSTEM #define OBJECTS_SYSTEM #endif #ifndef OBJECTS_MACHINE #define OBJECTS_MACHINE #endif .FIRST : if "$(sys_includes)" .nes. "" then - define /nolog sys $(sys_includes),$(srcdir),sys$disk:[] if "$(sys_includes)" .eqs. "" then - define /nolog sys $(srcdir),sys$disk:[] if "$(x_includes)" .nes. "" then - define /nolog x11 $(x_includes) extra_defs = "" all : $(OLDXMENU) [-.vms]temacs.dump OTHER_FILES / / / ! all_debug : $(OLDXMENU) [-.vms]temacs_d.dump OTHER_FILES / / / ! [-.vms]temacs.dump : [-.vms]temacs.exe [-.vms]temacs_d.dump : [-.vms]temacs_d.exe [-.vms]temacs_d.input [-.vms]temacs.dump [-.vms]temacs_d.dump : $(etc)DOC $(lisp) [-.lisp]version.el #ifdef CANNOT_DUMP #else #ifdef HAVE_SHM -if [ -w ${srcdir}/../lisp ]; then \ w=`pwd`; cd ${srcdir}; $${w}/temacs -nl -batch -l ../lisp/inc-vers; \ else true; fi ./temacs -nl -batch -l loadup dump #else /* ! defined (HAVE_SHM) */ #ifdef VMS set noon home=f$environment("DEFAULT") set default [-.vms] temacs_name = f$parse("$@",,,"NAME") a = f$trnlnm("DBG$DECW$DISPLAY") define dbg$decw$display " " if "$@" - "_D" .nes. "$@" then - def/user dbg$input sys$disk:[-.vms]temacs_d.input mcr sys$disk:[-.vms]'temacs_name' -batch -l $(srcdir_dev)[$(srcdir_dir).-.lisp]inc-vers set on if "$@" - "_D" .nes. "$@" then - def/user dbg$input [-.vms]temacs_d.input mcr sys$disk:[-.vms]'temacs_name' -batch -l loadup dump set default 'home' if a .eqs. "" then deassign dbg$decw$display if a .nes. "" then define dbg$decw$display "''a'" #else /* ! defined (VMS) */ -if [ -w ${srcdir}/../lisp ]; then \ w=`pwd`; cd ${srcdir}; $${w}/temacs -batch -l ../lisp/inc-vers; \ else true; fi ./temacs -batch -l loadup dump #endif /* ! defined (VMS) */ #endif /* ! defined (HAVE_SHM) */ #endif /* ! defined (CANNOT_DUMP) */ [-.lisp]version.el : $(lispdir)version.el if f$search("[-.lisp]version.el") .eqs. "" then - copy $(lispdir)version.el sys$disk:[-.lisp] open/read/write foo [-.lisp]version.el close foo ! makedoc = mcr SYS$DISK:$(libsrc)make-docfile makedoc_obj = makedoc -a $(etc)DOC -d $(srcdir) ! makedoc_lisp = makedoc -a $(etc)DOC -d $(lispdir) makedoc_lisp = makedoc -a $(etc)DOC $(etc)DOC : $(libsrc)make-docfile.exe $(obj) $(lisp) OBJECTS_SYSTEM OBJECTS_MACHINE @[-.vms]makedoc - purge $(etc)DOC$(dot) ! We're just testing to see if it works better to use the command procedure. ! !- if f$search("$(etc)DOC$(dot)$(dot)*") .nes. "" then - ! ! delete/log $(etc)DOC$(dot)$(dot)* ! makedoc := $SYS$DISK:$(libsrc)make-docfile ! makedoc -o $(etc)DOC -d $(srcdir) ! ! makedoc = orig_makedoc + " -a $(etc)DOC -d $(srcdir)" ! $(makedoc_obj) $(obj1) ! $(makedoc_obj) $(obj2) ! $(makedoc_obj) $(obj3) ! $(makedoc_obj) $(obj4) ! $(makedoc_obj) $(obj5) ! $(makedoc_obj) $(obj6) ! $(makedoc_obj) OBJECTS_SYSTEM ! $(makedoc_obj) OBJECTS_MACHINE ! ! makedoc = orig_makedoc + " -a $(etc)DOC -d $(lispdir)" ! $(makedoc_lisp) $(lisp1) ! $(makedoc_lisp) $(lisp2) ! $(makedoc_lisp) $(lisp3) ! $(makedoc_lisp) $(lisp4) ! $(makedoc_lisp) $(lisp5) ! $(makedoc_lisp) $(lisp6) ! $(makedoc_lisp) $(lisp7) ! $(makedoc_lisp) $(lisp8) ! $(makedoc_lisp) $(lisp9) ! $(makedoc_lisp) $(lisp10) ! $(makedoc_lisp) $(lispdir)version.el ! - purge $(etc)DOC$(dot) $(libsrc)make-docfile.exe : a = f$environment("DEFAULT") set def $(libsrc) $(MMS) $(MMSQUALIFIERS) make-docfile.exe [-.arch-lib] set def 'a' /* Some systems define this to cause parallel Make-ing. */ #ifndef MAKE_PARALLEL #define MAKE_PARALLEL #endif #ifdef USE_DEBUG_HACK ! This is a REALLY ugly thing, but it does things right... [-.vms]temacs.exe : [-.vms]hackdebug.exe #endif [-.vms]temacs.exe [-.vms]temacs_d.exe : [-.vms]temacs.opt #ifdef USE_DEBUG_HACK debug_flag := /debug #else debug_flag = "" if "$@" - "_D" .nes. "$@" then debug_flag = "/debug" #endif $(LD) YMF_PASS_LDFLAGS ($(STARTFLAGS) $(ALL_LDFLAGS)) 'debug_flag' - /exec=$/ / //trace/map=$*.map/full [-.vms]temacs.opt/opt #ifdef USE_DEBUG_HACK if "$@" - "_D" .eqs. "$@" then mcr SYS$DISK:[-.vms]hackdebug $/ / / #endif [-.vms]temacs_d.input : open/write foo $/ / / write foo "go" #ifdef __ALPHA write foo "go" #endif close foo ![-.vms]temacs.opt : MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) $(OLDXMENU)- ! $(obj) $(otherobj) OBJECTS_SYSTEM OBJECTS_MACHINE prefix-args.exe [-.vms]temacs.opt : MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) - $(OLDXMENU) $(VMSLIBFILE) - $(obj) $(otherobj) OBJECTS_SYSTEM OBJECTS_MACHINE - prefix-args.exe - if f$search("[-.vms]temacs.opt.*") .nes. "" then delete [-.vms]temacs.opt.* open/write foo [-.vms]temacs.opt write foo "cluster=emacs,8192,,-" if "$(STARTFILES)" .nes. "" then write foo "$(STARTFILES),-" write foo "$(obj1),-" write foo "$(obj2),-" write foo "$(obj3),-" write foo "$(obj4),-" write foo "$(obj5),-" write foo "$(obj6),-" write foo "$(otherobj)" a := OBJECTS_SYSTEM if a .nes. "" then write foo "''a',-" a := OBJECTS_MACHINE if a .nes. "" then write foo "''a',-" write foo "collect=non_saved_data,-" write foo "stdin,-" write foo "stdout,-" write foo "stderr,-" write foo "errno,-" write foo "vaxc$errno,-" write foo "sys_errlist,-" write foo "sys_nerr,-" write foo "environ,-" write foo "$char_string_constants" ! This way, the saveable ! data might start on a ! page boundary! / / /$(vmsdir)loop_args lib "$(LIBES)" " " "write foo lib" ";" close foo - if f$search("[-.vms]temacs.opt_com.*") .nes. "" then delete [-.vms]temacs.opt_com.* prefix-args.exe : $(srcdir)prefix-args.c $(config_h) $(CC) $(ALL_CFLAGS) $(srcdir)prefix-args.c /obj=prefix-args $(LD) /exe=prefix-args.exe prefix-args.obj,[-.vms]vmslink.opt/opt /* These are needed for C compilation, on the systems that need them */ #ifdef NEED_CPP CPP = ./localcpp localcpp : cd $(cppdir); $(MAKE) $(MMSQUALIFIERS) EMACS=-DEMACS ln $(cppdir)cpp localcpp /* Name where ALL_CFLAGS will refer to it */ /* cc appears to be cretinous and require all of these to exist if -B is specified -- we can't use one local pass and let the others be the standard ones. What a loser. We can't even use ln, since they are probably on different disks. */ cp /lib/ccom localccom -cp /lib/optim localoptim -cp /lib/c2 localc2 cp /bin/as localas #else /* ! defined (NEED_CPP) */ /* CPP = $(CC) -E /* On VMS, this is a pure bogosity */ #endif /* ! defined (NEED_CPP) */ #ifdef SHORTNAMES shortnames : cd $(shortnamesdir); $(MAKE) $(MMSQUALIFIERS) #endif /* Don't lose if this was not defined. */ #ifndef OLDXMENU_OPTIONS #define OLDXMENU_OPTIONS #endif #ifdef HAVE_X_WINDOWS #ifdef HAVE_X_MENU #ifdef HAVE_X11 #define DID_OLDXMENU !$(OLDXMENU) : really-oldXMenu ! ! - delete 'f$element(0,"/","$(OLDXMENU)")'.* /* We might have a link to an old version. */ ! ! $(LN_S) $(oldXMenudir)libXMenu11.olb 'f$element(0,"/","$(OLDXMENU)")' /* Encode the values of these two macros in Make variables, so we can use $(...) to substitute their values within "...". */ C_SWITCH_MACHINE_1 = C_SWITCH_MACHINE C_SWITCH_SYSTEM_1 = C_SWITCH_SYSTEM C_SWITCH_SITE_1 = C_SWITCH_SITE C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM really-oldXMenu : a = f$environment("DEFAULT") set def $(oldXMenudir) $(MAKE) $(MMSQUALIFIERS) OLDXMENU_OPTIONS - /macro=(CC="$(CC)",CFLAGS="$(CFLAGS)",MAKE="$(MAKE)", - "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)", - "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)", - "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)", - "C_SWITCH_SITE=$(C_SWITCH_SITE_1)", - "C_SWITCH_MACHINE=$(C_SWITCH_MACHINE_1)", - "C_SWITCH_SYSTEM=$(C_SWITCH_SYSTEM_1)") set def 'a' ! We know the description file in $(oldXMenudir) destroys the ! value of logical name "sys", so... if "$(sys_includes)" .nes. "" then - define /nolog sys $(sys_includes),$(srcdir),sys$disk:[] if "$(sys_includes)" .eqs. "" then - define /nolog sys $(srcdir),sys$disk:[] if "$(x_includes)" .nes. "" then - define /nolog x11 $(x_includes) ! / / /true /* make -t should not create really-oldXMenu. */ #endif /* ! defined (HAVE_X11) */ #endif /* ! defined (HAVE_X_MENU) */ #endif /* ! defined (HAVE_X_WINDOWS) */ #ifndef DID_OLDXMENU really-oldXMenu : @ ! #endif paths.h : $(srcdir)paths.h_in / / / write sys$output "The file paths.h needs to be set up from paths.h_in." / / / write sys$output "Consult the file `INSTALL' for instructions for building Emacs." exit 4 config.h : $(srcdir)config.h_in / / / write sys$output "The file config.h needs to be set up from config.h_in." / / / write sys$output "Consult the file `INSTALL' for instructions for building Emacs." exit 4 /* 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). */ #ifdef C_ALLOCA /* We could put something in alloca.c to #define free and malloc whenever emacs was #defined, but that's not appropriate for all users of alloca in Emacs. Check out ../lib-src/getopt.c. */ alloca.obj : $(srcdir)alloca.c $(srcdir)blockinput.h $(config_h) extra_defs = ",""free""=""xfree"",""malloc""=""xmalloc""" $(CC) $(CPPFLAGS) $(ALL_CFLAGS) $(srcdir)alloca.c !/list/show=all extra_defs = "" #else #ifndef HAVE_ALLOCA alloca.obj : $(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's) use that name for the intermediate assembler file. */ $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \ sed -e 's/ //' -e 's/^#.*//' | \ sed -n -e '/^..*$$/p' > allocax.s -rm -f alloca.obj /* Xenix, in particular, needs to run assembler via cc. */ $(CC) -c allocax.s mv allocax.obj alloca.obj rm allocax.s allocatem.c #endif /* HAVE_ALLOCA */ #endif /* ! defined (C_ALLOCA) */ /* Nearly all the following files depend on lisp.h, but it is not included as a dependency because it is so often changed in ways that do not require any recompilation and so rarely changed in ways that do require any. */ abbrev.obj : $(srcdir)abbrev.c $(srcdir)buffer.h $(srcdir)commands.h - $(config_h) buffer.obj : $(srcdir)buffer.c $(srcdir)syntax.h $(srcdir)buffer.h - $(srcdir)commands.h $(srcdir)window.h INTERVAL_SRC $(srcdir)blockinput.h - $(config_h) callint.obj : $(srcdir)callint.c $(srcdir)window.h $(srcdir)commands.h - $(srcdir)buffer.h $(srcdir)mocklisp.h $(srcdir)keyboard.h $(config_h) callproc.obj : $(srcdir)callproc.c paths.h $(srcdir)buffer.h - $(srcdir)commands.h $(config_h) $(srcdir)process.h casefiddle.obj : $(srcdir)casefiddle.c $(srcdir)syntax.h $(srcdir)commands.h - $(srcdir)buffer.h $(config_h) casetab.obj : $(srcdir)casetab.c $(srcdir)buffer.h $(config_h) cm.obj : $(srcdir)cm.c $(srcdir)cm.h $(srcdir)termhooks.h $(config_h) cmds.obj : $(srcdir)cmds.c $(srcdir)syntax.h $(srcdir)buffer.h - $(srcdir)commands.h $(config_h) pre-crt0.obj : $(srcdir)pre-crt0.c crt0.obj : $(srcdir)crt0.c $(config_h) CRT0_COMPILE $(srcdir)$(D_D)crt0.c dired.obj : $(srcdir)dired.c $(srcdir)commands.h $(srcdir)buffer.h - $(config_h) $(srcdir)regex.h dispnew.obj : $(srcdir)dispnew.c $(srcdir)commands.h $(srcdir)frame.h - $(srcdir)window.h $(srcdir)buffer.h $(srcdir)dispextern.h - $(srcdir)termchar.h $(srcdir)termopts.h $(srcdir)termhooks.h - $(srcdir)cm.h $(srcdir)disptab.h $(srcdir)systty.h $(srcdir)systime.h - $(config_h) doc.obj : $(srcdir)doc.c $(config_h) paths.h $(srcdir)buffer.h - $(srcdir)keyboard.h doprnt.obj : $(srcdir)doprnt.c editfns.obj : $(srcdir)editfns.c $(srcdir)window.h $(srcdir)buffer.h - $(srcdir)systime.h INTERVAL_SRC $(config_h) emacs.obj : $(srcdir)emacs.c $(srcdir)commands.h $(srcdir)systty.h - $(srcdir)syssignal.h $(srcdir)process.h INTERVAL_SRC $(config_h) fileio.obj : $(srcdir)fileio.c $(srcdir)window.h $(srcdir)buffer.h - $(srcdir)systime.h INTERVAL_SRC $(config_h) filelock.obj : $(srcdir)filelock.c $(srcdir)buffer.h paths.h - $(config_h) filemode.obj : $(srcdir)filemode.c $(config_h) getloadavg.obj : $(srcdir)getloadavg.c $(config_h) indent.obj : $(srcdir)indent.c $(srcdir)frame.h $(srcdir)window.h - $(srcdir)indent.h $(srcdir)buffer.h $(config_h) $(srcdir)termchar.h - $(srcdir)termopts.h $(srcdir)disptab.h insdel.obj : $(srcdir)insdel.c $(srcdir)window.h $(srcdir)buffer.h - INTERVAL_SRC $(srcdir)blockinput.h $(config_h) keyboard.obj : $(srcdir)keyboard.c $(srcdir)termchar.h $(srcdir)termhooks.h - $(srcdir)termopts.h $(srcdir)buffer.h $(srcdir)commands.h - $(srcdir)frame.h $(srcdir)window.h $(srcdir)macros.h $(srcdir)disptab.h - $(srcdir)keyboard.h $(srcdir)syssignal.h $(srcdir)systty.h - $(srcdir)systime.h $(srcdir)dispextern.h $(srcdir)intervals.h - $(srcdir)blockinput.h $(config_h) keymap.obj : $(srcdir)keymap.c $(srcdir)buffer.h $(srcdir)commands.h - $(srcdir)keyboard.h $(srcdir)termhooks.h $(srcdir)blockinput.h $(config_h) lastfile.obj : $(srcdir)lastfile.c $(config_h) macros.obj : $(srcdir)macros.c $(srcdir)window.h $(srcdir)buffer.h - $(srcdir)commands.h $(srcdir)macros.h $(config_h) malloc.obj : $(srcdir)malloc.c $(config_h) ralloc.obj : $(srcdir)ralloc.c $(config_h) vm-limit.obj : $(srcdir)vm-limit.c $(srcdir)mem-limits.h $(config_h) marker.obj : $(srcdir)marker.c $(srcdir)buffer.h $(config_h) minibuf.obj : $(srcdir)minibuf.c $(srcdir)syntax.h $(srcdir)dispextern.h - $(srcdir)frame.h $(srcdir)window.h $(srcdir)buffer.h $(srcdir)commands.h - $(config_h) mocklisp.obj : $(srcdir)mocklisp.c $(srcdir)buffer.h $(config_h) process.obj : $(srcdir)process.c $(srcdir)process.h $(srcdir)buffer.h - $(srcdir)window.h $(srcdir)termhooks.h $(srcdir)termopts.h - $(srcdir)commands.h $(srcdir)syssignal.h $(srcdir)systime.h - $(srcdir)systty.h $(srcdir)syswait.h $(srcdir)frame.h $(config_h) regex.obj : $(srcdir)regex.c $(srcdir)syntax.h $(srcdir)buffer.h $(config_h) - $(srcdir)regex.h frame.obj : $(srcdir)frame.c $(srcdir)xterm.h $(srcdir)window.h - $(srcdir)frame.h $(srcdir)termhooks.h $(srcdir)commands.h - $(srcdir)keyboard.h $(srcdir)buffer.h $(config_h) scroll.obj : $(srcdir)scroll.c $(srcdir)termchar.h $(config_h) - $(srcdir)dispextern.h $(srcdir)frame.h search.obj : $(srcdir)search.c $(srcdir)regex.h $(srcdir)commands.h - $(srcdir)buffer.h $(srcdir)syntax.h $(srcdir)blockinput.h $(config_h) syntax.obj : $(srcdir)syntax.c $(srcdir)syntax.h $(srcdir)buffer.h - $(srcdir)commands.h $(config_h) sysdep.obj : $(srcdir)sysdep.c $(config_h) $(srcdir)dispextern.h - $(srcdir)termhooks.h $(srcdir)termchar.h $(srcdir)termopts.h - $(srcdir)frame.h $(srcdir)syssignal.h $(srcdir)systty.h - $(srcdir)systime.h $(srcdir)syswait.h $(srcdir)blockinput.h - $(srcdir)window.h term.obj : $(srcdir)term.c $(srcdir)termchar.h $(srcdir)termhooks.h - $(srcdir)termopts.h $(config_h) $(srcdir)cm.h $(srcdir)frame.h - $(srcdir)disptab.h termcap.obj : $(srcdir)termcap.c $(config_h) terminfo.obj : $(srcdir)terminfo.c $(config_h) tparam.obj : $(srcdir)tparam.c $(config_h) undo.obj : $(srcdir)undo.c $(srcdir)buffer.h $(srcdir)commands.h $(config_h) UNEXEC : UNEXEC_SRC UNEXEC_HDRS $(config_h) window.obj : $(srcdir)window.c $(srcdir)indent.h $(srcdir)commands.h - $(srcdir)frame.h $(srcdir)window.h $(srcdir)buffer.h $(srcdir)termchar.h - $(srcdir)termhooks.h $(srcdir)disptab.h $(srcdir)keyboard.h $(config_h) xdisp.obj : $(srcdir)xdisp.c $(srcdir)macros.h $(srcdir)commands.h - $(srcdir)indent.h $(srcdir)buffer.h $(srcdir)dispextern.h - $(srcdir)termchar.h $(srcdir)frame.h $(srcdir)window.h $(srcdir)disptab.h - $(srcdir)termhooks.h $(config_h) xfaces.obj : $(srcdir)xfaces.c $(srcdir)dispextern.h $(srcdir)frame.h - $(srcdir)xterm.h $(srcdir)buffer.h $(srcdir)blockinput.h - $(srcdir)window.h $(config_h) xfns.obj : $(srcdir)xfns.c $(srcdir)buffer.h $(srcdir)frame.h - $(srcdir)window.h $(srcdir)keyboard.h $(srcdir)xterm.h - $(srcdir)blockinput.h $(config_h) xmenu.obj : $(srcdir)xmenu.c $(srcdir)xterm.h $(srcdir)window.h - $(srcdir)frame.h $(srcdir)keyboard.h $(srcdir)blockinput.h $(config_h) xterm.obj : $(srcdir)xterm.c $(srcdir)xterm.h $(srcdir)termhooks.h - $(srcdir)termopts.h $(srcdir)termchar.h $(srcdir)window.h - $(srcdir)dispextern.h $(srcdir)frame.h $(srcdir)disptab.h - $(srcdir)blockinput.h $(srcdir)systime.h $(srcdir)gnu.h $(srcdir)sink.h - $(srcdir)sinkmask.h $(config_h) xselect.obj : $(srcdir)xselect.c $(srcdir)dispextern.h $(srcdir)frame.h - $(srcdir)xterm.h $(srcdir)blockinput.h $(config_h) xrdb.obj : $(srcdir)xrdb.c $(config_h) hftctl.obj : $(srcdir)hftctl.c $(config_h) /* The files of Lisp proper */ alloc.obj : $(srcdir)alloc.c $(srcdir)frame.h $(srcdir)window.h - $(srcdir)buffer.h $(srcdir)puresize.h $(srcdir)syssignal.h alloc.obj : $(srcdir)blockinput.h $(config_h) INTERVAL_SRC bytecode.obj : $(srcdir)bytecode.c $(srcdir)buffer.h $(config_h) data.obj : $(srcdir)data.c $(srcdir)buffer.h $(srcdir)puresize.h - $(srcdir)syssignal.h $(config_h) eval.obj : $(srcdir)eval.c $(srcdir)commands.h $(srcdir)keyboard.h - $(srcdir)blockinput.h $(config_h) floatfns.obj : $(srcdir)floatfns.c $(config_h) fns.obj : $(srcdir)fns.c $(srcdir)commands.h $(config_h) $(srcdir)frame.h - $(srcdir)buffer.h $(srcdir)keyboard.h INTERVAL_SRC print.obj : $(srcdir)print.c $(srcdir)process.h $(srcdir)frame.h - $(srcdir)window.h $(srcdir)buffer.h $(config_h) lread.obj : $(srcdir)lread.c $(srcdir)commands.h $(srcdir)keyboard.h - $(srcdir)buffer.h paths.h $(config_h) $(srcdir)termhooks.h /* Text properties support */ textprop.obj : $(srcdir)textprop.c $(srcdir)buffer.h $(srcdir)intervals.h - $(config_h) intervals.obj : $(srcdir)intervals.c $(srcdir)buffer.h $(srcdir)intervals.h - $(srcdir)puresize.h $(config_h) /* System-specific programs to be made. OTHER_FILES, OBJECTS_SYSTEM and OBJECTS_MACHINE select which of these should be compiled. */ sunfns.obj : $(srcdir)sunfns.c $(srcdir)buffer.h $(config_h) #ifdef VMS vmsfns.obj : $(srcdir)vmsfns.c $(srcdir)lisp.h $(config_h) vmsgmalloc.obj : $(srcdir)vmsgmalloc.c $(config_h) vmsmap.obj : $(srcdir)vmsmap.c $(srcdir)lisp.h $(srcdir)getpagesize.h - $(config_h) vmsproc.obj : $(srcdir)vmsproc.c $(srcdir)lisp.h $(srcdir)buffer.h - $(srcdir)commands.h $(srcdir)process.h $(srcdir)vmsproc.h - $(srcdir)systty.h $(srcdir)systime.h $(config_h) vmstime.obj : $(srcdir)vmstime.c $(srcdir)vmstime.h $(config_h) $(srcdir)systime.h : $(srcdir)vmstime.h $(vmsdir)utime.h @ ! This was just too fool the system to think systime.h was remade. @ ! This does the same as UNIX touch. @ open/read/write foo $(srcdir)systime.h @ close foo #endif $(libsrc)emacstool : $(libsrc)emacstool.c cd $(libsrc); $(MAKE) $(MMSQUALIFIERS) emacstool mostlyclean : - delete prefix-args.exe.*, [-.vms]temacs*.exe.*,.dump.*,.map.* - delete _$%*$$..*, _$%*.*$$.*, *.obj.* - delete $(oldXMenudir)libXMenu11.olb.* - delete [-.etc]DOC..* clean : mostlyclean @ ! /**/# This is used in making a distribution. /**/# Do not use it on development directories! distclean : clean - @$(vmsdir)delete paths.h.*,config.h.*,descrip.mms.*,descrip.mms_in.* FORCE - delete [-.etc]DOC-*.*.* realclean : distclean - delete TAGS..* versionclean : - delete [-.vms]temacs.dump.* - delete [-.etc]DOC*.*.* extraclean : distclean - delete _$$*$$..*, _$$*.*$$.* - purge [],[.m],[.s] SOURCES = *.c,*.h,[.s]*.*, [.m]*.*, COPYING., ymakefile.vms, - config.h_in, README., COPYING., ChangeLog., vms.pp-trans unlock : set file/prot=(o:RWED) $(SOURCES) relock : set file/prot=(o:RE,g:RE,w:RE) $(SOURCES) set file/prot=(o:RWED,g:RWED,w:RWED) paths.h tagsfiles = *.h *.c [-.lisp]*.el [-.lisp.term]*.el TAGS : $(tagsfiles) etags $(tagsfiles) tags : TAGS #.PHONY : tags