1 # : Makefile.SH,v 15738Revision: 4.1 15738Date: 92/08/07 17:18:08 $
3 # $Log: Makefile.SH,v $
4 # Revision 4.1 92/08/07 17:18:08 lwall
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
11 # Revision 4.0.1.3 91/11/05 15:48:11 lwall
12 # patch11: saberized perl
13 # patch11: added support for dbz
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
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
24 # Revision 4.0 91/03/20 00:58:54 lwall
32 scriptdir = /usr/local/bin
33 privlib = /usr/local/lib/perl
34 mansrc = /usr/man/manl
45 libs = -ldbm -lm -lposix
51 # To use an alternate make, set in config.sh.
55 CCCMD = `sh $(shellflags) cflags $@`
61 manpages = perl.man h2ph.man
65 sh = Makefile.SH makedepend.SH h2ph.SH
67 h1 = EXTERN.h INTERN.h av.h cop.h config.h embed.h form.h handy.h
68 h2 = hv.h op.h opcode.h perl.h regcomp.h regexp.h gv.h sv.h util.h
72 c1 = av.c cop.c cons.c consop.c doop.c doio.c dolist.c
73 c2 = eval.c hv.c main.c $(mallocsrc) perl.c pp.c regcomp.c regexec.c
74 c3 = gv.c sv.c toke.c util.c usersub.c
78 s1 = av.c cop.c cons.c consop.c doop.c doio.c dolist.c
79 s2 = eval.c hv.c main.c perl.c pp.c regcomp.c regexec.c
80 s3 = gv.c sv.c toke.c util.c usersub.c perly.c
82 saber = $(s1) $(s2) $(s3)
84 obj1 = av.o scope.o op.o doop.o doio.o dolist.o dump.o
85 obj2 = $(mallocobj) mg.o pp.o regcomp.o regexec.o
86 obj3 = gv.o sv.o toke.o util.o deb.o run.o
88 obj = $(obj1) $(obj2) $(obj3)
90 tobj1 = tav.o tcop.o tcons.o tconsop.o tdoop.o tdoio.o tdolist.o tdump.o
91 tobj2 = teval.o thv.o $(mallocobj) tpp.o tregcomp.o tregexec.o
92 tobj3 = tgv.o tsv.o ttoke.o tutil.o
94 tobj = $(tobj1) $(tobj2) $(tobj3)
98 addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
109 #all: $(public) $(private) $(util) uperl.o $(scripts)
110 # cd x2p; $(MAKE) all
113 # This is the standard version that contains no "taint" checks and is
114 # used for all scripts that aren't set-id or running under something set-id.
115 # The $& notation is tells Sequent machines that it can do a parallel make,
116 # and is harmless otherwise.
118 perl: $& main.o perly.o perl.o $(obj) hv.o usersub.o
119 $(CC) -Bstatic $(LARGE) $(CLDFLAGS) main.o perly.o perl.o $(obj) hv.o usersub.o $(libs) -o perl
122 libperl.rlb: libperl.a
126 libperl.a: $& perly.o perl.o $(obj) hv.o usersub.o
127 ar rcuv libperl.a $(obj) hv.o perly.o usersub.o
129 # This version, if specified in Configure, does ONLY those scripts which need
130 # set-id emulation. Suidperl must be setuid root. It contains the "taint"
131 # checks as well as the special code to validate that the script in question
132 # has been invoked correctly.
134 suidperl: $& sperl.o tmain.o libtperl.rlb
135 $(CC) $(LARGE) $(CLDFLAGS) sperl.o tmain.o libtperl.a $(libs) -o suidperl
137 # This version interprets scripts that are already set-id either via a wrapper
138 # or through the kernel allowing set-id scripts (bad idea). Taintperl must
139 # NOT be setuid to root or anything else. The only difference between it
140 # and normal perl is the presence of the "taint" checks.
142 taintperl: $& tmain.o libtperl.rlb
143 $(CC) $(LARGE) $(CLDFLAGS) tmain.o libtperl.a $(libs) -o taintperl
145 libtperl.rlb: libtperl.a
149 libtperl.a: $& tperly.o tperl.o $(tobj) thv.o usersub.o
150 ar rcuv libtperl.a $(tobj) thv.o tperly.o usersub.o tperl.o
152 # This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist.
154 dbzperl: $& main.o zhv.o libperl.rlb
155 $(CC) $(LARGE) $(CLDFLAGS) main.o zhv.o /usr/lib/dbz.o libperl.a $(libs) -o dbzperl
160 $(CCCMD) -DWANT_DBZ zhv.c
163 uperl.o: $& $(obj) main.o hv.o perly.o
164 -ld $(LARGE) $(LDFLAGS) -r $(obj) main.o hv.o perly.o -o uperl.o
170 # Replicating all this junk is yucky, but I don't see a portable way to fix it.
172 tperly.o: perly.c perly.h $(h)
174 $(SLN) perly.c tperly.c
175 $(CCCMD) -DTAINT tperly.c
178 tperl.o: perl.c perly.h patchlevel.h perl.h $(h)
180 $(SLN) perl.c tperl.c
181 $(CCCMD) -DTAINT tperl.c
184 sperl.o: perl.c perly.h patchlevel.h $(h)
186 $(SLN) perl.c sperl.c
187 $(CCCMD) -DTAINT -DIAMSUID sperl.c
193 $(CCCMD) -DTAINT tav.c
199 $(CCCMD) -DTAINT tcop.c
202 tcons.o: cons.c $(h) perly.h
204 $(SLN) cons.c tcons.c
205 $(CCCMD) -DTAINT tcons.c
208 tconsop.o: consop.c $(h)
210 $(SLN) consop.c tconsop.c
211 $(CCCMD) -DTAINT tconsop.c
216 $(SLN) doop.c tdoop.c
217 $(CCCMD) -DTAINT tdoop.c
222 $(SLN) doio.c tdoio.c
223 $(CCCMD) -DTAINT tdoio.c
226 tdolist.o: dolist.c $(h)
228 $(SLN) dolist.c tdolist.c
229 $(CCCMD) -DTAINT tdolist.c
234 $(SLN) dump.c tdump.c
235 $(CCCMD) -DTAINT tdump.c
240 $(SLN) eval.c teval.c
241 $(CCCMD) -DTAINT teval.c
247 $(CCCMD) -DTAINT thv.c
252 $(SLN) main.c tmain.c
253 $(CCCMD) -DTAINT tmain.c
259 $(CCCMD) -DTAINT tpp.c
262 tregcomp.o: regcomp.c $(h)
264 $(SLN) regcomp.c tregcomp.c
265 $(CCCMD) -DTAINT tregcomp.c
268 tregexec.o: regexec.c $(h)
270 $(SLN) regexec.c tregexec.c
271 $(CCCMD) -DTAINT tregexec.c
277 $(CCCMD) -DTAINT tgv.c
280 tsv.o: sv.c $(h) perly.h
283 $(CCCMD) -DTAINT tsv.c
286 ttoke.o: toke.c $(h) perly.h
288 $(SLN) toke.c ttoke.c
289 $(CCCMD) -DTAINT ttoke.c
294 $(SLN) util.c tutil.c
295 $(CCCMD) -DTAINT tutil.c
299 @ echo Dummy dependency for dumb parallel make
302 embed.h: embed_h.SH global.var interp.var
305 perly.c: perly.y perly.fixer
308 *bison*) echo 'Expect' 25 shift/reduce and 53 reduce/reduce conflicts;; \
309 *) echo 'Expect' 27 shift/reduce and 51 reduce/reduce conflicts;; \
312 sh $(shellflags) ./perly.fixer y.tab.c perly.c
314 echo 'extern YYSTYPE yylval;' >>perly.h
316 perly.o: perly.c perly.h $(h)
323 rm -f *.o all perl taintperl suidperl perly.c
324 cd x2p; $(MAKE) clean
327 cd x2p; $(MAKE) realclean
328 rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man
329 rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir
330 rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags
333 # The following lint has practically everything turned on. Unfortunately,
334 # you have to wade through a lot of mumbo jumbo that can't be suppressed.
335 # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
339 lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz
342 - test -f perly.h || cp /dev/null perly.h
344 - test -s perly.h || /bin/rm -f perly.h
345 cd x2p; $(MAKE) depend
348 - cd t && chmod +x TEST */*.t
349 - cd t && (rm -f perl; $(SLN) ../perl perl) && ./perl TEST </dev/tty
352 echo $(c) | tr ' ' '\012' >.clist
355 echo $(h) | tr ' ' '\012' >.hlist
358 echo $(sh) | tr ' ' '\012' >.shlist
360 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
362 @ echo "You haven't done a "'"make depend" yet!'; exit 1
363 makedepend: makedepend.SH
364 /bin/sh $(shellflags) makedepend.SH