date and time created 80/07/31 23:01:16 by mark
[unix-history] / usr / src / usr.bin / ex / Makefile
CommitLineData
fe10330d
MH
1VERSION=3.1
2#
3# Ex skeletal makefile for Version 7
4#
5# NB: This makefile doesn't indicate any dependencies on header files.
6#
7# Compiles in the LISPCODE code within the editor;
8# take this out of CFLAGS to make some
9# breathing room in the text space if necessary. If you take out -DLISPCODE
10# you should move ex_vars.nolisp to ex_vars.h
11#
12# If your system expands tabs to 4 spaces you should -DTABS=4 below
13#
14# Ex wants stdio only to get the doprnt.o routine; if other stdio stuff
15# gets dragged in that is a mistake.
16#
17.c.o:
18 ${MKSTR} - ex${VERSION}strings x $*.c
19 ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
20 rm -f x$*.c
21 ${CC} ${CFLAGS} -O -c x.c
22 mv x.o $*.o
23BINDIR= /usr/bin
24LIBDIR= /usr/lib
25FOLD= /usr/bin/fold
26CTAGS= /usr/ucb/ctags
27AS= -as
28XSTR= /usr/ucb/xstr
29CFLAGS= -DTABS=8 -DLISPCODE
30MKSTR= /usr/ucb/mkstr
31CXREF= /usr/ucb/cxref
32INCLUDE=/usr/include
33PR= pr
34OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_get.o \
35 ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_temp.o ex_tty.o \
36 ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \
37 ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
38 printf.o strings.o
39
40all: a.out expreserve exrecover
41
42a.out: ${OBJS} tags
43 ${CC} -i ${OBJS} -ltermlib
44
45tags:
46 ../bin/csh ${CTAGS} ex.c ex_*.c
47
48strings.o: strings
49 ${XSTR}
50 ${CC} -c xs.c
51 mv xs.o strings.o
52
53exrecover: exrecover.o
54 ${CC} -o exrecover exrecover.o
55
56exrecover.o:
57 ${CC} ${CFLAGS} -c -O exrecover.c
58
59expreserve: expreserve.o popen.c
60 ${CC} -o expreserve expreserve.o
61
62expreserve.o:
63 ${CC} ${CFLAGS} -c expreserve.c
64
65clean:
66 -rm a.out exrecover expreserve ex${VERSION}strings strings errs core trace
67 -rm *.o x*.[cs]
68
69install: a.out installutil
70 -chmod 755 ${BINDIR}/ex
71 -${BINDIR}/ex </dev/null
72 -rm -f ${BINDIR}/ex ${BINDIR}/edit /${BINDIR}/vi
73 cp a.out ${BINDIR}/ex
74 ln ${BINDIR}/ex ${BINDIR}/edit
75 ln ${BINDIR}/ex ${BINDIR}/vi
76 cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
77 chmod 1755 ${BINDIR}/ex
78
79installutil: exrecover expreserve
80 cp exrecover ${LIBDIR}/ex${VERSION}recover
81 cp expreserve ${LIBDIR}/ex${VERSION}preserve
82
83lint:
84 lint ex.c ex_?*.c
85 lint -u exrecover.c
86 lint expreserve.c
87
88print:
89 @-rm x.c xs.c >/dev/null
90 @${PR} READ* BUGS
91 @${PR} make*
92 @(size -l a.out ; size *.o) | ${PR} -h sizes
93 @${PR} termcap
94 @${PR} -h errno.h ${INCLUDE}/errno.h
95 @${PR} -h pwd.h ${INCLUDE}/pwd.h
96 @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
97 @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
98 @${PR} -h signal.h ${INCLUDE}/signal.h
99 @${PR} -h sys/dir.h ${INCLUDE}/sys/dir.h
100 @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
101 @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
102 @ls -ls | ${PR}
103 @${CXREF} *.c | ${PR} -h XREF
104 @${PR} *.h *.c