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