aboutsummaryrefslogtreecommitdiff
path: root/pkg/ecl/mkpkg
blob: 1a360c8a4bf2e15f5789d5b34edd951260cf4ec5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# Make the CL.

$call	relink				# make ecl.e in current directory
$exit

update:					# make ecl.e and install in bin$
        $ifeq (MACH, sparc) then
            $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
        $endif
	$call	relink
	$call	install
	;

relink:
	# [MACHDEP] The following is machine dependent, but is exercised only
	# on our software development system when changes are made to the
	# grammar of the CL.  On other systems the files lexyy.c, ytab.c, and
	# ytab.h may be used without modification.

	$ifeq (hostid, unix)
	    $ifolder (lexyy.c, grammar.l)
		$echo "rebuilding lexyy.c"
		!lex -t grammar.l | sed -f lex.sed > lexyy.c
	    $endif
	    $ifolder (ytab.c,  grammar.y)
		$echo "rebuilding ytab.c"
		$ifeq (MACH, linux, redhat, suse)
		    !yacc -vd grammar.y; 
		    !egrep -v "\<stdlib.h\>" y.tab.c > ytab.c; 
		    !egrep -v "\<stdio.h\>" ytab.c > ntab.c; mv ntab.c ytab.c
		    !mv y.tab.h ytab.h
		$else
		    !yacc -vd grammar.y; mv y.tab.c ytab.c; mv y.tab.h ytab.h
		$endif
	    $endif
	$endif

	$ifeq (siteid, stsci)
	$ifeq (hostid, vms)
	    $ifolder (lexyy.c, grammar.l)
		$echo "rebuilding lexyy.c"
		!lex grammar.l
		!@lex.com
	    $endif
	    $ifolder (ytab.c,  grammar.y)
		$echo "rebuilding ytab.c"
		!yacc -vd grammar.y
	    $endif
	$endif
	$endif

	$ifeq (MACH, sparc) then
	    $set    XFLAGS          = "$(XFLAGS) -/DNO_READLINE"
	$endif

	$update libpkg.a

	#$set	xflags = "$(xflags) -x -/DYYDEBUG"
	$set	xflags = "$(xflags) -x"
	$omake  ecl.x
	$omake	globals.c <libc/libc.h> <libc/stdio.h> <libc/spp.h>\
		construct.h eparam.h operand.h param.h task.h
	$omake	opcodes.c <libc/libc.h> <libc/spp.h> <libc/stdio.h> config.h\
		construct.h errs.h grammar.h mem.h opcodes.h operand.h\
		param.h task.h
link:
	$set	LIBS = "-lc -lcur -lds -lstg"
	$ifneq (MACH, sparc) then
	  $ifeq (MACH, linux) then
	    $set	LIBS2 = "-/L/usr/lib32 -lreadline -lncurses"
	  $else
	    $set	LIBS2 = "-lreadline -lncurses"
	  $endif
	$else
	$set	LIBS2 = ""
	$endif
	$link	ecl.o globals.o opcodes.o libpkg.a $(LIBS) $(LIBS2)
	;

install:
	$move	ecl.e bin$
	;

libpkg.a:
	#$set	xflags = "$(xflags) -qx -/DYYDEBUG"
	$set	xflags = "$(xflags) -qx"

	binop.c		<libc/spp.h> <libc/libc.h> <libc/xnames.h>\
			<libc/math.h> <libc/ctype.h> config.h\
			operand.h errs.h

	bkg.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/knames.h> <libc/xwhen.h> <libc/ctype.h>\
			clmodes.h config.h operand.h clmodes.h\
			mem.h errs.h param.h task.h

	builtin.c	<libc/spp.h> <libc/libc.h> <libc/fset.h>\
			<libc/error.h> <libc/ctype.h> <libc/stdio.h>\
			<libc/alloc.h> <libc/ttset.h> clmodes.h\
			config.h mem.h operand.h param.h task.h errs.h

	clprintf.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h operand.h param.h\
			task.h errs.h

	clsystem.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			errs.h

	compile.c	<libc/spp.h> <libc/libc.h> config.h\
			operand.h opcodes.h mem.h errs.h

	debug.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			operand.h mem.h grammar.h opcodes.h config.h param.h\
			task.h

	decl.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			clmodes.h operand.h mem.h grammar.h opcodes.h config.h\
			param.h task.h errs.h construct.h ytab.h

	edcap.c		<libc/stdio.h> <libc/libc.h> <libc/ctype.h>\
			<libc/fset.h> <libc/spp.h> config.h operand.h\
			param.h task.h eparam.h

	eparam.c	<libc/stdio.h> <libc/libc.h> <libc/error.h>\
			<libc/ctype.h> <libc/ttset.h> <libc/fset.h>\
			<libc/spp.h> config.h mem.h operand.h\
			errs.h param.h grammar.h task.h eparam.h

	errs.c		<libc/spp.h> <libc/libc.h> <libc/fset.h>\
			<libc/stdio.h> <libc/setjmp.h> <libc/knames.h>\
			<libc/xnames.h> clmodes.h\
			config.h operand.h param.h task.h mem.h errs.h\
			grammar.h construct.h

	exec.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/xwhen.h> clmodes.h config.h mem.h\
			opcodes.h operand.h param.h task.h errs.h\
			grammar.h

	gquery.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h operand.h param.h grammar.h\
			task.h clmodes.h

	gram.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			clmodes.h operand.h mem.h grammar.h\
			opcodes.h config.h param.h task.h errs.h construct.h\
			ytab.h

	history.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/fset.h> <libc/ctype.h> config.h errs.h\
			mem.h operand.h param.h task.h clmodes.h grammar.h

	lists.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h mem.h operand.h param.h\
			task.h errs.h

	main.c		<libc/spp.h> <libc/libc.h> <libc/fset.h>\
			<libc/main.h> <libc/stdio.h> <libc/error.h>\
			<libc/setjmp.h> <libc/knames.h> <libc/prtype.h>\
			<libc/xwhen.h> <libc/xnames.h> grammar.h\
			opcodes.h operand.h param.h config.h clmodes.h task.h\
			errs.h mem.h

	modes.c		<libc/spp.h> <libc/libc.h>\
			<libc/stdio.h> <libc/ctype.h> clmodes.h\
			config.h construct.h operand.h param.h grammar.h\
			mem.h task.h errs.h

	operand.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			errs.h config.h operand.h param.h grammar.h\
			mem.h task.h construct.h eparam.h

	param.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h operand.h param.h grammar.h mem.h\
			task.h errs.h clmodes.h construct.h

	pfiles.c	<libc/spp.h> <libc/libc.h> <libc/finfo.h>\
			<libc/stdio.h> <libc/ctype.h> config.h\
			errs.h operand.h mem.h param.h task.h grammar.h

	prcache.c	<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/error.h> <libc/finfo.h> <libc/prstat.h>\
			config.h errs.h task.h

	scan.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h operand.h param.h grammar.h\
			task.h errs.h

	stack.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			mem.h operand.h config.h param.h task.h\
			errs.h

	task.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			config.h operand.h param.h mem.h task.h\
			errs.h clmodes.h

	unop.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/xnames.h> <libc/math.h> config.h\
			operand.h errs.h task.h param.h

	ytab.c		<libc/spp.h> <libc/libc.h> <libc/stdio.h>\
			<libc/ctype.h> config.h mem.h operand.h\
			param.h grammar.h opcodes.h clmodes.h task.h\
			construct.h errs.h lexyy.c lexicon.c
	;