Commit | Line | Data |
599a829f |
1 | #! /bin/sh |
2304df62 |
2 | case $CONFIG in |
3 | '') |
4 | if test -f config.sh; then TOP=.; |
5 | elif test -f ../config.sh; then TOP=..; |
6 | elif test -f ../../config.sh; then TOP=../..; |
7 | elif test -f ../../../config.sh; then TOP=../../..; |
8 | elif test -f ../../../../config.sh; then TOP=../../../..; |
9 | else |
10 | echo "Can't find config.sh."; exit 1 |
11 | fi |
12 | . $TOP/config.sh |
13 | ;; |
14 | esac |
15 | : This forces SH files to create target in same directory as SH file. |
16 | : This is so that make depend always knows where to find SH derivatives. |
17 | case "$0" in |
18 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; |
19 | esac |
20 | |
2304df62 |
21 | case "$d_dosuid" in |
22 | *define*) suidperl='suidperl' ;; |
23 | *) suidperl='';; |
24 | esac |
25 | |
d96ebe2e |
26 | case "$useshrplib" in |
27 | true) |
655635e8 |
28 | pldlflags="$cccdlflags" |
f0efd8cf |
29 | # NeXT-4 specific stuff. Can't we do this in the hint file? |
d96ebe2e |
30 | case "${osname}${osvers}" in |
31 | next4*) |
d96ebe2e |
32 | ld='libtool -dynamic -undefined warning -framework System \ |
33 | -compatibility_version 1 -current_version $(PATCHLEVEL) \ |
34 | -prebind -seg1addr 0x27000000 -install_name $(SHRPDIR)/$@' |
35 | ;; |
655635e8 |
36 | esac |
760ac839 |
37 | ;; |
f0efd8cf |
38 | *) pldlflags='' |
d96ebe2e |
39 | ;; |
ecfc5424 |
40 | esac |
41 | |
a0d0e21e |
42 | : Prepare dependency lists for Makefile. |
43 | dynamic_list=' ' |
44 | for f in $dynamic_ext; do |
45 | : the dependency named here will never exist |
ecfc5424 |
46 | base=`echo "$f" | sed 's/.*\///'` |
75f92628 |
47 | dynamic_list="$dynamic_list lib/auto/$f/$base.$dlext" |
a0d0e21e |
48 | done |
49 | |
50 | static_list=' ' |
a0d0e21e |
51 | for f in $static_ext; do |
52 | base=`echo "$f" | sed 's/.*\///'` |
cd4d8a96 |
53 | static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)" |
a0d0e21e |
54 | done |
55 | |
2304df62 |
56 | echo "Extracting Makefile (with variable substitutions)" |
655635e8 |
57 | $spitshell >Makefile <<!GROK!THIS! |
a0d0e21e |
58 | # Makefile.SH |
85e6fe83 |
59 | # This file is derived from Makefile.SH. Any changes made here will |
60 | # be lost the next time you run Configure. |
655635e8 |
61 | # Makefile is used to generate $firstmakefile. The only difference |
62 | # is that $firstmakefile has the dependencies filled in at the end. |
2304df62 |
63 | # |
fed7345c |
64 | # |
2304df62 |
65 | # I now supply perly.c with the kits, so don't remake perly.c without byacc |
66 | BYACC = $byacc |
67 | CC = $cc |
232e078e |
68 | LD = $ld |
16d20bd9 |
69 | |
2304df62 |
70 | LDFLAGS = $ldflags |
71 | CLDFLAGS = $ldflags |
85e6fe83 |
72 | |
2304df62 |
73 | SMALL = $small |
74 | LARGE = $large $split |
75 | mallocsrc = $mallocsrc |
76 | mallocobj = $mallocobj |
85e6fe83 |
77 | LNS = $lns |
2304df62 |
78 | RMS = rm -f |
85e6fe83 |
79 | ranlib = $ranlib |
80 | |
16d20bd9 |
81 | # The following are mentioned only to make metaconfig include the |
82 | # appropriate questions in Configure. If you want to change these, |
8e07c86e |
83 | # edit config.sh instead, or specify --man1dir=/wherever on |
16d20bd9 |
84 | # installman commandline. |
85 | bin = $installbin |
86 | scriptdir = $scriptdir |
d96ebe2e |
87 | shrpdir = $archlibexp/CORE |
16d20bd9 |
88 | privlib = $installprivlib |
89 | man1dir = $man1dir |
90 | man1ext = $man1ext |
91 | man3dir = $man3dir |
92 | man3ext = $man3ext |
93 | |
85e6fe83 |
94 | # The following are used to build and install shared libraries for |
95 | # dynamic loading. |
96 | LDDLFLAGS = $lddlflags |
97 | CCDLFLAGS = $ccdlflags |
a0d0e21e |
98 | DLSUFFIX = .$dlext |
ecfc5424 |
99 | PLDLFLAGS = $pldlflags |
d96ebe2e |
100 | LIBPERL = $libperl |
ecfc5424 |
101 | SHRPENV = $shrpenv |
a0d0e21e |
102 | |
103 | dynamic_ext = $dynamic_list |
104 | static_ext = $static_list |
105 | ext = \$(dynamic_ext) \$(static_ext) |
cd4d8a96 |
106 | DYNALOADER = lib/auto/DynaLoader/DynaLoader\$(LIB_EXT) |
2304df62 |
107 | |
108 | libs = $libs $cryptlib |
109 | |
909b3858 |
110 | public = perl $suidperl utilities translators |
2304df62 |
111 | |
112 | shellflags = $shellflags |
113 | |
d96ebe2e |
114 | # This is set to MAKE=$make if your $make command doesn't |
115 | # do it for you. |
116 | $make_set_make |
4633a7c4 |
117 | |
118 | # These variables will be used in a future version to make |
119 | # the make file more portable to non-unix systems. |
120 | AR = $ar |
121 | EXE_EXT = $exe_ext |
122 | LIB_EXT = $lib_ext |
123 | OBJ_EXT = $obj_ext |
124 | PATH_SEP = $path_sep |
125 | |
126 | FIRSTMAKEFILE = $firstmakefile |
127 | |
128 | # Any special object files needed by this architecture, e.g. os2/os2.obj |
129 | ARCHOBJS = $archobjs |
130 | |
cd4d8a96 |
131 | .SUFFIXES: .c \$(OBJ_EXT) |
132 | |
d96ebe2e |
133 | # grrr |
134 | SHELL = $sh |
655635e8 |
135 | |
2304df62 |
136 | !GROK!THIS! |
137 | |
85e6fe83 |
138 | ## In the following dollars and backticks do not need the extra backslash. |
2304df62 |
139 | $spitshell >>Makefile <<'!NO!SUBS!' |
140 | |
d96ebe2e |
141 | CCCMD = `sh $(shellflags) cflags $(LIBPERL) $@` |
2304df62 |
142 | |
fed7345c |
143 | private = preplibrary lib/ExtUtils/Miniperl.pm lib/Config.pm |
2304df62 |
144 | |
4633a7c4 |
145 | # Files to be built with variable substitution before miniperl |
146 | # is available. |
147 | sh = Makefile.SH cflags.SH config_h.SH makeaperl.SH makedepend.SH \ |
148 | makedir.SH perl_exp.SH writemain.SH |
149 | |
150 | shextract = Makefile cflags config.h makeaperl makedepend \ |
655635e8 |
151 | makedir perl.exp writemain |
4633a7c4 |
152 | |
153 | # Files to be built with variable substitution after miniperl is |
154 | # available. Dependencies handled manually below (for now). |
2304df62 |
155 | |
909b3858 |
156 | pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL |
4633a7c4 |
157 | |
909b3858 |
158 | plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text |
4633a7c4 |
159 | |
160 | addedbyconf = UU $(shextract) $(plextract) pstruct |
2304df62 |
161 | |
fed7345c |
162 | h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h |
a0d0e21e |
163 | h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h |
2304df62 |
164 | h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h |
d96ebe2e |
165 | h4 = regexp.h scope.h sv.h unixish.h util.h perlio.h |
2304df62 |
166 | h = $(h1) $(h2) $(h3) $(h4) |
167 | |
a0d0e21e |
168 | c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c |
169 | c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c |
760ac839 |
170 | c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c globals.c perlio.c |
2304df62 |
171 | |
a0d0e21e |
172 | c = $(c1) $(c2) $(c3) miniperlmain.c perlmain.c |
2304df62 |
173 | |
cd4d8a96 |
174 | obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) |
175 | obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) |
760ac839 |
176 | obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) |
655635e8 |
177 | |
4633a7c4 |
178 | obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) |
2304df62 |
179 | |
a0d0e21e |
180 | # Once perl has been Configure'd and built ok you build different |
181 | # perl variants (Debugging, Embedded, Multiplicity etc) by saying: |
d96ebe2e |
182 | # make clean; make LIBPERL=libperl<type>.a |
a0d0e21e |
183 | # where <type> is some combination of 'd' and(or) 'e' or 'm'. |
184 | # See cflags to understand how this works. |
185 | # |
d96ebe2e |
186 | # This mechanism is getting clunky and might not even work any more. |
187 | # EMBEDDING is on by default, and MULTIPLICITY doesn't work. |
188 | # |
a0d0e21e |
189 | |
2304df62 |
190 | lintflags = -hbvxac |
191 | |
cd4d8a96 |
192 | .c$(OBJ_EXT): |
d96ebe2e |
193 | $(CCCMD) $(PLDLFLAGS) $*.c |
2304df62 |
194 | |
655635e8 |
195 | all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext) |
909b3858 |
196 | @echo " "; echo " Everything is up to date." |
197 | |
198 | translators: miniperl lib/Config.pm FORCE |
a0d0e21e |
199 | @echo " "; echo " Making x2p stuff"; cd x2p; $(MAKE) all |
8e07c86e |
200 | |
909b3858 |
201 | utilities: miniperl lib/Config.pm FORCE |
202 | @echo " "; echo " Making utilities"; cd utils; $(MAKE) all |
203 | |
204 | |
16d20bd9 |
205 | # This is now done by installman only if you actually want the man pages. |
206 | # @echo " "; echo " Making docs"; cd pod; $(MAKE) all; |
85e6fe83 |
207 | |
208 | # Phony target to force checking subdirectories. |
e50aee73 |
209 | # Apparently some makes require an action for the FORCE target. |
85e6fe83 |
210 | FORCE: |
4633a7c4 |
211 | @sh -c true |
85e6fe83 |
212 | |
cd4d8a96 |
213 | miniperlmain$(OBJ_EXT): miniperlmain.c |
d96ebe2e |
214 | $(CCCMD) $(PLDLFLAGS) $*.c |
ecfc5424 |
215 | |
655635e8 |
216 | perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE) |
a0d0e21e |
217 | sh writemain $(DYNALOADER) $(static_ext) > tmp |
218 | sh mv-if-diff tmp perlmain.c |
85e6fe83 |
219 | |
cd4d8a96 |
220 | perlmain$(OBJ_EXT): perlmain.c |
d96ebe2e |
221 | $(CCCMD) $(PLDLFLAGS) $*.c |
85e6fe83 |
222 | |
a0d0e21e |
223 | # The file ext.libs is a list of libraries that must be linked in |
224 | # for static extensions, e.g. -lm -lgdbm, etc. The individual |
225 | # static extension Makefile's add to it. |
fed7345c |
226 | ext.libs: $(static_ext) |
a0d0e21e |
227 | -@test -f ext.libs || touch ext.libs |
85e6fe83 |
228 | |
ecfc5424 |
229 | !NO!SUBS! |
599a829f |
230 | |
d96ebe2e |
231 | # How to build libperl. This is still rather convoluted. |
599a829f |
232 | # Load up custom Makefile.SH fragment for shared loading and executables: |
d96ebe2e |
233 | if test -r $osname/Makefile.SHs ; then |
234 | . $osname/Makefile.SHs |
235 | $spitshell >>Makefile <<!GROK!THIS! |
cd4d8a96 |
236 | |
237 | Makefile: $osname/Makefile.SHs |
cd4d8a96 |
238 | !GROK!THIS! |
239 | else |
f0efd8cf |
240 | $spitshell >>Makefile <<'!NO!SUBS!' |
9c9e9f08 |
241 | $(LIBPERL): $& perl$(OBJ_EXT) $(obj) |
242 | !NO!SUBS! |
d96ebe2e |
243 | case "$useshrplib" in |
244 | true) |
245 | $spitshell >>Makefile <<'!NO!SUBS!' |
246 | $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) |
ecfc5424 |
247 | !NO!SUBS! |
d96ebe2e |
248 | ;; |
249 | *) |
250 | $spitshell >>Makefile <<'!NO!SUBS!' |
251 | rm -f $(LIBPERL) |
252 | $(AR) rcu $(LIBPERL) perl$(OBJ_EXT) $(obj) |
253 | @$(ranlib) $(LIBPERL) |
655635e8 |
254 | !NO!SUBS! |
d96ebe2e |
255 | ;; |
256 | esac |
599a829f |
257 | $spitshell >>Makefile <<'!NO!SUBS!' |
258 | |
259 | # How to build executables. |
260 | |
261 | # The $& notation tells Sequent machines that it can do a parallel make, |
262 | # and is harmless otherwise. |
263 | # The miniperl -w -MExporter line is a basic cheap test to catch errors |
264 | # before make goes on to run preplibrary and then MakeMaker on extensions. |
265 | # This is very handy because later errors are often caused by miniperl |
266 | # build problems but that's not obvious to the novice. |
267 | # The Module used here must not depend on Config or any extensions. |
268 | |
269 | miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) |
270 | $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LIBPERL) $(libs) |
271 | @./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest |
272 | |
273 | perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
274 | $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) |
275 | |
276 | pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
277 | purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) |
278 | |
279 | quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
280 | quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) |
2304df62 |
281 | |
282 | # This version, if specified in Configure, does ONLY those scripts which need |
283 | # set-id emulation. Suidperl must be setuid root. It contains the "taint" |
284 | # checks as well as the special code to validate that the script in question |
285 | # has been invoked correctly. |
286 | |
d96ebe2e |
287 | suidperl: $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs |
288 | $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) `cat ext.libs` $(libs) |
2304df62 |
289 | |
599a829f |
290 | !NO!SUBS! |
291 | |
292 | fi |
293 | |
294 | $spitshell >>Makefile <<'!NO!SUBS!' |
295 | |
cd4d8a96 |
296 | sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h) |
2304df62 |
297 | $(RMS) sperl.c |
85e6fe83 |
298 | $(LNS) perl.c sperl.c |
d96ebe2e |
299 | $(CCCMD) -DIAMSUID sperl.c |
2304df62 |
300 | $(RMS) sperl.c |
301 | |
fec02dd3 |
302 | # We have to call our ./makedir because Ultrix 4.3 make can't handle the line |
303 | # test -d lib/auto || mkdir lib/auto |
304 | # |
4633a7c4 |
305 | preplibrary: miniperl lib/Config.pm $(plextract) |
cd4d8a96 |
306 | @sh ./makedir lib/auto |
a0d0e21e |
307 | @echo " AutoSplitting perl library" |
308 | @./miniperl -Ilib -e 'use AutoSplit; \ |
309 | autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm |
2304df62 |
310 | |
75f92628 |
311 | # Take care to avoid modifying lib/Config.pm without reason |
655635e8 |
312 | lib/Config.pm: config.sh miniperl configpm |
75f92628 |
313 | ./miniperl configpm tmp |
314 | sh mv-if-diff tmp lib/Config.pm |
2304df62 |
315 | |
37120919 |
316 | lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.pl lib/Config.pm |
317 | ./miniperl minimod.pl > tmp && mv tmp $@ |
fed7345c |
318 | |
4633a7c4 |
319 | $(plextract): miniperl lib/Config.pm |
320 | ./miniperl -Ilib $@.PL |
321 | |
16d20bd9 |
322 | install: all install.perl install.man |
323 | |
cd4d8a96 |
324 | install.perl: all installperl |
2304df62 |
325 | ./perl installperl |
a0d0e21e |
326 | |
cd4d8a96 |
327 | install.man: all installman |
16d20bd9 |
328 | ./perl installman |
329 | |
330 | # Not implemented yet. |
cd4d8a96 |
331 | #install.html: all installhtml |
16d20bd9 |
332 | # ./perl installhtml |
333 | |
a0d0e21e |
334 | # I now supply perly.c with the kits, so the following section is |
56febc5e |
335 | # used only if you force byacc to run by saying |
336 | # make run_byacc |
337 | # Since we patch up the byacc output, the perly.fixer script needs |
338 | # to run with precisely the same version of byacc as I use. You |
339 | # normally shouldn't remake perly.[ch]. |
340 | |
232e078e |
341 | run_byacc: FORCE |
c07a80fd |
342 | @ echo 'Expect' 130 shift/reduce and 1 reduce/reduce conflict |
56febc5e |
343 | $(BYACC) -d perly.y |
344 | sh $(shellflags) ./perly.fixer y.tab.c perly.c |
55497cff |
345 | sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \ |
346 | -e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c |
347 | echo 'extern YYSTYPE yylval;' >>y.tab.h |
348 | cmp -s y.tab.h perly.h && rm -f y.tab.h || mv y.tab.h perly.h |
4633a7c4 |
349 | - perl vms/vms_yfix.pl perly.c perly.h vms/perly_c.vms vms/perly_h.vms |
56febc5e |
350 | |
351 | # We don't want to regenerate perly.c and perly.h, but they might |
352 | # appear out-of-date after a patch is applied or a new distribution is |
353 | # made. |
354 | perly.c: perly.y |
cd4d8a96 |
355 | -@sh -c true |
56febc5e |
356 | |
357 | perly.h: perly.y |
cd4d8a96 |
358 | -@sh -c true |
a0d0e21e |
359 | |
e50aee73 |
360 | # The following three header files are generated automatically |
361 | # keywords.h: keywords.pl |
362 | # opcode.h: opcode.pl |
363 | # embed.h: embed.pl global.sym interp.sym |
364 | # The correct versions should be already supplied with the perl kit, |
365 | # in case you don't have perl available. |
366 | # To force them to run, type |
367 | # make regen_headers |
368 | regen_headers: FORCE |
369 | perl keywords.pl |
370 | perl opcode.pl |
371 | perl embed.pl |
8e07c86e |
372 | |
a0d0e21e |
373 | # Extensions: |
374 | # Names added to $(dynamic_ext) or $(static_ext) will automatically |
fed7345c |
375 | # get built. There should ordinarily be no need to change any of |
a0d0e21e |
376 | # this part of makefile. |
377 | # |
378 | # The dummy dependency is a place holder in case $(dynamic_ext) or |
379 | # $(static_ext) is empty. |
380 | # |
381 | # DynaLoader may be needed for extensions that use Makefile.PL. |
382 | |
383 | $(DYNALOADER): miniperl preplibrary FORCE |
d96ebe2e |
384 | @sh ext/util/make_ext static $@ LIBPERL_A=$(LIBPERL) |
a0d0e21e |
385 | |
386 | d_dummy $(dynamic_ext): miniperl preplibrary $(DYNALOADER) FORCE |
d96ebe2e |
387 | @sh ext/util/make_ext dynamic $@ LIBPERL_A=$(LIBPERL) |
a0d0e21e |
388 | |
389 | s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE |
d96ebe2e |
390 | @sh ext/util/make_ext static $@ LIBPERL_A=$(LIBPERL) |
2304df62 |
391 | |
392 | clean: |
cd4d8a96 |
393 | rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c |
fed7345c |
394 | rm -f perl.exp ext.libs |
d96ebe2e |
395 | -rm -f perl.export perl.dll perl.libexp perl.map perl.def |
a0d0e21e |
396 | -cd pod; $(MAKE) clean |
909b3858 |
397 | -cd utils; $(MAKE) clean |
398 | -cd x2p; $(MAKE) clean |
75f92628 |
399 | -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \ |
42793c05 |
400 | sh ext/util/make_ext clean $$x ; \ |
a0d0e21e |
401 | done |
d96ebe2e |
402 | rm -f perl suidperl miniperl $(LIBPERL) |
2304df62 |
403 | |
404 | realclean: clean |
4633a7c4 |
405 | -cd os2; rm -f Makefile |
909b3858 |
406 | -cd pod; $(MAKE) realclean |
407 | -cd utils; $(MAKE) realclean |
408 | -cd x2p; $(MAKE) realclean |
8e07c86e |
409 | -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \ |
42793c05 |
410 | sh ext/util/make_ext realclean $$x ; \ |
a0d0e21e |
411 | done |
42793c05 |
412 | rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl |
a0d0e21e |
413 | rm -rf $(addedbyconf) |
cd4d8a96 |
414 | rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old |
fed7345c |
415 | rm -f $(private) |
a0d0e21e |
416 | rm -rf lib/auto |
232e078e |
417 | rm -f lib/.exists |
16d20bd9 |
418 | rm -f h2ph.man pstruct |
a0d0e21e |
419 | rm -rf .config |
75f92628 |
420 | @echo "Note that make realclean does not delete config.sh" |
2304df62 |
421 | |
ecfc5424 |
422 | clobber: realclean |
423 | rm -f config.sh cppstdin |
fed7345c |
424 | |
ecfc5424 |
425 | distclean: clobber |
426 | |
2304df62 |
427 | # The following lint has practically everything turned on. Unfortunately, |
428 | # you have to wade through a lot of mumbo jumbo that can't be suppressed. |
429 | # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message |
430 | # for that spot. |
431 | |
432 | lint: perly.c $(c) |
433 | lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz |
434 | |
cd4d8a96 |
435 | # Need to unset during recursion to go out of loop |
436 | |
437 | MAKEDEPEND = makedepend |
438 | |
439 | $(FIRSTMAKEFILE): Makefile $(MAKEDEPEND) |
440 | $(MAKE) depend MAKEDEPEND= |
a0d0e21e |
441 | |
599a829f |
442 | config.h: config_h.SH config.sh |
655635e8 |
443 | $(SHELL) config_h.SH |
444 | |
445 | perl.exp: perl_exp.SH config.sh |
446 | $(SHELL) perl_exp.SH |
75f92628 |
447 | |
a0d0e21e |
448 | # When done, touch perlmain.c so that it doesn't get remade each time. |
2304df62 |
449 | depend: makedepend |
cd4d8a96 |
450 | sh ./makedepend |
a0d0e21e |
451 | - test -s perlmain.c && touch perlmain.c |
2304df62 |
452 | cd x2p; $(MAKE) depend |
453 | |
cd4d8a96 |
454 | # Cannot postpone this until $firstmakefile is ready ;-) |
455 | makedepend: makedepend.SH config.sh |
456 | sh ./makedepend.SH |
457 | |
d96ebe2e |
458 | check test: miniperl perl preplibrary $(dynamic_ext) |
cd4d8a96 |
459 | - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST </dev/tty |
2304df62 |
460 | |
d96ebe2e |
461 | # Can't depend on lib/Config.pm because that might be where miniperl |
462 | # is crashing. |
599a829f |
463 | minitest: miniperl |
d96ebe2e |
464 | @echo "You may see some irrelevant test failures if you have been unable" |
465 | @echo "to build lib/Config.pm." |
cd4d8a96 |
466 | - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \ |
16d20bd9 |
467 | && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty |
468 | |
85e6fe83 |
469 | clist: $(c) |
2304df62 |
470 | echo $(c) | tr ' ' '\012' >.clist |
471 | |
85e6fe83 |
472 | hlist: $(h) |
2304df62 |
473 | echo $(h) | tr ' ' '\012' >.hlist |
474 | |
85e6fe83 |
475 | shlist: $(sh) |
2304df62 |
476 | echo $(sh) | tr ' ' '\012' >.shlist |
477 | |
4633a7c4 |
478 | pllist: $(pl) |
479 | echo $(pl) | tr ' ' '\012' >.pllist |
480 | |
599a829f |
481 | Makefile: Makefile.SH ./config.sh |
760ac839 |
482 | $(SHELL) Makefile.SH |
483 | |
599a829f |
484 | distcheck: FORCE |
760ac839 |
485 | perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()' |
486 | |
2304df62 |
487 | # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
488 | # If this runs make out of memory, delete /usr/include lines. |
489 | !NO!SUBS! |
490 | |
85e6fe83 |
491 | $eunicefix Makefile |
2304df62 |
492 | case `pwd` in |
493 | *SH) |
85e6fe83 |
494 | $rm -f ../Makefile |
cd4d8a96 |
495 | $ln Makefile ../Makefile |
2304df62 |
496 | ;; |
497 | esac |
cd4d8a96 |
498 | $rm -f $firstmakefile |