date and time created 88/07/21 17:33:21 by marc
[unix-history] / usr / src / local / toolchest / ksh / Makefile
CommitLineData
9f2804c5
MT
1
2#
3# Copyright (c) 1984, 1985, 1986 AT&T
4# All Rights Reserved
5#
6# THIS IS UNPUBLISHED PROPRIETARY SOURCE
7# CODE OF AT&T.
8# The copyright notice above does not
9# evidence any actual or intended
10# publication of such source code.
11#
12/*
13 * Fourth Generation make, makefile
14 */
15
16.OPTIONS: -m -u
17
18.SOURCE: sh shlib jsh
19
20/* These are files that contain documentation */
21
22DOCFILES= shlib/makefile jsh/makefile sh/makefile sh/makelib sh/makesh \
23 sh/Makefile sh.memo sh.1 ksh.mk makefile getopts substring \
24 README RELEASE COMPATIBILITY
25
26KSHELL = 1
27MULTIBYTE = /* set to 1 for multi-byte character sets */
28BSD = /* set to 1 for BSD Unix */
29BSD_4_2 = /* set to 1 for BSD 4.2 */
30BSD_4_1c = /* set to 1 for BSD 4.1c */
31ARK = lib.a /* name for library for common shell procedures */
32EDITLIB = libedit.a /* name for editing library */
33SH = ksh /* name of the shell program */
34JSH = jsh /* name of jobs control shell for shell layers */
35ESH = 1 /* set for emacs/gmacs edit mode */
36VSH = 1 /* set for vi edit mode */
37JOBS = 1 /* needed if jobs monitor option is selected */
38VFORK = /* needed if vfork option is selected */
39JOBLIB = /* set to name of library needed for job control */
40LDFLAGS = -n /* default loader option */
41NOBUF = /* set if _sibuf and _sobuf not in stdio library */
42RAWONLY = /* set to 1 if tty does not have alternate eof char */
43INT16 = /* set to -DINT16 for sixteen bit machines */
44MYIO = /* set to stdio.c if you don't want to use native stdio */
45ACCT = /* set to 1 for shell accounting (Sys V only ) */
46APOLLO = /* set to apollo.c for DOMAIN/IX */
47SYSCALL= /* set to syscall.s for 3b20's */
48EMACS = emacs.c /* name of the file needed for ESH */
49VI = vi.c /* name of the file needed for VSH */
50EDIT = edit.c /* name of file needed if ESH|VSH selected */
51JOBFILE = jobs.c /* name of file needed if jobs option is selected */
52VFORKFILE = /* name of file needed for VFORK option */
53SUID_EXEC = suid_exec /* set to null to disallow suid/sgid shell scripts */
54
55#if release(bsd) || release(research)
56BSD = 1
57ECHO_N = 1
58LDFLAGS = -z
59# if version(4.2) || version(4.3)
60BSD_4_2 = 1
61# else
62JOBLIB = -ljobs
63# endif
64# if machine(sun)
65NOBUF = 1
66# endif
67#endif
68
69#undef apollo
70#if machine(apollo)
71VFORK = 1
72VFORKFILE = vfork.c /* name of file needed for VFORK option */
73RAWONLY = 1
74NOBUF = 1
75APOLLO=apollo.c
76#endif
77
78#ifdef future
79#if exists("/dev/sxt/.")
80SXT = 1 /* set to 1 if there is an SXT driver */
81#endif
82#endif future
83
84#if exists("/dev/fd/.")
85DEVFD = 1 /* set to 1 if there is a /dev/fd directory */
86#endif
87
88#if architecture(ibm) || release(uts)
89DRAWONLY = 1
90U370 = U370 /* for ibms and amdahls */
91NOBUF = 1
92#endif
93
94#if architecture(pdp11) || architecture(i8086)
95INT16 = 1
96LDFLAGS = -i
97#endif
98
99.ALL: $(SH) $(SUID_EXEC:T=V)
100
101$(SH):: (KSHELL) (BSD) (BSD_4_2) (BSD_4_1c) (INT16) (SXT) \
102 shlib/$(ARK) shlib/$(ARK) $(JOBLIB) \
103 $(APOLLO) args.c blok.c brkincr.h builtin.c sh/builtins.h cmd.c \
104 ctype.c defs.h sh/defs.c $(EDIT) edit.h $(EMACS) echo.c \
105 error.c expand.c fault.c sh/flags.h history.c history.h \
106 io.c io.h $(JOBFILE) jobs.h macro.c main.c mode.h msg.c name.c \
107 sh/name.h sh/national.h print.c service.c string.c $(MYIO) \
108 sh/shtype.h stak.c stak.h sym.h test.c test.h timeout.h \
109 $(VFORKFILE) $(VI) word.c xec.c
110
111args.o defs.o error.o history.o io.o $(JOBFILE:BS=.o) main.o msg.o \
112 print.o xec.o: (ESH) (VSH)
113
114args.o edit.o vi.o: (RAWONLY)
115
116builtin.o args.o defs.o error.o fault.o $(JOBFILE:BS=.o) macro.o main.o msg.o \
117 print.o service.o word.o $(VFORKFILE:BS=.o) xec.o: (JOBS)
118
119args.o cmd.o msg.o word.o xec.o: (DEVFD)
120
121builtin.o msg.o name.o: (ECHO_N)
122
123error.o fault.o main.o service.o xec.o: (VFORK)
124
125emacs.o edit.o history.o macro.o msg.o string.o vi.o assign.o gmatch.o: (MULTIBYTE)
126
127error.o main.o msg.o service.o xec.o: (ACCT)
128
129main.o msg.o service.o: (SUID_EXEC)
130
131defs.o: (NOBUF)
132
133(ECHO_N):
134 if test -f /bin/echo -a X"`/bin/echo -n`" = X
135 then @ ECHO_N=1
136 fi
137
138jsh/$(JSH):: (BSD) jsh/defs.h jsh/defs.c jsh.c mpx.c
139
140
141shlib/$(ARK):: (BSD) (KSHELL) adjust.c arith.c assign.c \
142 assnum.c shlib/builtins.h cannon.c chkid.c convert.c failed.c \
143 findnod.c shlib/flags.h gettree.c gmatch.c growaray.c gsort.c \
144 linknod.c shlib/name.h shlib/national.h namscan.c rjust.c \
145 shlib/shtype.h tilde.c unassign.c utos.c valup.c
146
147suid_exec:: suid_exec.c (BSD) (BSD_4_2)
148
149editlib: nokshell sh/$(EDITLIB)
150
151nokshell: .MAKE
152 KSHELL=
153
154sh/$(EDITLIB):: nokshell (BSD) edit.c edit.h editlib.c $(EMACS) \
155 history.c history.h $(VI) $(SYSCALL)
156
157msg.o ctype.o: .READONLY
158
159/* The following rule is only for the benefit of cpio, tar and print */
160ConditionalFiles:: syscall.s apollo.c edit.c jobs.c vi.c emacs.c \
161 stdio.c vfork.c $(DOCFILES)
162