Annotation of 43BSD/contrib/emacs/src/ymakefile, revision 1.1.1.1

1.1       root        1: /* Makefile for GNU Emacs.
                      2:    Copyright (C) 1985 Richard M. Stallman.
                      3: 
                      4: This file is part of GNU Emacs.
                      5: 
                      6: GNU Emacs is distributed in the hope that it will be useful,
                      7: but WITHOUT ANY WARRANTY.  No author or distributor
                      8: accepts responsibility to anyone for the consequences of using it
                      9: or for whether it serves any particular purpose or works at all,
                     10: unless he says so in writing.  Refer to the GNU Emacs General Public
                     11: License for full details.
                     12: 
                     13: Everyone is granted permission to copy, modify and redistribute
                     14: GNU Emacs, but only under the conditions described in the
                     15: GNU Emacs General Public License.   A copy of this license is
                     16: supposed to have been given to you along with GNU Emacs so you
                     17: can know your rights and responsibilities.  It should be in a
                     18: file named COPYING.  Among other things, the copyright notice
                     19: and this notice must be preserved on all copies.  */
                     20: 
                     21: 
                     22: #define NO_SHORTNAMES
                     23: #include "config.h"
                     24: 
                     25: /* library that contains select () and related stuff, on some system V's.
                     26:    I suspect that it is true for Uniplus and not others.  */
                     27: #ifdef UNIPLUS
                     28: LIBNET= -lnet
                     29: #endif
                     30: 
                     31: /* 4.1 has a jobs library that has to do with simulating some
                     32:    stuff that is standard in 4.2.  */
                     33: #ifdef BSD4_1
                     34: LIBJOBS= -ljobs
                     35: #endif
                     36: 
                     37: #ifdef HPUX
                     38: LIBBSD= -lBSD
                     39: LIBG= /usr/lib/end.o
                     40: #endif
                     41: 
                     42: /* -lg makes dbx work.  Maybe on sysV it makes sdb work.  */
                     43: #if !defined (APOLLO) && (defined (BSD) || defined (UNIPLUS))
                     44: LIBG= -lg
                     45: #endif
                     46: 
                     47: /* Some machines don't find the standard C libraries in the usual place.  */
                     48: #ifdef LIB_STANDARD
                     49: LIBSTD= LIB_STANDARD
                     50: #else
                     51: LIBSTD= -lc
                     52: #endif
                     53: 
                     54: /* -gx makes dbx work properly on a pyramid. */
                     55: #ifdef pyramid
                     56: DEBUGSWITCH= -gx
                     57: #else
                     58: DEBUGSWITCH= -g
                     59: #endif
                     60: 
                     61: /* -N is used on some USG systems to avoid a gap in addresses
                     62:    between the end of the text and the start of the data segment.  */
                     63: #ifdef LOADER_N_SWITCH
                     64: LDNSWITCH= -N
                     65: #endif
                     66: 
                     67: /* Specify address for ld to start loading at,
                     68:    if requested by configuration.  */
                     69: 
                     70: #ifdef TEXT_START_ADDR
                     71: STARTFLAGS = -T TEXT_START_ADDR -e TEXT_START_ADDR
                     72: #endif
                     73: 
                     74: #if defined (BSD) && !defined (COFF)
                     75: #ifdef celerity
                     76: LDFLAGS= -X -k100000
                     77: #else
                     78: LDFLAGS= -X
                     79: #endif
                     80: #else /* COFF, or not BSD */
                     81: #ifdef UNIPLUS
                     82: /* On the dual box under 5.2, ld must have -N and /usr/lib/unshared.ld to
                     83:    make an unshared version, and /usr/lib/shared.ld to make a shared version.
                     84:    The shared version is the only way to go, but initially there were
                     85:    problems with malloc.c for shared programs.
                     86:    fnf@Unisoft */
                     87: LDFLAGS= $(LDNSWITCH) -L/lib/libg /usr/lib/unshared.ld
                     88: #else
                     89: /* For system V */
                     90: LDFLAGS= $(LDNSWITCH)
                     91: #endif
                     92: #endif /* COFF, or not BSD */
                     93: 
                     94: #ifdef UMAX
                     95: /* Guarantee that text and data are aligned on 1 K boundaries */
                     96: ALIGNMENT= align.umax
                     97: #endif
                     98: 
                     99: /* Figure out whether the system cpp can handle long names.
                    100:    Do it by testing it right now.
                    101:    If it loses, arrange to use the GNU cpp.  */
                    102: 
                    103: #define LONGNAMEBBBFOOX
                    104: #ifdef LONGNAMEBBBARFOOX
                    105: /* Installed cpp fails to distinguish those names!  */
                    106: /* Arrange to compile the GNU cpp later on */
                    107: #define NEED_CPP
                    108: /* Cause cc to invoke the cpp that comes with Emacs,
                    109:    which will be in a file named localcpp.  */
                    110: MYCPPFLAG= -Blocal
                    111: /* LOCALCPP is the local one or nothing.
                    112:    CPP is the local one or the standardone.  */
                    113: LOCALCPP= localcpp
                    114: #endif /* NEED_CPP */
                    115: 
                    116: #ifdef SHORTNAMES
                    117: SHORT= shortnames
                    118: #endif /* SHORTNAMES */
                    119: 
                    120: CFLAGS= $(DEBUGSWITCH) -Demacs $(MYCPPFLAG)
                    121: /* DO NOT use -R.  There is a special hack described in lastfile.c
                    122:    which is used instead.  Some initialized data areas are modified
                    123:    at initial startup, then labeled as part of the text area when
                    124:    Emacs is dumped for the first time, and never changed again. */
                    125: 
                    126: /* You may replace $(DEBUGSWITCH) with -O if you don't believe in debugging. */
                    127: 
                    128: /* -Demacs is needed to make some files produce the
                    129:    correct version for use in Emacs.  */
                    130: 
                    131: 
                    132: #ifdef HAVE_X_WINDOWS
                    133: XOBJ= xterm.o xfns.o
                    134: LIBX= -lX
                    135: #endif /* HAVE_X_WINDOWS */
                    136: 
                    137: /* lastfile must follow all files
                    138:    whose initialized data areas should be dumped as pure by dump-emacs. */
                    139: obj=    dispnew.o scroll.o xdisp.o window.o \
                    140:        term.o cm.o $(XOBJ) \
                    141:        emacs.o keyboard.o macros.o keymap.o sysdep.o \
                    142:        buffer.o filelock.o insdel.o marker.o \
                    143:        minibuf.o fileio.o dired.o filemode.o \
                    144:        cmds.o casefiddle.o indent.o search.o regex.o undo.o \
                    145:        alloc.o data.o doc.o editfns.o callint.o \
                    146:        eval.o fns.o print.o lread.o \
                    147:        abbrev.o syntax.o unexec.o mocklisp.o bytecode.o \
                    148:        process.o callproc.o \
                    149:        doprnt.o
                    150: 
                    151: /* define otherobj as list of object files that make-docfile
                    152:    should not be told about.  */
                    153: #ifdef APOLLO
                    154: otherobj= termcap.o tparam.o lastfile.o
                    155: LTERMCAP= -ltermcap
                    156: #endif /* APOLLO */
                    157: #ifdef sun
                    158: /* SUN puts funny things in their termcap; must not replace it.  */
                    159: otherobj= tparam.o lastfile.o alloca.o malloc.o
                    160: LTERMCAP= -ltermcap
                    161: #endif /* sun */
                    162: #ifdef TERMINFO
                    163: otherobj= terminfo.o lastfile.o alloca.o malloc.o
                    164: LTERMCAP= -ltermcap
                    165: #endif /* TERMINFO */
                    166: 
                    167: #if !defined (APOLLO) && !defined (sun) && !defined (TERMINFO)
                    168: otherobj= termcap.o tparam.o lastfile.o alloca.o malloc.o
                    169: #endif
                    170: 
                    171: /* List of Lisp files loaded into the dumped Emacs. */
                    172: lisp=  ../lisp/simple.elc ../lisp/files.elc ../lisp/window.elc \
                    173:        ../lisp/indent.elc ../lisp/loaddefs.el ../lisp/paths.el \
                    174:        ../lisp/startup.elc ../lisp/lisp.elc \
                    175:        ../lisp/page.elc ../lisp/register.elc \
                    176:        ../lisp/paragraphs.elc ../lisp/lisp-mode.elc \
                    177:        ../lisp/text-mode.elc ../lisp/fill.elc \
                    178:        ../lisp/c-mode.elc ../lisp/isearch.elc \
                    179:        ../lisp/replace.elc ../lisp/abbrev.elc \
                    180:        ../lisp/buff-menu.elc ../lisp/subr.elc
                    181: 
                    182: /* just to be sure the sh is used */
                    183: SHELL=/bin/sh
                    184: 
                    185: /* Construct full set of libraries to be linked.  */
                    186: LIBES= $(LIBNET) $(LIBJOBS) $(LTERMCAP) $(LIBX) $(LIBBSD) $(LIBSTD) $(LIBG)
                    187: 
                    188: all: xemacs
                    189: 
                    190: xemacs: temacs ../etc/DOC ${lisp}
                    191: #ifdef CANNOT_DUMP
                    192:        mv temacs xemacs
                    193: #else
                    194:        ./temacs -batch -l inc-vers
                    195:        ./temacs -batch -l loadup.el dump
                    196: #endif /* not CANNOT_DUMP */
                    197: 
                    198: ../etc/DOC: ../etc/make-docfile ${obj} ${lisp} auxdoc.c
                    199:        ../etc/make-docfile auxdoc.c ${obj} ${lisp} ../lisp/version.el > ../etc/DOC
                    200: 
                    201: ../etc/make-docfile:
                    202:        cd ../etc; make ${MFLAGS} make-docfile
                    203: 
                    204: #if defined(sequent)   /* for parallel make */
                    205: PARALLEL=&
                    206: #endif /* sequent */
                    207: 
                    208: temacs: $(PARALLEL) $(LOCALCPP) $(SHORT) crt0.o ${obj} ${otherobj}
                    209:        ld ${STARTFLAGS} ${LDFLAGS} -o temacs crt0.o ${obj} ${otherobj} ${LIBES} ${ALIGNMENT}
                    210: 
                    211: /* These are needed for C compilation, on the systems that need them */
                    212: #ifdef NEED_CPP
                    213: CPP = ./localcpp
                    214: localcpp:
                    215:        cd ../cpp; make ${MFLAGS} EMACS=-DEMACS
                    216:        ln ../cpp/cpp localcpp  /* Name where CFLAGS will refer to it */
                    217: /* cc appears to be cretinous and require all of these to exist
                    218:    if -B is specified -- we can't use one local pass and let the
                    219:    others be the standard ones.  What a loser.
                    220:    We can't even use ln, since they are probably
                    221:    on different disks.  */
                    222:        cp /lib/ccom localccom
                    223:        -cp /lib/optim localoptim
                    224:        -cp /lib/c2 localc2
                    225:        cp /bin/as localas
                    226: #else /* not NEED_CPP */
                    227: CPP = /lib/cpp
                    228: #endif /* need NEED_CPP */
                    229: 
                    230: #ifdef SHORTNAMES
                    231: shortnames:
                    232:        cd ../shortnames; make ${MFLAGS}
                    233: #endif /* SHORTNAMES */
                    234: 
                    235: paths.h: paths.h.dist
                    236:        @sh -c "if test -r $@; then echo $? is newer than $@; exit 1;\
                    237:          else exit 0; fi"
                    238:        cp $? $@
                    239: 
                    240: config.h: config.h.dist
                    241:        @sh -c "if test -r $@; then echo $? is newer than $@; exit 1;\
                    242:          else exit 0; fi"
                    243:        cp $? $@
                    244: 
                    245: /* Some machines have alloca built-in.
                    246:    They may define HAVE_ALLOCA, or may just let alloca.s
                    247:    be used but generate no code.
                    248:    Some have it written in assembler in alloca.s.
                    249:    Some use the C version in alloca.c (these define C_ALLOCA in config.h).
                    250:    */
                    251: 
                    252: #ifdef C_ALLOCA
                    253: alloca.o : alloca.c
                    254: #else
                    255: alloca.o : alloca.s config.h
                    256:        $(CPP) -E alloca.s | \
                    257: /* remove any ^L, blank lines, and preprocessor comments,
                    258:    since some assemblers barf on them */
                    259:        sed -e 's///' -e 's/^#.*//' | \
                    260:        sed -n -e '/^..*$$/p' > alloca.t
                    261:        as -o alloca.o alloca.t
                    262:        rm alloca.t
                    263: #endif /* not C_ALLOCA */
                    264: 
                    265: /* Nearly all the following files depend on lisp.h,
                    266:    but it is not included as a dependency because
                    267:    it is so often changed in ways that do not require any recompilation
                    268:    and so rarely changed in ways that do require any.  */
                    269: 
                    270: abbrev.o : abbrev.c buffer.h commands.h config.h 
                    271: buffer.o : buffer.c syntax.h buffer.h commands.h window.h config.h 
                    272: callint.o : callint.c window.h commands.h buffer.h config.h 
                    273: callproc.o : callproc.c paths.h buffer.h commands.h config.h 
                    274: casefiddle.o : casefiddle.c syntax.h commands.h buffer.h config.h 
                    275: cm.o : cm.c cm.h termhooks.h config.h
                    276: cmds.o : cmds.c syntax.h buffer.h commands.h config.h 
                    277: crt0.o : crt0.c config.h
                    278: dired.o : dired.c commands.h buffer.h config.h 
                    279: dispnew.o : dispnew.c commands.h window.h buffer.h dispextern.h termchar.h termopts.h cm.h config.h
                    280: doc.o : doc.c config.h paths.h
                    281: doprnt.o : doprnt.c
                    282: editfns.o : editfns.c window.h buffer.h config.h 
                    283: emacs.o : emacs.c commands.h config.h 
                    284: fileio.o : fileio.c window.h buffer.h config.h 
                    285: filelock.o : filelock.c buffer.h paths.h config.h
                    286: filemode.o : filemode.c 
                    287: indent.o : indent.c window.h indent.h buffer.h config.h termchar.h termopts.h
                    288: insdel.o : insdel.c window.h buffer.h config.h 
                    289: keyboard.o : keyboard.c termchar.h termhooks.h termopts.h buffer.h commands.h window.h macros.h config.h 
                    290: keymap.o : keymap.c buffer.h commands.h config.h 
                    291: lastfile.o : lastfile.c 
                    292: macros.o : macros.c window.h buffer.h commands.h macros.h config.h
                    293: malloc.o : malloc.c config.h
                    294: marker.o : marker.c buffer.h config.h 
                    295: minibuf.o : minibuf.c syntax.h window.h buffer.h commands.h config.h 
                    296: mocklisp.o : mocklisp.c buffer.h config.h
                    297: process.o : process.c process.h buffer.h window.h termhooks.h config.h 
                    298: regex.o : regex.c syntax.h buffer.h config.h regex.h 
                    299: scroll.o : scroll.c termchar.h config.h dispextern.h
                    300: search.o : search.c regex.h commands.h buffer.h syntax.h config.h 
                    301: syntax.o : syntax.c syntax.h buffer.h commands.h config.h 
                    302: sysdep.o : sysdep.c config.h dispextern.h termhooks.h termchar.h termopts.h
                    303: term.o : term.c termchar.h termhooks.h termopts.h config.h cm.h
                    304: termcap.o : termcap.c
                    305: terminfo.o : terminfo.c config.h
                    306: tparam.o : tparam.c
                    307: undo.o : undo.c buffer.h commands.h undo.h config.h 
                    308: unexec.o : unexec.c config.h
                    309: window.o : window.c indent.h commands.h window.h buffer.h config.h termchar.h
                    310: xdisp.o : xdisp.c macros.h commands.h indent.h buffer.h dispextern.h termchar.h window.h config.h 
                    311: xfns.o : xfns.c window.h config.h
                    312: xterm.o : xterm.c xterm.h dispextern.h config.h
                    313: 
                    314: /* The files of Lisp proper */
                    315: 
                    316: alloc.o : alloc.c window.h buffer.h config.h 
                    317: bytecode.o : bytecode.c buffer.h config.h 
                    318: data.o : data.c buffer.h config.h 
                    319: eval.o : eval.c commands.h config.h
                    320: fns.o : fns.c commands.h config.h
                    321: print.o : print.c process.h window.h buffer.h config.h 
                    322: lread.o : lread.c buffer.h paths.h config.h 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.