Commit | Line | Data |
---|---|---|
b41bbcb5 | 1 | VERSION=3.5 |
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 | |
b41bbcb5 MH |
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 | |
7c4625ef MH |
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. | |
44232d5b MH |
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. | |
fe10330d MH |
19 | # |
20 | # If your system expands tabs to 4 spaces you should -DTABS=4 below | |
21 | # | |
44232d5b MH |
22 | BINDIR= /usr/ucb |
23 | NBINDIR=/usr/new | |
fe10330d | 24 | LIBDIR= /usr/lib |
44232d5b MH |
25 | FOLD= ${BINDIR}/fold |
26 | CTAGS= ${BINDIR}/ctags | |
27 | XSTR= ${BINDIR}/xstr | |
7c4625ef | 28 | DEBUGFLAGS= -DTRACE -g |
7cc1f963 | 29 | NONDEBUGFLAGS= -O |
7c4625ef | 30 | DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug |
7cc1f963 | 31 | CFLAGS= -DTABS=8 -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX ${DEB} |
7c4625ef | 32 | LDFLAGS= -z # or -i or -n |
44232d5b MH |
33 | TERMLIB= -ltermlib |
34 | MKSTR= ${BINDIR}/mkstr | |
35 | CXREF= ${BINDIR}/cxref | |
fe10330d MH |
36 | INCLUDE=/usr/include |
37 | PR= pr | |
7c4625ef MH |
38 | OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \ |
39 | ex_data.o ex_get.o ex_io.o ex_put.o ex_re.o \ | |
40 | ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_unix.o \ | |
fe10330d MH |
41 | ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \ |
42 | ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ | |
7cc1f963 | 43 | printf.o bcopy.o strings.o |
7c4625ef MH |
44 | HDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h |
45 | SRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c | |
46 | SRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c | |
47 | SRC3= ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c | |
48 | SRC4= ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voperate.c | |
49 | SRC5= ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c | |
7cc1f963 | 50 | SRC6= printf.c bcopy.c expreserve.c exrecover.c |
7c4625ef MH |
51 | MISC= makefile READ_ME :rofix |
52 | VGRIND= csh /usr/ucb/vgrind | |
53 | VHDR= "Ex Version ${VERSION}" | |
44232d5b MH |
54 | |
55 | .c.o: | |
56 | # ${MKSTR} - ex${VERSION}strings x $*.c | |
57 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
58 | # rm -f x$*.c | |
59 | ${CC} ${CFLAGS} -c x.c | |
60 | mv x.o $*.o | |
fe10330d | 61 | |
44232d5b | 62 | a.out: ${OBJS} |
8bcf1431 | 63 | ${CC} ${LDFLAGS} ${OBJS} ${TERMLIB} |
fe10330d | 64 | |
7c4625ef MH |
65 | all: a.out exrecover expreserve tags |
66 | ||
67 | tags: /tmp | |
68 | ${CTAGS} -w ex.[hc] ex_*.[hc] | |
44232d5b MH |
69 | |
70 | ${OBJS}: ex_vars.h | |
71 | ||
c641812b MH |
72 | # ex_vars.h: |
73 | # csh makeoptions ${CFLAGS} | |
fe10330d | 74 | |
7c4625ef | 75 | bcopy.o: bcopy.c |
8bcf1431 | 76 | ${CC} -c ${CFLAGS} bcopy.c |
7c4625ef MH |
77 | |
78 | # xstr: hands off! | |
fe10330d MH |
79 | strings.o: strings |
80 | ${XSTR} | |
44232d5b MH |
81 | ${CC} -c -S xs.c |
82 | ed - <:rofix xs.s | |
8bcf1431 | 83 | ${AS} -o strings.o xs.s |
44232d5b | 84 | rm xs.s |
fe10330d MH |
85 | |
86 | exrecover: exrecover.o | |
44232d5b | 87 | ${CC} ${CFLAGS} exrecover.o -o exrecover |
fe10330d | 88 | |
44232d5b | 89 | exrecover.o: exrecover.c |
fe10330d MH |
90 | ${CC} ${CFLAGS} -c -O exrecover.c |
91 | ||
44232d5b MH |
92 | expreserve: expreserve.o |
93 | ${CC} expreserve.o -o expreserve | |
fe10330d MH |
94 | |
95 | expreserve.o: | |
44232d5b | 96 | ${CC} ${CFLAGS} -c -O expreserve.c |
fe10330d | 97 | |
8bcf1431 | 98 | clean: |
44232d5b | 99 | # If we dont have ex we cant make it so dont rm ex_vars.h |
7c4625ef | 100 | -rm -f a.out exrecover expreserve strings core errs trace |
44232d5b | 101 | -rm -f *.o x*.[cs] |
fe10330d | 102 | |
7c4625ef | 103 | # install a new version for testing in /usr/new |
44232d5b | 104 | ninstall: a.out |
7c4625ef MH |
105 | -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view |
106 | cp a.out ${DESTDIR}${NBINDIR}/ex | |
44232d5b | 107 | # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings |
7c4625ef | 108 | ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi |
d266c416 | 109 | ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view |
7c4625ef | 110 | chmod 1755 ${DESTDIR}${NBINDIR}/ex |
fe10330d | 111 | |
7c4625ef | 112 | # install in standard place (/usr/ucb) |
44232d5b MH |
113 | install: a.out exrecover expreserve |
114 | -rm -f ${DESTDIR}${BINDIR}/ex | |
115 | -rm -f ${DESTDIR}${BINDIR}/vi | |
d266c416 | 116 | -rm -f ${DESTDIR}${BINDIR}/view |
44232d5b MH |
117 | -rm -f ${DESTDIR}${BINDIR}/edit |
118 | -rm -f ${DESTDIR}${BINDIR}/e | |
119 | -rm -f ${DESTDIR}/usr/bin/ex | |
120 | cp a.out ${DESTDIR}${BINDIR}/ex | |
121 | # cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings | |
122 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit | |
123 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e | |
124 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi | |
d266c416 | 125 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view |
44232d5b MH |
126 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex |
127 | chmod 1755 ${DESTDIR}${BINDIR}/ex | |
128 | cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover | |
7c4625ef | 129 | cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve |
44232d5b | 130 | chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve |
7c4625ef | 131 | # The following line normally fails. This is OK. |
44232d5b | 132 | mkdir ${DESTDIR}/usr/preserve |
fe10330d | 133 | |
7c4625ef MH |
134 | # move from /usr/new to /usr/ucb |
135 | newucb: a.out | |
136 | -rm -f ${DESTDIR}${BINDIR}/ex | |
137 | -rm -f ${DESTDIR}${BINDIR}/vi | |
138 | -rm -f ${DESTDIR}${BINDIR}/edit | |
139 | -rm -f ${DESTDIR}${BINDIR}/e | |
140 | -rm -f ${DESTDIR}/usr/bin/ex | |
141 | mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex | |
142 | -rm -f ${DESTDIR}${NBINDIR}/vi | |
143 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit | |
144 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e | |
145 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi | |
146 | ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex | |
147 | chmod 1755 ${DESTDIR}${BINDIR}/ex | |
148 | ||
fe10330d | 149 | lint: |
7c4625ef MH |
150 | lint ${CFLAGS} ex.c ex_?*.c |
151 | lint ${CFLAGS} -u exrecover.c | |
152 | lint ${CFLAGS} expreserve.c | |
fe10330d MH |
153 | |
154 | print: | |
fe10330d | 155 | @${PR} READ* BUGS |
44232d5b MH |
156 | @${PR} makefile* |
157 | @${PR} /etc/termcap | |
fe10330d | 158 | @(size -l a.out ; size *.o) | ${PR} -h sizes |
fe10330d | 159 | @${PR} -h errno.h ${INCLUDE}/errno.h |
fe10330d MH |
160 | @${PR} -h setjmp.h ${INCLUDE}/setjmp.h |
161 | @${PR} -h sgtty.h ${INCLUDE}/sgtty.h | |
162 | @${PR} -h signal.h ${INCLUDE}/signal.h | |
fe10330d MH |
163 | @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h |
164 | @${PR} -h sys/types.h ${INCLUDE}/sys/types.h | |
165 | @ls -ls | ${PR} | |
166 | @${CXREF} *.c | ${PR} -h XREF | |
167 | @${PR} *.h *.c | |
7c4625ef MH |
168 | vgrind: |
169 | tee index < /dev/null | |
5838215a MH |
170 | ${VGRIND} -h ${VHDR} ${HDRS} |
171 | ${VGRIND} -h ${VHDR} ${SRC1} | |
172 | ${VGRIND} -h ${VHDR} ${SRC2} | |
7c4625ef MH |
173 | ${VGRIND} -h ${VHDR} ${SRC3} |
174 | ${VGRIND} -h ${VHDR} ${SRC4} | |
175 | ${VGRIND} -h ${VHDR} ${SRC5} | |
176 | ${VGRIND} -h ${VHDR} ${SRC6} | |
5838215a | 177 | ${VGRIND} -n -h ${VHDR} ${MISC} |
7c4625ef | 178 | ${VGRIND} -i -h ${VHDR} index |
3068bcc1 | 179 | |
15951b22 MH |
180 | ex.c: SCCS/s.ex.c ${HDRS}; rm -f ex.c; sccs get ex.c |
181 | ex.h: SCCS/s.ex.h; rm -f ex.h; sccs get ex.h | |
182 | ex_addr.c: SCCS/s.ex_addr.c; rm -f ex_addr.c; sccs get ex_addr.c | |
183 | ex_argv.h: SCCS/s.ex_argv.h; rm -f ex_argv.h; sccs get ex_argv.h | |
184 | ex_cmds.c: SCCS/s.ex_cmds.c; rm -f ex_cmds.c; sccs get ex_cmds.c | |
185 | ex_cmds2.c: SCCS/s.ex_cmds2.c; rm -f ex_cmds2.c; sccs get ex_cmds2.c | |
186 | ex_cmdsub.c: SCCS/s.ex_cmdsub.c; rm -f ex_cmdsub.c; sccs get ex_cmdsub.c | |
187 | ex_data.c: SCCS/s.ex_data.c; rm -f ex_data.c; sccs get ex_data.c | |
188 | ex_get.c: SCCS/s.ex_get.c; rm -f ex_get.c; sccs get ex_get.c | |
189 | ex_io.c: SCCS/s.ex_io.c; rm -f ex_io.c; sccs get ex_io.c | |
190 | ex_put.c: SCCS/s.ex_put.c; rm -f ex_put.c; sccs get ex_put.c | |
191 | ex_re.c: SCCS/s.ex_re.c; rm -f ex_re.c; sccs get ex_re.c | |
192 | ex_re.h: SCCS/s.ex_re.h; rm -f ex_re.h; sccs get ex_re.h | |
193 | ex_set.c: SCCS/s.ex_set.c; rm -f ex_set.c; sccs get ex_set.c | |
194 | ex_subr.c: SCCS/s.ex_subr.c; rm -f ex_subr.c; sccs get ex_subr.c | |
195 | ex_temp.c: SCCS/s.ex_temp.c; rm -f ex_temp.c; sccs get ex_temp.c | |
196 | ex_temp.h: SCCS/s.ex_temp.h; rm -f ex_temp.h; sccs get ex_temp.h | |
197 | ex_tty.c: SCCS/s.ex_tty.c; rm -f ex_tty.c; sccs get ex_tty.c | |
198 | ex_tty.h: SCCS/s.ex_tty.h; rm -f ex_tty.h; sccs get ex_tty.h | |
199 | ex_tune.h: SCCS/s.ex_tune.h; rm -f ex_tune.h; sccs get ex_tune.h | |
3068bcc1 | 200 | ex_unix.c: SCCS/s.ex_unix.c; rm -f ex_unix.c; sccs get ex_unix.c |
15951b22 MH |
201 | ex_v.c: SCCS/s.ex_v.c; rm -f ex_v.c; sccs get ex_v.c |
202 | ex_vadj.c: SCCS/s.ex_vadj.c; rm -f ex_vadj.c; sccs get ex_vadj.c | |
203 | ex_vars.h: SCCS/s.ex_vars.h; rm -f ex_vars.h; sccs get ex_vars.h | |
204 | ex_vget.c: SCCS/s.ex_vget.c; rm -f ex_vget.c; sccs get ex_vget.c | |
205 | ex_vis.h: SCCS/s.ex_vis.h; rm -f ex_vis.h; sccs get ex_vis.h | |
206 | ex_vmain.c: SCCS/s.ex_vmain.c; rm -f ex_vmain.c; sccs get ex_vmain.c | |
3068bcc1 | 207 | ex_voperate.c: SCCS/s.ex_voperate.c; rm -f ex_voperate.c; sccs get ex_voperate.c |
15951b22 MH |
208 | ex_vops.c: SCCS/s.ex_vops.c; rm -f ex_vops.c; sccs get ex_vops.c |
209 | ex_vops2.c: SCCS/s.ex_vops2.c; rm -f ex_vops2.c; sccs get ex_vops2.c | |
210 | ex_vops3.c: SCCS/s.ex_vops3.c; rm -f ex_vops3.c; sccs get ex_vops3.c | |
211 | ex_vput.c: SCCS/s.ex_vput.c; rm -f ex_vput.c; sccs get ex_vput.c | |
212 | ex_vwind.c: SCCS/s.ex_vwind.c; rm -f ex_vwind.c; sccs get ex_vwind.c | |
213 | expreserve.c: SCCS/s.expreserve.c; rm -f expreserve.c; sccs get expreserve.c | |
214 | exrecover.c: SCCS/s.exrecover.c; rm -f exrecover.c; sccs get exrecover.c | |
215 | makeoptions: SCCS/s.makeoptions; rm -f makeoptions; sccs get makeoptions | |
3068bcc1 | 216 | bcopy.c: SCCS/s.bcopy.c; rm -f bcopy.c; sccs get bcopy.c |
15951b22 | 217 | printf.c: SCCS/s.printf.c; rm -f printf.c; sccs get printf.c |