|
|
1.1 root 1: # Makefile 7.8 83/07/09
2: VERSION=3.7
3: #
4: # Ex skeletal makefile for VAX VM/Unix 4.2BSD
5: #
6: # NB: This makefile doesn't indicate any dependencies on header files.
7: #
8: # Ex is very large - this version will not fit on PDP-11's without overlay
9: # software. Things that can be turned off to save
10: # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
11: # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
12: # chdir command.) CRYPT includes the code to edit encrypted files (the -x
13: # option, like ed.) VMUNIX makes ex considerably larger, raising many limits
14: # and improving speed and simplicity of maintenance. It is suitable only
15: # for a VAX or other large machine, and then probably only in a paged system.
16: #
17: # Don't define VFORK unless your system has the VFORK system call,
18: # which is like fork but the two processes have only one data space until the
19: # child execs. This speeds up ex by saving the memory copy.
20: #
21: # If your system expands tabs to 4 spaces you should -DTABS=4 below
22: #
23: BINDIR= /usr/ucb
24: NBINDIR=/usr/new
25: LIBDIR= /usr/lib
26: FOLD= ${BINDIR}/fold
27: CTAGS= ${BINDIR}/ctags
28: XSTR= ${BINDIR}/xstr
29: DEBUGFLAGS= -DTRACE -g
30: NONDEBUGFLAGS= -O
31: DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug
32: OPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX -DSTDIO
33: CFLAGS= -DTABS=8 ${OPTIONS} ${DEB}
34: LDFLAGS= -z # or -i or -n
35: TERMLIB= -ltermcap
36: MKSTR= ${BINDIR}/mkstr
37: CXREF= ${BINDIR}/cxref
38: INCLUDE=/usr/include
39: PR= pr
40: OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \
41: ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \
42: ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_unix.o \
43: ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
44: ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
45: printf.o bcopy.o strings.o
46: HDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
47: SRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c
48: SRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c
49: SRC3= ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c
50: SRC4= ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c
51: SRC5= ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c
52: SRC6= printf.c bcopy.c expreserve.c exrecover.c
53: MISC= makefile READ_ME rofix
54: VGRIND= csh /usr/ucb/vgrind
55: VHDR= "Ex Version ${VERSION}"
56:
57: .c.o:
58: # ifdef VMUNIX
59: ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
60: # else
61: # ${MKSTR} - ex${VERSION}strings x $*.c
62: # ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
63: # rm -f x$*.c
64: # endif
65: ${CC} ${CFLAGS} -c x.c
66: mv x.o $*.o
67:
68: all: a.out exrecover expreserve
69:
70: a.out: ${OBJS}
71: @echo loading a.out
72: @${CC} ${LDFLAGS} ${OBJS} ${TERMLIB}
73:
74: tags: /tmp
75: ${CTAGS} -w ex.[hc] ex_*.[hc]
76:
77: ${OBJS}: ${HDRS}
78:
79: # ex_vars.h:
80: # csh makeoptions ${CFLAGS}
81:
82: bcopy.o: bcopy.c
83: ${CC} -c ${CFLAGS} bcopy.c
84:
85: # xstr: hands off!
86: strings.o: strings
87: ${XSTR}
88: ${CC} -c -S xs.c
89: ed - <rofix xs.s
90: ${AS} -o strings.o xs.s
91: rm xs.s
92:
93: exrecover: exrecover.o
94: ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover
95:
96: exrecover.o: exrecover.c
97: ${CC} ${CFLAGS} -c -O exrecover.c
98:
99: expreserve: expreserve.o
100: ${CC} expreserve.o -o expreserve
101:
102: expreserve.o:
103: ${CC} ${CFLAGS} -c -O expreserve.c
104:
105: clean:
106: # If we dont have ex we cant make it so don't rm ex_vars.h
107: -rm -f a.out exrecover expreserve strings core errs trace
108: -rm -f *.o x*.[cs]
109:
110: # install a new version for testing in /usr/new
111: ninstall: a.out
112: -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view
113: cp a.out ${DESTDIR}${NBINDIR}/ex
114: # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
115: ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi
116: ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view
117: chmod 1755 ${DESTDIR}${NBINDIR}/ex
118:
119: # install in standard place (/usr/ucb)
120: install: a.out exrecover expreserve
121: -rm -f ${DESTDIR}/${BINDIR}/ex
122: -rm -f ${DESTDIR}/${BINDIR}/vi
123: -rm -f ${DESTDIR}/${BINDIR}/view
124: -rm -f ${DESTDIR}/${BINDIR}/edit
125: -rm -f ${DESTDIR}/${BINDIR}/e
126: -rm -f ${DESTDIR}/usr/bin/ex
127: install -s -m 1755 a.out ${DESTDIR}/${BINDIR}/ex
128: # cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
129: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
130: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
131: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
132: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/view
133: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
134: chmod 1755 ${DESTDIR}/${BINDIR}/ex
135: install -m 4755 exrecover ${DESTDIR}/${LIBDIR}/ex${VERSION}recover
136: install -m 4755 expreserve ${DESTDIR}/${LIBDIR}/ex${VERSION}preserve
137: # The following line normally fails. This is OK.
138: -mkdir ${DESTDIR}/usr/preserve
139:
140: # move from /usr/new to /usr/ucb
141: newucb: a.out
142: -rm -f ${DESTDIR}/${BINDIR}/ex
143: -rm -f ${DESTDIR}/${BINDIR}/vi
144: -rm -f ${DESTDIR}/${BINDIR}/edit
145: -rm -f ${DESTDIR}/${BINDIR}/e
146: -rm -f ${DESTDIR}/usr/bin/ex
147: mv ${DESTDIR}/${NBINDIR}/ex ${DESTDIR}/${NBINDIR}/ex
148: -rm -f ${DESTDIR}/${NBINDIR}/vi
149: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
150: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
151: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
152: ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
153: chmod 1755 ${DESTDIR}/${BINDIR}/ex
154:
155: lint:
156: lint ${CFLAGS} ex.c ex_?*.c
157: lint ${CFLAGS} -u exrecover.c
158: lint ${CFLAGS} expreserve.c
159:
160: print:
161: @${PR} READ* BUGS
162: @${PR} makefile*
163: @${PR} /etc/termcap
164: @(size -l a.out ; size *.o) | ${PR} -h sizes
165: @${PR} -h errno.h ${INCLUDE}/errno.h
166: @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
167: @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
168: @${PR} -h signal.h ${INCLUDE}/signal.h
169: @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
170: @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
171: @ls -ls | ${PR}
172: @${CXREF} *.c | ${PR} -h XREF
173: @${PR} *.h *.c
174: vgrind:
175: tee index < /dev/null
176: ${VGRIND} -h ${VHDR} ${HDRS}
177: ${VGRIND} -h ${VHDR} ${SRC1}
178: ${VGRIND} -h ${VHDR} ${SRC2}
179: ${VGRIND} -h ${VHDR} ${SRC3}
180: ${VGRIND} -h ${VHDR} ${SRC4}
181: ${VGRIND} -h ${VHDR} ${SRC5}
182: ${VGRIND} -h ${VHDR} ${SRC6}
183: ${VGRIND} -n -h ${VHDR} ${MISC}
184: ${VGRIND} -i -h ${VHDR} index
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.