Commit | Line | Data |
---|---|---|
d266c416 | 1 | VERSION=3.4 |
fe10330d | 2 | # |
7c4625ef | 3 | # Ex skeletal makefile for VAX VM/Unix version 7 |
fe10330d MH |
4 | # |
5 | # NB: This makefile doesn't indicate any dependencies on header files. | |
6 | # | |
7c4625ef MH |
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 | |
44232d5b MH |
9 | # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL |
10 | # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented | |
7c4625ef MH |
11 | # chdir command.) VMUNIX makes ex considerably larger, raising many limits |
12 | # and improving speed and simplicity of maintenance. It is suitable only | |
13 | # for a VAX or other large machine, and then probably only in a paged system. | |
44232d5b MH |
14 | # |
15 | # Don't define VFORK unless your system has the VFORK system call, | |
16 | # which is like fork but the two processes have only one data space until the | |
17 | # child execs. This speeds up ex by saving the memory copy. | |
fe10330d MH |
18 | # |
19 | # If your system expands tabs to 4 spaces you should -DTABS=4 below | |
20 | # | |
44232d5b MH |
21 | BINDIR= /usr/ucb |
22 | NBINDIR=/usr/new | |
fe10330d | 23 | LIBDIR= /usr/lib |
44232d5b MH |
24 | FOLD= ${BINDIR}/fold |
25 | CTAGS= ${BINDIR}/ctags | |
26 | XSTR= ${BINDIR}/xstr | |
7c4625ef MH |
27 | DEBUGFLAGS= -DTRACE -g |
28 | # | |
29 | # D O N O T D I S T R I B U T E E X W I T H H O R S E I N I T!!! | |
30 | NONDEBUGFLAGS= -O -DHORSE | |
31 | DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug | |
32 | CFLAGS= -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX ${DEB} | |
33 | LDFLAGS= -z # or -i or -n | |
44232d5b MH |
34 | TERMLIB= -ltermlib |
35 | MKSTR= ${BINDIR}/mkstr | |
36 | CXREF= ${BINDIR}/cxref | |
fe10330d MH |
37 | INCLUDE=/usr/include |
38 | PR= pr | |
7c4625ef MH |
39 | OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \ |
40 | ex_data.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 \ | |
fe10330d MH |
42 | ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \ |
43 | ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ | |
7c4625ef MH |
44 | printf.o bcopy.o horse.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_voperate.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}" | |
44232d5b MH |
55 | |
56 | .c.o: | |
57 | # ${MKSTR} - ex${VERSION}strings x $*.c | |
58 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
59 | # rm -f x$*.c | |
60 | ${CC} ${CFLAGS} -c x.c | |
61 | mv x.o $*.o | |
fe10330d | 62 | |
44232d5b | 63 | a.out: ${OBJS} |
7c4625ef | 64 | cc ${LDFLAGS} ${OBJS} ${TERMLIB} |
fe10330d | 65 | |
7c4625ef MH |
66 | all: a.out exrecover expreserve tags |
67 | ||
68 | tags: /tmp | |
69 | ${CTAGS} -w ex.[hc] ex_*.[hc] | |
44232d5b MH |
70 | |
71 | ${OBJS}: ex_vars.h | |
72 | ||
73 | ex_vars.h: | |
74 | csh makeoptions ${CFLAGS} | |
fe10330d | 75 | |
7c4625ef MH |
76 | bcopy.o: bcopy.c |
77 | cc -c ${CFLAGS} bcopy.c | |
78 | ||
79 | # xstr: hands off! | |
fe10330d MH |
80 | strings.o: strings |
81 | ${XSTR} | |
44232d5b MH |
82 | ${CC} -c -S xs.c |
83 | ed - <:rofix xs.s | |
84 | as -o strings.o xs.s | |
85 | rm xs.s | |
fe10330d MH |
86 | |
87 | exrecover: exrecover.o | |
44232d5b | 88 | ${CC} ${CFLAGS} exrecover.o -o exrecover |
fe10330d | 89 | |
44232d5b | 90 | exrecover.o: exrecover.c |
fe10330d MH |
91 | ${CC} ${CFLAGS} -c -O exrecover.c |
92 | ||
44232d5b MH |
93 | expreserve: expreserve.o |
94 | ${CC} expreserve.o -o expreserve | |
fe10330d MH |
95 | |
96 | expreserve.o: | |
44232d5b | 97 | ${CC} ${CFLAGS} -c -O expreserve.c |
fe10330d MH |
98 | |
99 | clean: | |
44232d5b | 100 | # If we dont have ex we cant make it so dont rm ex_vars.h |
7c4625ef | 101 | -rm -f a.out exrecover expreserve strings core errs trace |
44232d5b | 102 | -rm -f *.o x*.[cs] |
fe10330d | 103 | |
7c4625ef | 104 | # install a new version for testing in /usr/new |
44232d5b | 105 | ninstall: a.out |
7c4625ef MH |
106 | -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view |
107 | cp a.out ${DESTDIR}${NBINDIR}/ex | |
44232d5b | 108 | # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings |
7c4625ef | 109 | ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi |
d266c416 | 110 | ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view |
7c4625ef | 111 | chmod 1755 ${DESTDIR}${NBINDIR}/ex |
fe10330d | 112 | |
7c4625ef | 113 | # install in standard place (/usr/ucb) |
44232d5b MH |
114 | install: a.out exrecover expreserve |
115 | -rm -f ${DESTDIR}${BINDIR}/ex | |
116 | -rm -f ${DESTDIR}${BINDIR}/vi | |
d266c416 | 117 | -rm -f ${DESTDIR}${BINDIR}/view |
44232d5b MH |
118 | -rm -f ${DESTDIR}${BINDIR}/edit |
119 | -rm -f ${DESTDIR}${BINDIR}/e | |
120 | -rm -f ${DESTDIR}/usr/bin/ex | |
121 | cp a.out ${DESTDIR}${BINDIR}/ex | |
122 | # cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings | |
123 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit | |
124 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e | |
125 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi | |
d266c416 | 126 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view |
44232d5b MH |
127 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex |
128 | chmod 1755 ${DESTDIR}${BINDIR}/ex | |
129 | cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover | |
7c4625ef | 130 | cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve |
44232d5b | 131 | chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve |
7c4625ef | 132 | # The following line normally fails. This is OK. |
44232d5b | 133 | mkdir ${DESTDIR}/usr/preserve |
fe10330d | 134 | |
7c4625ef MH |
135 | # move from /usr/new to /usr/ucb |
136 | newucb: a.out | |
137 | -rm -f ${DESTDIR}${BINDIR}/ex | |
138 | -rm -f ${DESTDIR}${BINDIR}/vi | |
139 | -rm -f ${DESTDIR}${BINDIR}/edit | |
140 | -rm -f ${DESTDIR}${BINDIR}/e | |
141 | -rm -f ${DESTDIR}/usr/bin/ex | |
142 | mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex | |
143 | -rm -f ${DESTDIR}${NBINDIR}/vi | |
144 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit | |
145 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e | |
146 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi | |
147 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex | |
148 | chmod 1755 ${DESTDIR}${BINDIR}/ex | |
149 | ||
fe10330d | 150 | lint: |
7c4625ef MH |
151 | lint ${CFLAGS} ex.c ex_?*.c |
152 | lint ${CFLAGS} -u exrecover.c | |
153 | lint ${CFLAGS} expreserve.c | |
fe10330d MH |
154 | |
155 | print: | |
fe10330d | 156 | @${PR} READ* BUGS |
44232d5b MH |
157 | @${PR} makefile* |
158 | @${PR} /etc/termcap | |
fe10330d | 159 | @(size -l a.out ; size *.o) | ${PR} -h sizes |
fe10330d | 160 | @${PR} -h errno.h ${INCLUDE}/errno.h |
fe10330d MH |
161 | @${PR} -h setjmp.h ${INCLUDE}/setjmp.h |
162 | @${PR} -h sgtty.h ${INCLUDE}/sgtty.h | |
163 | @${PR} -h signal.h ${INCLUDE}/signal.h | |
fe10330d MH |
164 | @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h |
165 | @${PR} -h sys/types.h ${INCLUDE}/sys/types.h | |
166 | @ls -ls | ${PR} | |
167 | @${CXREF} *.c | ${PR} -h XREF | |
168 | @${PR} *.h *.c | |
7c4625ef MH |
169 | vgrind: |
170 | tee index < /dev/null | |
171 | # ${VGRIND} -h ${VHDR} ${HDRS} | |
172 | # ${VGRIND} -h ${VHDR} ${SRC1} | |
173 | # ${VGRIND} -h ${VHDR} ${SRC2} | |
174 | ${VGRIND} -h ${VHDR} ${SRC3} | |
175 | ${VGRIND} -h ${VHDR} ${SRC4} | |
176 | ${VGRIND} -h ${VHDR} ${SRC5} | |
177 | ${VGRIND} -h ${VHDR} ${SRC6} | |
178 | # ${VGRIND} -n -h ${VHDR} ${MISC} | |
179 | ${VGRIND} -i -h ${VHDR} index | |
3068bcc1 | 180 | |
15951b22 MH |
181 | ex.c: SCCS/s.ex.c ${HDRS}; rm -f ex.c; sccs get ex.c |
182 | ex.h: SCCS/s.ex.h; rm -f ex.h; sccs get ex.h | |
183 | ex_addr.c: SCCS/s.ex_addr.c; rm -f ex_addr.c; sccs get ex_addr.c | |
184 | ex_argv.h: SCCS/s.ex_argv.h; rm -f ex_argv.h; sccs get ex_argv.h | |
185 | ex_cmds.c: SCCS/s.ex_cmds.c; rm -f ex_cmds.c; sccs get ex_cmds.c | |
186 | ex_cmds2.c: SCCS/s.ex_cmds2.c; rm -f ex_cmds2.c; sccs get ex_cmds2.c | |
187 | ex_cmdsub.c: SCCS/s.ex_cmdsub.c; rm -f ex_cmdsub.c; sccs get ex_cmdsub.c | |
188 | ex_data.c: SCCS/s.ex_data.c; rm -f ex_data.c; sccs get ex_data.c | |
189 | ex_get.c: SCCS/s.ex_get.c; rm -f ex_get.c; sccs get ex_get.c | |
190 | ex_io.c: SCCS/s.ex_io.c; rm -f ex_io.c; sccs get ex_io.c | |
191 | ex_put.c: SCCS/s.ex_put.c; rm -f ex_put.c; sccs get ex_put.c | |
192 | ex_re.c: SCCS/s.ex_re.c; rm -f ex_re.c; sccs get ex_re.c | |
193 | ex_re.h: SCCS/s.ex_re.h; rm -f ex_re.h; sccs get ex_re.h | |
194 | ex_set.c: SCCS/s.ex_set.c; rm -f ex_set.c; sccs get ex_set.c | |
195 | ex_subr.c: SCCS/s.ex_subr.c; rm -f ex_subr.c; sccs get ex_subr.c | |
196 | ex_temp.c: SCCS/s.ex_temp.c; rm -f ex_temp.c; sccs get ex_temp.c | |
197 | ex_temp.h: SCCS/s.ex_temp.h; rm -f ex_temp.h; sccs get ex_temp.h | |
198 | ex_tty.c: SCCS/s.ex_tty.c; rm -f ex_tty.c; sccs get ex_tty.c | |
199 | ex_tty.h: SCCS/s.ex_tty.h; rm -f ex_tty.h; sccs get ex_tty.h | |
200 | ex_tune.h: SCCS/s.ex_tune.h; rm -f ex_tune.h; sccs get ex_tune.h | |
3068bcc1 | 201 | ex_unix.c: SCCS/s.ex_unix.c; rm -f ex_unix.c; sccs get ex_unix.c |
15951b22 MH |
202 | ex_v.c: SCCS/s.ex_v.c; rm -f ex_v.c; sccs get ex_v.c |
203 | ex_vadj.c: SCCS/s.ex_vadj.c; rm -f ex_vadj.c; sccs get ex_vadj.c | |
204 | ex_vars.h: SCCS/s.ex_vars.h; rm -f ex_vars.h; sccs get ex_vars.h | |
205 | ex_vget.c: SCCS/s.ex_vget.c; rm -f ex_vget.c; sccs get ex_vget.c | |
206 | ex_vis.h: SCCS/s.ex_vis.h; rm -f ex_vis.h; sccs get ex_vis.h | |
207 | ex_vmain.c: SCCS/s.ex_vmain.c; rm -f ex_vmain.c; sccs get ex_vmain.c | |
3068bcc1 | 208 | ex_voperate.c: SCCS/s.ex_voperate.c; rm -f ex_voperate.c; sccs get ex_voperate.c |
15951b22 MH |
209 | ex_vops.c: SCCS/s.ex_vops.c; rm -f ex_vops.c; sccs get ex_vops.c |
210 | ex_vops2.c: SCCS/s.ex_vops2.c; rm -f ex_vops2.c; sccs get ex_vops2.c | |
211 | ex_vops3.c: SCCS/s.ex_vops3.c; rm -f ex_vops3.c; sccs get ex_vops3.c | |
212 | ex_vput.c: SCCS/s.ex_vput.c; rm -f ex_vput.c; sccs get ex_vput.c | |
213 | ex_vwind.c: SCCS/s.ex_vwind.c; rm -f ex_vwind.c; sccs get ex_vwind.c | |
214 | expreserve.c: SCCS/s.expreserve.c; rm -f expreserve.c; sccs get expreserve.c | |
215 | exrecover.c: SCCS/s.exrecover.c; rm -f exrecover.c; sccs get exrecover.c | |
216 | makeoptions: SCCS/s.makeoptions; rm -f makeoptions; sccs get makeoptions | |
3068bcc1 | 217 | bcopy.c: SCCS/s.bcopy.c; rm -f bcopy.c; sccs get bcopy.c |
15951b22 MH |
218 | horse.c: SCCS/s.horse.c; rm -f horse.c; sccs get horse.c |
219 | printf.c: SCCS/s.printf.c; rm -f printf.c; sccs get printf.c |