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