Commit | Line | Data |
79072805 |
1 | # : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $ |
8d063cd8 |
2 | # |
3 | # $Log: Makefile.SH,v $ |
79072805 |
4 | # Revision 4.1 92/08/07 17:18:08 lwall |
5 | # Stage 6 Snapshot |
6 | # |
b3634b01 |
7 | # Revision 4.0.1.4 92/06/08 11:40:43 lwall |
8 | # patch20: cray didn't give enough memory to /bin/sh |
9 | # patch20: various and sundry fixes |
10 | # |
f1ca563b |
11 | # Revision 4.0.1.3 91/11/05 15:48:11 lwall |
12 | # patch11: saberized perl |
13 | # patch11: added support for dbz |
14 | # |
132b68a5 |
15 | # Revision 4.0.1.2 91/06/07 10:14:43 lwall |
16 | # patch4: cflags now emits entire cc command except for the filename |
17 | # patch4: alternate make programs are now semi-supported |
18 | # patch4: uperl.o no longer tries to link in libraries prematurely |
19 | # patch4: installperl now installs x2p stuff too |
20 | # |
1c3d792e |
21 | # Revision 4.0.1.1 91/04/11 17:30:39 lwall |
22 | # patch1: C flags are now settable on a per-file basis |
23 | # |
fe14fcc3 |
24 | # Revision 4.0 91/03/20 00:58:54 lwall |
25 | # 4.0 baseline. |
7e1cf235 |
26 | # |
8d063cd8 |
27 | # |
8d063cd8 |
28 | |
2304df62 |
29 | # I now supply perly.c with the kits, so don't remake perly.c without byacc |
30 | BYACC = byacc |
79072805 |
31 | CC = cc |
79072805 |
32 | bin = /usr/local/bin |
33 | scriptdir = /usr/local/bin |
34 | privlib = /usr/local/lib/perl |
2304df62 |
35 | mansrc = /usr/local/man/man1 |
36 | manext = 1 |
79072805 |
37 | LDFLAGS = |
38 | CLDFLAGS = |
39 | SMALL = |
40 | LARGE = |
41 | mallocsrc = malloc.c |
42 | mallocobj = malloc.o |
2304df62 |
43 | dlsrc = dl.c |
44 | dlobj = dl.o |
79072805 |
45 | SLN = ln -s |
f1ca563b |
46 | RMS = rm -f |
8d063cd8 |
47 | |
2304df62 |
48 | libs = -ldbm -ldl -lm -lposix |
8d063cd8 |
49 | |
2304df62 |
50 | public = perl |
b3634b01 |
51 | |
79072805 |
52 | shellflags = |
132b68a5 |
53 | |
79072805 |
54 | # To use an alternate make, set in config.sh. |
55 | MAKE = make |
8d063cd8 |
56 | |
b3634b01 |
57 | CCCMD = `sh $(shellflags) cflags $@` |
1c3d792e |
58 | |
8d063cd8 |
59 | private = |
60 | |
79220ce3 |
61 | scripts = h2ph |
62 | |
79220ce3 |
63 | manpages = perl.man h2ph.man |
8d063cd8 |
64 | |
65 | util = |
66 | |
79220ce3 |
67 | sh = Makefile.SH makedepend.SH h2ph.SH |
8d063cd8 |
68 | |
79072805 |
69 | h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h |
70 | h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h |
8d063cd8 |
71 | |
2304df62 |
72 | h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h |
73 | h2 = embed.h form.h gv.h handy.h hv.h hvdbm.h keywords.h mg.h op.h |
74 | h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h |
75 | h4 = regexp.h scope.h sv.h unixish.h util.h |
76 | h = $(h1) $(h2) $(h3) $(h4) |
8d063cd8 |
77 | |
2304df62 |
78 | c1 = av.c scope.c op.c doop.c doio.c dump.c hv.c |
79 | c2 = $(mallocsrc) mg.c perly.c pp.c regcomp.c regexec.c |
80 | c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c |
a687059c |
81 | |
82 | c = $(c1) $(c2) $(c3) |
83 | |
2304df62 |
84 | s1 = av.c scope.c op.c doop.c doio.c dump.c hv.c |
85 | s2 = $(mallocobj) mg.c perly.c pp.c regcomp.c regexec.c |
86 | s3 = gv.c sv.c taint.c toke.c util.c deb.c run.c perly.c |
f1ca563b |
87 | |
88 | saber = $(s1) $(s2) $(s3) |
89 | |
2304df62 |
90 | obj1 = av.o scope.o op.o doop.o doio.o dump.o hv.o |
91 | obj2 = $(mallocobj) mg.o perly.o pp.o regcomp.o regexec.o |
92 | obj3 = gv.o sv.o taint.o toke.o util.o deb.o run.o |
8d063cd8 |
93 | |
2304df62 |
94 | obj = $(obj1) $(obj2) $(obj3) $(dlobj) |
8d063cd8 |
95 | |
a687059c |
96 | lintflags = -hbvxac |
8d063cd8 |
97 | |
98 | addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 |
99 | |
100 | # grrr |
101 | SHELL = /bin/sh |
102 | |
2304df62 |
103 | .SUFFIXES: .x |
104 | |
8d063cd8 |
105 | .c.o: |
132b68a5 |
106 | $(CCCMD) $*.c |
8d063cd8 |
107 | |
2304df62 |
108 | .x.c: |
109 | sh writemain $*.x >$*.c |
79072805 |
110 | |
2304df62 |
111 | all: miniperl perl lib/Config.pm |
79072805 |
112 | |
2304df62 |
113 | #all: $(public) $(private) $(util) $(scripts) |
79072805 |
114 | # cd x2p; $(MAKE) all |
115 | # touch all |
13281fa4 |
116 | |
2304df62 |
117 | # NDBM_File extension |
118 | NDBM_File.c: ext/dbm/NDBM_File.xs ext/xsubpp ext/typemap |
119 | test -f miniperl || make miniperl |
120 | ext/xsubpp ext/dbm/NDBM_File.xs >tmp |
121 | mv tmp NDBM_File.c |
122 | |
123 | NDBM_File.o: NDBM_File.c |
124 | |
125 | # ODBM_File extension |
126 | ODBM_File.c: ext/dbm/ODBM_File.xs ext/xsubpp ext/typemap |
127 | test -f miniperl || make miniperl |
128 | ext/xsubpp ext/dbm/ODBM_File.xs >tmp |
129 | mv tmp ODBM_File.c |
130 | |
131 | ODBM_File.o: ODBM_File.c |
132 | |
133 | # GDBM_File extension |
134 | GDBM_File.c: ext/dbm/GDBM_File.xs ext/xsubpp ext/typemap |
135 | test -f miniperl || make miniperl |
136 | ext/xsubpp ext/dbm/GDBM_File.xs >tmp |
137 | mv tmp GDBM_File.c |
138 | |
139 | GDBM_File.o: GDBM_File.c |
140 | |
141 | # SDBM_File extension |
142 | SDBM_File.c: ext/dbm/SDBM_File.xs ext/xsubpp ext/typemap |
143 | test -f miniperl || make miniperl |
144 | ext/xsubpp ext/dbm/SDBM_File.xs >tmp |
145 | mv tmp SDBM_File.c |
146 | |
147 | SDBM_File.o: SDBM_File.c |
148 | |
149 | lib/auto/SDBM_File/SDBM_File.so: SDBM_File.o ext/dbm/sdbm/libsdbm.a |
150 | @- mkdir lib/auto/SDBM_File 2>/dev/null |
151 | ld -o lib/auto/SDBM_File/SDBM_File.so SDBM_File.o ext/dbm/sdbm/libsdbm.a |
152 | |
153 | ext/dbm/sdbm/libsdbm.a: ext/dbm/sdbm/sdbm.c ext/dbm/sdbm/sdbm.h |
154 | cd ext/dbm/sdbm; $(MAKE) sdbm |
155 | |
156 | # POSIX extension |
157 | POSIX.c: ext/posix/POSIX.xs ext/xsubpp ext/typemap |
158 | test -f miniperl || make miniperl |
159 | ext/xsubpp ext/posix/POSIX.xs >tmp |
160 | mv tmp POSIX.c |
161 | |
162 | POSIX.o: POSIX.c |
163 | lib/auto/POSIX/POSIX.so: POSIX.o ext/dbm/sdbm/libsdbm.a |
164 | @- mkdir lib/auto/POSIX 2>/dev/null |
165 | ld -o lib/auto/POSIX/POSIX.so POSIX.o ext/dbm/sdbm/libsdbm.a |
166 | extobjs= ext/dbm/NDBM_File.xs.o ext/dbm/ODBM_File.xs.o ext/dbm/GDBM_File.xs.o ext/dbm/SDBM_File.xs.o ext/posix/POSIX.xs.o |
167 | # The $& notation tells Sequent machines that it can do a parallel make, |
1c3d792e |
168 | # and is harmless otherwise. |
13281fa4 |
169 | |
2304df62 |
170 | miniperlmain.c: miniperlmain.x |
171 | miniperlmain.o: miniperlmain.c |
172 | miniperl: $& miniperlmain.o perl.o $(obj) |
173 | $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain.o perl.o $(obj) $(libs) |
174 | |
175 | perlmain.c: perlmain.x |
176 | perlmain.o: perlmain.c |
177 | perl: $& perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o |
178 | $(CC) $(LARGE) $(CLDFLAGS) -o perl perlmain.o perl.o $(obj) NDBM_File.o ODBM_File.o POSIX.o $(libs) |
f1ca563b |
179 | |
79072805 |
180 | libperl.rlb: libperl.a |
181 | ranlib libperl.a |
182 | touch libperl.rlb |
79220ce3 |
183 | |
2304df62 |
184 | libperl.a: $& perl.o $(obj) |
185 | ar rcuv libperl.a $(obj) |
a687059c |
186 | |
187 | # This version, if specified in Configure, does ONLY those scripts which need |
188 | # set-id emulation. Suidperl must be setuid root. It contains the "taint" |
189 | # checks as well as the special code to validate that the script in question |
190 | # has been invoked correctly. |
13281fa4 |
191 | |
2304df62 |
192 | suidperl: $& sperl.o main.o libperl.rlb |
193 | $(CC) $(LARGE) $(CLDFLAGS) sperl.o main.o libperl.a $(libs) -o suidperl |
79072805 |
194 | |
2304df62 |
195 | lib/Config.pm: config.sh |
196 | ./configpm |
79072805 |
197 | |
198 | saber: $(saber) |
199 | # load $(saber) |
200 | # load /lib/libm.a |
a687059c |
201 | |
fe14fcc3 |
202 | sperl.o: perl.c perly.h patchlevel.h $(h) |
f1ca563b |
203 | $(RMS) sperl.c |
fe14fcc3 |
204 | $(SLN) perl.c sperl.c |
2304df62 |
205 | $(CCCMD) -DIAMSUID sperl.c |
f1ca563b |
206 | $(RMS) sperl.c |
13281fa4 |
207 | |
2304df62 |
208 | dl.o: ext/dl/dl.c |
209 | cp ext/dl/dl.c dl.c |
210 | $(CC) -c dl.c |
8d063cd8 |
211 | |
2304df62 |
212 | |
fe14fcc3 |
213 | perly.h: perly.c |
ff2452de |
214 | @ echo Dummy dependency for dumb parallel make |
215 | touch perly.h |
216 | |
2304df62 |
217 | opcode.h: opcode.pl |
218 | - opcode.pl |
219 | |
220 | embed.h: embed_h.SH global.sym interp.sym |
79072805 |
221 | sh embed_h.SH |
222 | |
2304df62 |
223 | perly.c: |
224 | @ echo 'Expect' 80 shift/reduce and 62 reduce/reduce conflicts |
225 | $(BYACC) -d perly.y |
b3634b01 |
226 | sh $(shellflags) ./perly.fixer y.tab.c perly.c |
378cc40b |
227 | mv y.tab.h perly.h |
ff2452de |
228 | echo 'extern YYSTYPE yylval;' >>perly.h |
8d063cd8 |
229 | |
fe14fcc3 |
230 | perly.o: perly.c perly.h $(h) |
132b68a5 |
231 | $(CCCMD) perly.c |
8d063cd8 |
232 | |
a687059c |
233 | install: all |
7e1cf235 |
234 | ./perl installperl |
8d063cd8 |
235 | |
236 | clean: |
2304df62 |
237 | rm -f *.o all perl taintperl suidperl miniperl |
a687059c |
238 | cd x2p; $(MAKE) clean |
8d063cd8 |
239 | |
b6ccd89c |
240 | realclean: clean |
a687059c |
241 | cd x2p; $(MAKE) realclean |
b6ccd89c |
242 | rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man |
2304df62 |
243 | rm -f perly.h t/perl Makefile config.h makedepend makedir |
132b68a5 |
244 | rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags |
f1ca563b |
245 | rm -f c2ph pstruct |
8d063cd8 |
246 | |
247 | # The following lint has practically everything turned on. Unfortunately, |
248 | # you have to wade through a lot of mumbo jumbo that can't be suppressed. |
249 | # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message |
250 | # for that spot. |
251 | |
fe14fcc3 |
252 | lint: perly.c $(c) |
253 | lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz |
8d063cd8 |
254 | |
255 | depend: makedepend |
378cc40b |
256 | - test -f perly.h || cp /dev/null perly.h |
fdf95cbb |
257 | ./makedepend |
378cc40b |
258 | - test -s perly.h || /bin/rm -f perly.h |
a687059c |
259 | cd x2p; $(MAKE) depend |
8d063cd8 |
260 | |
261 | test: perl |
fe14fcc3 |
262 | - cd t && chmod +x TEST */*.t |
b3634b01 |
263 | - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty |
8d063cd8 |
264 | |
265 | clist: |
266 | echo $(c) | tr ' ' '\012' >.clist |
267 | |
268 | hlist: |
269 | echo $(h) | tr ' ' '\012' >.hlist |
270 | |
271 | shlist: |
272 | echo $(sh) | tr ' ' '\012' >.shlist |
273 | |
274 | # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
2304df62 |
275 | # If this runs make out of memory, delete /usr/include lines. |