|
|
1.1 root 1: VERSION=3.7
2: #
3: # Ex skeletal makefile for USG Unix 4.0 on a VAX.
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/ucb/new
24: LIBDIR= /usr/lib
25: FOLD= ${BINDIR}/fold
26: CTAGS= ctags
27: XSTR= /usr/ucb/bin/xstr
28: DEBUGFLAGS= -DTRACE -g
29: NONDEBUGFLAGS= -O
30: DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug
31: OPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DUSG3TTY -DSTDIO
32: CFLAGS= -I/usr/ucb/include -DTABS=8 ${OPTIONS} ${DEB}
33: LDFLAGS= -n # or -i or -z
34: TERMLIB= -ltermcap
35: MKSTR= /usr/ucb/bin/mkstr
36: CXREF= 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 strings.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/ucb/vgrind
54: VHDR= "Ex Version ${VERSION}"
55:
56: .c.o:
57: # ifdef VMUNIX
58: # ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
59: # else
60: ${MKSTR} - ex${VERSION}strings x $*.c
61: ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
62: rm -f x$*.c
63: # endif
64: ${CC} ${CFLAGS} -c x.c
65: mv x.o $*.o
66:
67: a.out: ${OBJS}
68: ${CC} ${LDFLAGS} ${OBJS} ${TERMLIB}
69:
70: all:: a.out exrecover expreserve
71:
72: tags: /tmp
73: ${CTAGS} -w ex.[hc] ex_*.[hc]
74:
75: ${OBJS}: ex_vars.h
76:
77: # ex_vars.h:
78: # csh makeoptions ${CFLAGS}
79:
80: bcopy.o: bcopy.c
81: ${CC} -c ${CFLAGS} bcopy.c
82:
83: # xstr: hands off!
84: strings.o: strings
85: ${XSTR}
86: ${CC} -c -S xs.c
87: ed - <rofix xs.s
88: ${AS} -o strings.o xs.s
89: rm xs.s
90:
91: exrecover: exrecover.o
92: ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover
93:
94: exrecover.o: exrecover.c
95: ${CC} ${CFLAGS} -c -O exrecover.c
96:
97: expreserve: expreserve.o
98: ${CC} expreserve.o ex_extern.o -o expreserve
99:
100: expreserve.o:
101: ${CC} ${CFLAGS} -c -O expreserve.c
102:
103: clean:
104: # If we dont have ex we cant make it so dont rm ex_vars.h
105: -rm -f a.out exrecover expreserve strings core errs trace
106: -rm -f *.o x*.[cs]
107:
108: # install a new version for testing in /usr/new
109: ninstall: a.out
110: -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view
111: cp a.out ${DESTDIR}${NBINDIR}/ex
112: # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
113: ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi
114: ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view
115: chmod 1755 ${DESTDIR}${NBINDIR}/ex
116:
117: # install in standard place (/usr/ucb)
118: install: a.out exrecover expreserve
119: -strip a.out
120: -rm -f ${DESTDIR}${BINDIR}/ex
121: -rm -f ${DESTDIR}${BINDIR}/vi
122: -rm -f ${DESTDIR}${BINDIR}/view
123: -rm -f ${DESTDIR}${BINDIR}/edit
124: cp a.out ${DESTDIR}${BINDIR}/ex
125: cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
126: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit
127: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi
128: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view
129: chmod 1755 ${DESTDIR}${BINDIR}/ex
130: cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover
131: cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve
132: chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve
133: # The following line normally fails. This is OK.
134: -mkdir ${DESTDIR}/usr/preserve
135:
136: # move from /usr/new to /usr/ucb
137: newucb: a.out
138: -rm -f ${DESTDIR}${BINDIR}/ex
139: -rm -f ${DESTDIR}${BINDIR}/vi
140: -rm -f ${DESTDIR}${BINDIR}/edit
141: -rm -f ${DESTDIR}${BINDIR}/e
142: -rm -f ${DESTDIR}/usr/bin/ex
143: mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex
144: -rm -f ${DESTDIR}${NBINDIR}/vi
145: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit
146: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e
147: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi
148: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex
149: chmod 1755 ${DESTDIR}${BINDIR}/ex
150:
151: lint:
152: lint ${CFLAGS} ex.c ex_?*.c
153: lint ${CFLAGS} -u exrecover.c
154: lint ${CFLAGS} expreserve.c
155:
156: print:
157: @${PR} READ* BUGS
158: @${PR} makefile*
159: @${PR} /etc/termcap
160: @(size -l a.out ; size *.o) | ${PR} -h sizes
161: @${PR} -h errno.h ${INCLUDE}/errno.h
162: @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
163: @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
164: @${PR} -h signal.h ${INCLUDE}/signal.h
165: @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
166: @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
167: @ls -ls | ${PR}
168: @${CXREF} *.c | ${PR} -h XREF
169: @${PR} *.h *.c
170: vgrind:
171: tee index < /dev/null
172: ${VGRIND} -h ${VHDR} ${HDRS}
173: ${VGRIND} -h ${VHDR} ${SRC1}
174: ${VGRIND} -h ${VHDR} ${SRC2}
175: ${VGRIND} -h ${VHDR} ${SRC3}
176: ${VGRIND} -h ${VHDR} ${SRC4}
177: ${VGRIND} -h ${VHDR} ${SRC5}
178: ${VGRIND} -h ${VHDR} ${SRC6}
179: ${VGRIND} -n -h ${VHDR} ${MISC}
180: ${VGRIND} -i -h ${VHDR} index
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.