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