Mercurial > repo
comparison perl-5.22.2/Makefile.SH @ 8045:a16537d2fe07
<xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
author | HackBot |
---|---|
date | Sat, 14 May 2016 14:54:38 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
8044:711c038a7dce | 8045:a16537d2fe07 |
---|---|
1 #!/bin/sh | |
2 | |
3 # quote() - Creates a shell literal | |
4 # Usage: echo "...` quote "..." `..." | |
5 quote() { | |
6 case "$1" in | |
7 '') echo "''" ;; | |
8 *) echo "$1" | sed 's/\([^a-zA-Z0-9.:_\-\/]\)/\\\1/g' ;; | |
9 esac | |
10 } | |
11 | |
12 case $PERL_CONFIG_SH in | |
13 '') | |
14 if test -f config.sh | |
15 then TOP=. | |
16 else | |
17 echo "Can't find config.sh."; exit 1 | |
18 fi | |
19 . $TOP/config.sh | |
20 ;; | |
21 esac | |
22 | |
23 Makefile=Makefile | |
24 | |
25 : This forces SH files to create target in same directory as SH file. | |
26 : This is so that make depend always knows where to find SH derivatives. | |
27 case "$0" in | |
28 */*) cd `expr X$0 : 'X\(.*\)/'` ;; | |
29 esac | |
30 | |
31 pwd="`pwd`" | |
32 linklibperl='$(LIBPERL)' | |
33 linklibperl_nonshr='' | |
34 shrpldflags='$(LDDLFLAGS)' | |
35 ldlibpth='' | |
36 DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB' | |
37 DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL' | |
38 case "$useshrplib" in | |
39 true) | |
40 # Prefix all runs of 'miniperl' and 'perl' with | |
41 # $ldlibpth so that ./perl finds *this* shared libperl. | |
42 case "$LD_LIBRARY_PATH" in | |
43 '') ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `" ;; | |
44 *) ldlibpth="LD_LIBRARY_PATH=` quote "$pwd" `:` quote "$LD_LIBRARY_PATH" `" ;; | |
45 esac | |
46 | |
47 pldlflags="$cccdlflags" | |
48 static_ldflags='' | |
49 case "${osname}${osvers}" in | |
50 next4*) | |
51 ld=libtool | |
52 lddlflags="-dynamic -undefined warning -framework System \ | |
53 -compatibility_version 1 -current_version $patchlevel \ | |
54 -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@" | |
55 ;; | |
56 darwin*) | |
57 shrpldflags="${ldflags} -dynamiclib \ | |
58 -compatibility_version \ | |
59 ${api_revision}.${api_version}.${api_subversion} \ | |
60 -current_version \ | |
61 ${revision}.${patchlevel}.${subversion} \ | |
62 -install_name \$(shrpdir)/\$@" | |
63 ;; | |
64 cygwin*) | |
65 shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000" | |
66 linklibperl="-L. -lperl" | |
67 ;; | |
68 sunos*) | |
69 linklibperl="-lperl" | |
70 ;; | |
71 netbsd*|freebsd[234]*|openbsd*|dragonfly*|bitrig*) | |
72 linklibperl="-L. -lperl" | |
73 ;; | |
74 interix*) | |
75 linklibperl="-L. -lperl" | |
76 shrpldflags="$shrpldflags -Wl,--image-base,0x57000000" | |
77 ;; | |
78 aix*) | |
79 case "$cc" in | |
80 gcc*) | |
81 shrpldflags="-shared -Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bE:perl.exp" | |
82 case "$osvers" in | |
83 3*) shrpldflags="$shrpldflags -e _nostart" | |
84 ;; | |
85 *) shrpldflags="$shrpldflags -Wl,-bnoentry" | |
86 ;; | |
87 esac | |
88 shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib" | |
89 linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl" | |
90 linklibperl_nonshr='-lperl_nonshr' | |
91 ;; | |
92 *) | |
93 shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp" | |
94 case "$osvers" in | |
95 3*) shrpldflags="$shrpldflags -e _nostart" | |
96 ;; | |
97 *) shrpldflags="$shrpldflags -b noentry" | |
98 ;; | |
99 esac | |
100 shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib" | |
101 linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl" | |
102 linklibperl_nonshr='-lperl_nonshr' | |
103 ;; | |
104 esac | |
105 ;; | |
106 hpux*) | |
107 linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl" | |
108 ;; | |
109 os390*) | |
110 shrpldflags='-W l,XPLINK,dll' | |
111 linklibperl='libperl.x' | |
112 DPERL_EXTERNAL_GLOB='' | |
113 ;; | |
114 esac | |
115 case "$ldlibpthname" in | |
116 '') ;; | |
117 *) | |
118 case "$osname" in | |
119 os2) | |
120 ldlibpth='' | |
121 ;; | |
122 *) | |
123 eval "ldlibpthval=\"\$$ldlibpthname\"" | |
124 | |
125 case "$ldlibpthval" in | |
126 '') ldlibpth="$ldlibpthname=` quote "$pwd" `" ;; | |
127 *) ldlibpth="$ldlibpthname=` quote "$pwd" `:` quote "$ldlibpthval" `" ;; | |
128 esac | |
129 | |
130 ;; | |
131 esac | |
132 | |
133 ;; | |
134 esac | |
135 | |
136 case "$osname" in | |
137 linux) | |
138 # If there is a pre-existing $libperl from a previous | |
139 # installation, Linux needs to use LD_PRELOAD to | |
140 # override the LD_LIBRARY_PATH setting. See the | |
141 # INSTALL file, under "Building a shared perl library". | |
142 # If there is no pre-existing $libperl, we don't need | |
143 # to do anything further. | |
144 if test -f $archlib/CORE/$libperl; then | |
145 rm -f preload | |
146 cat <<'EOT' > preload | |
147 #! /bin/sh | |
148 lib=$1 | |
149 shift | |
150 test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD" | |
151 exec "$@" | |
152 EOT | |
153 chmod 755 preload | |
154 ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl" | |
155 fi | |
156 ;; | |
157 os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth" | |
158 ;; | |
159 esac | |
160 | |
161 ;; | |
162 | |
163 *) pldlflags='' | |
164 static_ldflags='CCCDLFLAGS=' | |
165 ;; | |
166 esac | |
167 | |
168 : is Cwd static or dynamic | |
169 static_cwd='define' | |
170 list_util_dep='$(PERL_EXE)' | |
171 for f in $dynamic_ext; do | |
172 case $f in | |
173 Cwd) static_cwd='undef' ;; | |
174 List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext | |
175 esac | |
176 done | |
177 | |
178 : Prepare dependency lists for Makefile. | |
179 dynamic_list=' ' | |
180 dynamic_ext_re="lib/auto/re/re.$dlext" | |
181 extra_dep=' | |
182 ext/Pod-Functions/pm_to_blib: cpan/Pod-Simple/pm_to_blib cpan/Pod-Escapes/pm_to_blib pod/perlfunc.pod | |
183 ' | |
184 for f in $dynamic_ext; do | |
185 : the dependency named here will never exist | |
186 base=`echo "$f" | sed 's/.*\///'` | |
187 this_target="lib/auto/$f/$base.$dlext" | |
188 dynamic_list="$dynamic_list $this_target" | |
189 | |
190 : Parallel makes reveal that we have some interdependencies | |
191 case $f in | |
192 Math/BigInt/FastCalc|Devel/NYTProf) extra_dep="$extra_dep | |
193 $this_target: $list_util_dep" ;; | |
194 Unicode/Normalize) extra_dep="$extra_dep | |
195 $this_target: uni.data" ;; | |
196 esac | |
197 done | |
198 | |
199 static_list=' ' | |
200 for f in $static_ext; do | |
201 base=`echo "$f" | sed 's/.*\///'` | |
202 static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)" | |
203 : Parallel makes reveal that we have some interdependencies | |
204 this_target="lib/auto/$f/$base\$(LIB_EXT)" | |
205 case $f in | |
206 Math/BigInt/FastCalc|Devel/NYTProf) extra_dep="$extra_dep | |
207 $this_target: lib/auto/List/Util/Util\$(LIB_EXT)" ;; | |
208 Unicode/Normalize) extra_dep="$extra_dep | |
209 $this_target: uni.data" ;; | |
210 esac | |
211 done | |
212 | |
213 nonxs_list=' ' | |
214 for f in $nonxs_ext; do | |
215 p=`echo "$f" | tr / -` | |
216 for d in ext dist cpan; do | |
217 if test -d $d/$p; then | |
218 nonxs_list="$nonxs_list $d/$p/pm_to_blib" | |
219 fi | |
220 done | |
221 done | |
222 | |
223 dtrace_h='' | |
224 dtrace_o='' | |
225 minidtrace_o='' | |
226 case "$usedtrace" in | |
227 define|true) | |
228 dtrace_h='perldtrace.h' | |
229 case "$dtraceobject" in | |
230 define) | |
231 dtrace_o='perldtrace$(OBJ_EXT)' | |
232 minidtrace_o='miniperldtrace$(OBJ_EXT)' | |
233 ;; | |
234 esac | |
235 ;; | |
236 esac | |
237 | |
238 echo "Extracting $Makefile (with variable substitutions)" | |
239 $spitshell >$Makefile <<!GROK!THIS! | |
240 # $Makefile | |
241 # This file is derived from Makefile.SH. Any changes made here will | |
242 # be lost the next time you run Configure. | |
243 # Makefile is used to generate $firstmakefile. The only difference | |
244 # is that $firstmakefile has the dependencies filled in at the end. | |
245 | |
246 CC = $cc | |
247 LD = $ld | |
248 | |
249 LDFLAGS = $ldflags | |
250 CLDFLAGS = $ldflags | |
251 | |
252 mallocsrc = $mallocsrc | |
253 mallocobj = $mallocobj | |
254 LNS = $lns | |
255 # NOTE: some systems don't grok "cp -f". XXX Configure test needed? | |
256 CPS = $cp | |
257 RMS = rm -f | |
258 ranlib = $ranlib | |
259 | |
260 # The following are mentioned only to make metaconfig include the | |
261 # appropriate questions in Configure. If you want to change these, | |
262 # edit config.sh instead, or specify --man1dir=/wherever on | |
263 # installman commandline. | |
264 bin = $installbin | |
265 scriptdir = $scriptdir | |
266 shrpdir = $archlibexp/CORE | |
267 privlib = $installprivlib | |
268 man1dir = $man1dir | |
269 man1ext = $man1ext | |
270 man3dir = $man3dir | |
271 man3ext = $man3ext | |
272 | |
273 # The following are used to build and install shared libraries for | |
274 # dynamic loading. | |
275 LDDLFLAGS = $lddlflags | |
276 SHRPLDFLAGS = $shrpldflags | |
277 CCDLFLAGS = $ccdlflags | |
278 DLSUFFIX = .$dlext | |
279 PLDLFLAGS = $pldlflags | |
280 LIBPERL = $libperl | |
281 LLIBPERL= $linklibperl | |
282 LLIBPERL_NONSHR= $linklibperl_nonshr | |
283 SHRPENV = $shrpenv | |
284 | |
285 # Static targets are ordinarily built without CCCDLFLAGS. However, | |
286 # if building a shared libperl.so that might later be linked into | |
287 # another application, then it might be appropriate to also build static | |
288 # extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC | |
289 # for GNU cc). | |
290 STATIC_LDFLAGS = $static_ldflags | |
291 | |
292 # The following is used to include the current directory in | |
293 # the dynamic loader path you are building a shared libperl. | |
294 LDLIBPTH = $ldlibpth | |
295 | |
296 # Sometimes running an executable is an adventure. | |
297 RUN = | |
298 | |
299 # When cross-compiling we want to use a (mini)perl built for the host, not the target | |
300 HOST_PERL = $hostperl | |
301 HOST_GENERATE = $hostgenerate | |
302 SYSTEM_PERL = $perl | |
303 | |
304 # These variables may need to be manually set for non-Unix systems. | |
305 AR = $full_ar | |
306 HOST_EXE_EXT = $_exe | |
307 EXE_EXT = $_exe | |
308 LIB_EXT = $_a | |
309 OBJ_EXT = $_o | |
310 PATH_SEP = $p_ | |
311 | |
312 # Macros to invoke a copy of miniperl during the build. Targets which | |
313 # are built using these macros should depend on \$(MINIPERL_EXE) | |
314 MINIPERL_EXE = miniperl\$(EXE_EXT) | |
315 MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib | |
316 | |
317 # Macros to invoke sort the MANIFEST during build | |
318 MANIFEST_SRT = MANIFEST.srt | |
319 | |
320 !GROK!THIS! | |
321 | |
322 case "$usecrosscompile$perl" in | |
323 define?*) | |
324 $spitshell >>$Makefile <<!GROK!THIS! | |
325 # Macros to invoke a copy of our fully operational perl during the build. | |
326 PERL_EXE = perl\$(EXE_EXT) | |
327 RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT) | |
328 !GROK!THIS! | |
329 ;; | |
330 *) | |
331 $spitshell >>$Makefile <<!GROK!THIS! | |
332 # Macros to invoke a copy of our fully operational perl during the build. | |
333 PERL_EXE = perl\$(EXE_EXT) | |
334 RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib | |
335 !GROK!THIS! | |
336 ;; | |
337 esac | |
338 | |
339 $spitshell >>$Makefile <<!GROK!THIS! | |
340 # Macros to run our tests | |
341 RUN_TESTS = \$(LDLIBPTH) ./runtests | |
342 | |
343 dynamic_ext = $dynamic_list | |
344 dynamic_ext_re = $dynamic_ext_re | |
345 static_ext = $static_list | |
346 nonxs_ext = $nonxs_list | |
347 ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext) | |
348 DYNALOADER = DynaLoader\$(OBJ_EXT) | |
349 | |
350 libs = $perllibs $cryptlib | |
351 | |
352 public = \$(PERL_EXE) utilities | |
353 | |
354 shellflags = $shellflags | |
355 | |
356 # This is set to MAKE=$make if your $make command doesn't | |
357 # do it for you. | |
358 $make_set_make | |
359 | |
360 # Mention $gmake here so it gets probed for by Configure. | |
361 | |
362 !GROK!THIS! | |
363 | |
364 case "${osname}" in | |
365 linux*|darwin) | |
366 $spitshell >>$Makefile <<!GROK!THIS! | |
367 # If you're going to use valgrind and it can't be invoked as plain valgrind | |
368 # then you'll need to change this, or override it on the make command line. | |
369 VALGRIND ?= valgrind | |
370 VG_TEST ?= ./perl -e 1 2>/dev/null | |
371 | |
372 !GROK!THIS! | |
373 ;; | |
374 esac | |
375 | |
376 $spitshell >>$Makefile <<!GROK!THIS! | |
377 DTRACE = $dtrace | |
378 DTRACE_H = $dtrace_h | |
379 DTRACE_O = $dtrace_o | |
380 MINIDTRACE_O = $minidtrace_o | |
381 | |
382 FIRSTMAKEFILE = $firstmakefile | |
383 | |
384 # Any special object files needed by this architecture, e.g. os2/os2.obj | |
385 ARCHOBJS = $archobjs | |
386 | |
387 .SUFFIXES: .c \$(OBJ_EXT) .i .s | |
388 | |
389 # grrr | |
390 SHELL = $sh | |
391 | |
392 # how to tr(anslate) newlines | |
393 TRNL = '$trnl' | |
394 | |
395 OPTIMIZE = $optimize | |
396 | |
397 EXTRAS = $extras | |
398 | |
399 INSTALLPREFIXEXP = $prefix | |
400 | |
401 !GROK!THIS! | |
402 # not used by Makefile but by installperl; | |
403 # mentioned here so that metaconfig picks these up | |
404 # $installusrbinperl | |
405 # $versiononly | |
406 | |
407 case "${osname}:${osvers}" in | |
408 darwin:*) | |
409 $spitshell >>$Makefile <<EOF | |
410 | |
411 # Your locales are broken (osname $osname, osvers $osvers) | |
412 # and to avoid the numerous | |
413 # perl: warning: Setting locale failed. | |
414 # warnings during the build process we reset the locale variables. | |
415 | |
416 LC_ALL=C | |
417 LANG=C | |
418 LANGUAGE=C | |
419 EOF | |
420 ;; | |
421 esac | |
422 | |
423 ## In the following dollars and backticks do not need the extra backslash. | |
424 $spitshell >>$Makefile <<'!NO!SUBS!' | |
425 | |
426 CCCMD = sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $@ | |
427 | |
428 CCCMDSRC = sh $(shellflags) cflags "optimize='$(OPTIMIZE)'" $< | |
429 | |
430 CONFIGPM_FROM_CONFIG_SH = lib/Config.pm lib/Config_heavy.pl | |
431 CONFIGPM = $(CONFIGPM_FROM_CONFIG_SH) lib/Config_git.pl | |
432 | |
433 CONFIGPOD = lib/Config.pod | |
434 | |
435 CONFIGH = config.h | |
436 !NO!SUBS! | |
437 | |
438 SH_to_target() { | |
439 echo $@ | sed -e s/\\\.SH//g -e s/_/./g | |
440 } | |
441 | |
442 SH='Makefile.SH cflags.SH config_h.SH makedepend.SH myconfig.SH runtests.SH pod/Makefile.SH' | |
443 shextract=`SH_to_target $SH` | |
444 | |
445 ## In the following dollars and backticks do not need the extra backslash. | |
446 $spitshell >>$Makefile <<!GROK!THIS! | |
447 | |
448 private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) git_version.h lib/buildcustomize.pl | |
449 | |
450 # Files to be built with variable substitution before miniperl | |
451 # is available. | |
452 sh = $SH | |
453 | |
454 shextract = $shextract | |
455 !GROK!THIS! | |
456 | |
457 ## In the following dollars and backticks do not need the extra backslash. | |
458 $spitshell >>$Makefile <<'!NO!SUBS!' | |
459 | |
460 addedbyconf = UU $(shextract) pstruct | |
461 | |
462 # Unicode data files generated by mktables | |
463 unidatafiles = lib/unicore/Decomposition.pl lib/unicore/TestProp.pl \ | |
464 lib/unicore/CombiningClass.pl lib/unicore/Name.pl \ | |
465 lib/unicore/UCD.pl lib/unicore/Name.pm \ | |
466 lib/unicore/Heavy.pl lib/unicore/mktables.lst | |
467 | |
468 # Directories of Unicode data files generated by mktables | |
469 unidatadirs = lib/unicore/To lib/unicore/lib | |
470 | |
471 h1 = EXTERN.h INTERN.h XSUB.h av.h $(CONFIGH) cop.h cv.h dosish.h | |
472 h2 = embed.h form.h gv.h handy.h hv.h hv_func.h keywords.h mg.h op.h opcode.h | |
473 h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h | |
474 h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h | |
475 h5 = utf8.h warnings.h mydtrace.h op_reg_common.h l1_char_class_tab.h | |
476 h6 = charclass_invlists.h | |
477 h = $(h1) $(h2) $(h3) $(h4) $(h5) $(h6) | |
478 | |
479 c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro_core.c perl.c | |
480 c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c | |
481 c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c keywords.c | |
482 c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c caretx.c | |
483 c5 = $(mallocsrc) | |
484 | |
485 c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c opmini.c perlmini.c | |
486 | |
487 obj0 = op$(OBJ_EXT) perl$(OBJ_EXT) | |
488 obj0mini = perlmini$(OBJ_EXT) opmini$(OBJ_EXT) miniperlmain$(OBJ_EXT) | |
489 obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro_core$(OBJ_EXT) keywords$(OBJ_EXT) | |
490 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) | |
491 obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) caretx$(OBJ_EXT) | |
492 | |
493 minindt_obj = $(obj0mini) $(obj1) $(obj2) $(obj3) $(ARCHOBJS) | |
494 mini_obj = $(minindt_obj) $(MINIDTRACE_O) | |
495 ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS) | |
496 obj = $(ndt_obj) $(DTRACE_O) | |
497 | |
498 perltoc_pod_prereqs = extra.pods pod/perl5222delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod | |
499 generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs) | |
500 generated_headers = uudmap.h bitcount.h mg_data.h | |
501 | |
502 lintflags = \ | |
503 -b \ | |
504 -n \ | |
505 -p \ | |
506 -Ncheck=%all \ | |
507 -Nlevel=4 \ | |
508 -errchk=parentheses \ | |
509 -errhdr=%all \ | |
510 -errfmt=src \ | |
511 -errtags \ | |
512 -erroff=E_ASSIGN_NARROW_CONV \ | |
513 -erroff=E_BAD_PTR_CAST \ | |
514 -erroff=E_BAD_PTR_CAST_ALIGN \ | |
515 -erroff=E_BAD_PTR_INT_COMBINATION \ | |
516 -erroff=E_BAD_SIGN_EXTEND \ | |
517 -erroff=E_BLOCK_DECL_UNUSED \ | |
518 -erroff=E_CASE_FALLTHRU \ | |
519 -erroff=E_CONST_EXPR \ | |
520 -erroff=E_CONSTANT_CONDITION \ | |
521 -erroff=E_END_OF_LOOP_CODE_NOT_REACHED \ | |
522 -erroff=E_EQUALITY_NOT_ASSIGNMENT \ | |
523 -erroff=E_EXPR_NULL_EFFECT \ | |
524 -erroff=E_FALSE_LOGICAL_EXPR \ | |
525 -erroff=E_INCL_NUSD \ | |
526 -erroff=E_LOOP_EMPTY \ | |
527 -erroff=E_MAIN_PARAM \ | |
528 -erroff=E_POINTER_TO_OBJECT \ | |
529 -erroff=E_PTRDIFF_OVERFLOW \ | |
530 -erroff=E_SHIFT_CNT_NEG_TOO_BIG_L \ | |
531 -erroff=E_STATIC_UNUSED \ | |
532 -erroff=E_TRUE_LOGICAL_EXPR | |
533 | |
534 splintflags = \ | |
535 -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include/ \ | |
536 -D__builtin_va_list=va_list \ | |
537 -Dsigjmp_buf=jmp_buf \ | |
538 -warnposix \ | |
539 \ | |
540 +boolint \ | |
541 +charintliteral \ | |
542 -fixedformalarray \ | |
543 -mustfreefresh \ | |
544 -nestedextern \ | |
545 -predboolint \ | |
546 -predboolothers \ | |
547 -preproc \ | |
548 -boolops \ | |
549 -shadow \ | |
550 -nullstate \ | |
551 +longintegral \ | |
552 +matchanyintegral \ | |
553 -type \ | |
554 \ | |
555 +line-len 999 \ | |
556 +weak | |
557 | |
558 splintfiles = $(c1) | |
559 | |
560 .c$(OBJ_EXT): | |
561 @echo `$(CCCMD)` $(PLDLFLAGS) $*.c | |
562 @`$(CCCMD)` $(PLDLFLAGS) $*.c | |
563 | |
564 .c.i: perl.h config.h | |
565 @echo `$(CCCMDSRC)` -E $*.c \> $*.i | |
566 @`$(CCCMDSRC)` -E $*.c > $*.i | |
567 | |
568 .c.s: perl.h config.h | |
569 @echo `$(CCCMDSRC)` -S $*.c | |
570 @`$(CCCMDSRC)` -S $*.c | |
571 | |
572 all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT) | |
573 @echo " "; | |
574 @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." | |
575 | |
576 $(MANIFEST_SRT): MANIFEST $(PERL_EXE) | |
577 @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \ | |
578 $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true) | |
579 @touch $(MANIFEST_SRT) | |
580 | |
581 .PHONY: all utilities | |
582 | |
583 # Both git_version.h and lib/Config_git.pl are built | |
584 # by make_patchnum.pl. | |
585 git_version.h: lib/Config_git.pl | |
586 | |
587 lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl | |
588 $(MINIPERL) make_patchnum.pl | |
589 | |
590 # make sure that we recompile perl.c if the git version changes | |
591 perl$(OBJ_EXT): git_version.h | |
592 | |
593 !NO!SUBS! | |
594 | |
595 # Making utilities requires Cwd. If we have dynamic | |
596 # loading, we only need miniperl and Cwd.$dlext. If we have static | |
597 # loading, we need to build perl first. | |
598 case "$usedl$static_cwd" in | |
599 defineundef) | |
600 util_deps='$(MINIPERL_EXE) $(CONFIGPM) lib/auto/Cwd/Cwd$(DLSUFFIX) FORCE' | |
601 ;; | |
602 definedefine) | |
603 util_deps='$(PERL_EXE) $(CONFIGPM) FORCE' | |
604 ;; | |
605 *) util_deps='$(PERL_EXE) $(CONFIGPM) FORCE' | |
606 ;; | |
607 esac | |
608 | |
609 $spitshell >>$Makefile <<!GROK!THIS! | |
610 utils/Makefile: \$(MINIPERL_EXE) \$(CONFIGPM) utils/Makefile.PL | |
611 \$(MINIPERL) -Ilib utils/Makefile.PL | |
612 | |
613 utilities: utils/Makefile $util_deps | |
614 @echo " "; echo " Making utilities"; cd utils; \$(LDLIBPTH) \$(MAKE) all | |
615 | |
616 !GROK!THIS! | |
617 | |
618 $spitshell >>$Makefile <<'!NO!SUBS!' | |
619 | |
620 # This is now done by installman only if you actually want the man pages. | |
621 # @echo " "; echo " Making docs"; cd pod; $(MAKE) all; | |
622 | |
623 # Phony target to force checking subdirectories. | |
624 # Apparently some makes require an action for the FORCE target. | |
625 .PHONY: FORCE | |
626 FORCE: | |
627 @sh -c true | |
628 !NO!SUBS! | |
629 | |
630 for file in op perl; do | |
631 if $issymlink $file.c; then | |
632 $spitshell >>$Makefile <<!GROK!THIS! | |
633 | |
634 # We do a copy of the $file.c instead of a symlink because gcc gets huffy | |
635 # if we have a symlink forest to another disk (it complains about too many | |
636 # levels of symbolic links, even if we have only two) | |
637 | |
638 ${file}mini.c: $file.c | |
639 \$(RMS) ${file}mini.c | |
640 \$(CPS) ${file}.c ${file}mini.c | |
641 !GROK!THIS! | |
642 else | |
643 $spitshell >>$Makefile <<!GROK!THIS! | |
644 | |
645 ${file}mini.c: $file.c | |
646 \$(RMS) ${file}mini.c | |
647 \$(LNS) ${file}.c ${file}mini.c | |
648 !GROK!THIS! | |
649 fi | |
650 | |
651 $spitshell >>$Makefile <<!GROK!THIS! | |
652 | |
653 ${file}mini\$(OBJ_EXT): ${file}mini.c | |
654 echo @\`\$(CCCMD)\` \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c | |
655 @\`\$(CCCMD)\` \$(PLDLFLAGS) $DPERL_IS_MINIPERL $DPERL_EXTERNAL_GLOB ${file}mini.c | |
656 !GROK!THIS! | |
657 done | |
658 | |
659 $spitshell >>$Makefile <<'!NO!SUBS!' | |
660 | |
661 globals$(OBJ_EXT): $(generated_headers) | |
662 | |
663 uudmap.h mg_data.h: bitcount.h | |
664 | |
665 generate_uudmap$(OBJ_EXT): mg_raw.h | |
666 | |
667 !NO!SUBS! | |
668 | |
669 # If hostgerenate isn't defined, then we have to build | |
670 # generate_uudmap and run it. This can potentially mean running | |
671 # it on the target system if we're cross-compiling. | |
672 # If it is defined, then we just run it locally. | |
673 case "$hostgenerate" in | |
674 ''|'undef') | |
675 $spitshell >>$Makefile <<!GROK!THIS! | |
676 bitcount.h: generate_uudmap\$(HOST_EXE_EXT) | |
677 $run ./generate_uudmap\$(HOST_EXE_EXT) \$(generated_headers) | |
678 -@for f in \$(generated_headers); do \\ | |
679 $from \$\$f; \\ | |
680 done | |
681 | |
682 !GROK!THIS! | |
683 | |
684 $spitshell >>$Makefile <<'!NO!SUBS!' | |
685 generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) | |
686 $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs) | |
687 | |
688 !NO!SUBS! | |
689 ;; | |
690 *) | |
691 $spitshell >>$Makefile <<'!NO!SUBS!' | |
692 bitcount.h: generate_uudmap$(HOST_EXE_EXT) | |
693 ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers) | |
694 | |
695 generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) | |
696 -@rm generate_uudmap$(HOST_EXE_EXT) | |
697 $(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT) | |
698 | |
699 !NO!SUBS! | |
700 ;; | |
701 esac | |
702 | |
703 | |
704 $spitshell >>$Makefile <<'!NO!SUBS!' | |
705 perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib | |
706 $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext) | |
707 | |
708 # The file ext.libs is a list of libraries that must be linked in | |
709 # for static extensions, e.g. -lm -lgdbm, etc. The individual | |
710 # static extension Makefile's add to it. | |
711 ext.libs: $(static_ext) | |
712 -@test -f ext.libs || touch ext.libs | |
713 | |
714 !NO!SUBS! | |
715 | |
716 # How to build libperl. This is still rather convoluted. | |
717 # Load up custom Makefile.SH fragment for shared loading and executables: | |
718 case "$osname" in | |
719 *) | |
720 Makefile_s="$osname/Makefile.SHs" | |
721 ;; | |
722 esac | |
723 | |
724 case "$osname" in | |
725 aix) | |
726 $spitshell >>$Makefile <<!GROK!THIS! | |
727 LIBS = $perllibs | |
728 # In AIX we need to change this for building Perl itself from | |
729 # its earlier definition (which is for building external | |
730 # extensions *after* Perl has been built and installed) | |
731 CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'` | |
732 | |
733 !GROK!THIS! | |
734 case "$useshrplib" in | |
735 define|true|[yY]*) | |
736 $spitshell >>$Makefile <<'!NO!SUBS!' | |
737 | |
738 LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT) | |
739 MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT) | |
740 | |
741 $(LIBPERL_NONSHR): $(obj) | |
742 $(RMS) $(LIBPERL_NONSHR) | |
743 $(AR) rcu $(LIBPERL_NONSHR) $(obj) | |
744 | |
745 $(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) | |
746 $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \ | |
747 opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS) | |
748 | |
749 MINIPERLEXP = $(MINIPERL_NONSHR) | |
750 | |
751 LIBPERLEXPORT = perl.exp | |
752 | |
753 !NO!SUBS! | |
754 | |
755 ;; | |
756 *) | |
757 $spitshell >>$Makefile <<'!NO!SUBS!' | |
758 MINIPERLEXP = $(MINIPERL_EXE) | |
759 | |
760 PERLEXPORT = perl.exp | |
761 | |
762 !NO!SUBS! | |
763 ;; | |
764 esac | |
765 $spitshell >>$Makefile <<'!NO!SUBS!' | |
766 perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) | |
767 ./$(MINIPERLEXP) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp | |
768 | |
769 !NO!SUBS! | |
770 ;; | |
771 os2) | |
772 $spitshell >>$Makefile <<'!NO!SUBS!' | |
773 MINIPERLEXP = miniperl | |
774 | |
775 perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map | |
776 ./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def | |
777 | |
778 !NO!SUBS! | |
779 ;; | |
780 cygwin) | |
781 $spitshell >>$Makefile <<'!NO!SUBS!' | |
782 cygwin.c: cygwin/cygwin.c | |
783 $(LNS) cygwin/cygwin.c | |
784 | |
785 LIBPERL_NONSHR = libperl$(LIB_EXT) | |
786 | |
787 $(LIBPERL_NONSHR): $(obj) | |
788 $(RMS) $(LIBPERL_NONSHR) | |
789 $(AR) rcu $(LIBPERL_NONSHR) $(obj) | |
790 | |
791 !NO!SUBS! | |
792 ;; | |
793 esac | |
794 | |
795 if test -s $Makefile_s ; then | |
796 . $Makefile_s | |
797 $spitshell >>$Makefile <<!GROK!THIS! | |
798 | |
799 Makefile: $Makefile_s | |
800 !GROK!THIS! | |
801 else | |
802 case "$dtrace_h" in | |
803 ?*) | |
804 $spitshell >>$Makefile <<'!NO!SUBS!' | |
805 # dtrace dicards const qualifiers from arguments, put them back | |
806 $(DTRACE_H): perldtrace.d | |
807 $(DTRACE) -h -s perldtrace.d -o $(DTRACE_H).in | |
808 sed -e '/const/!s/char \*/const char */g' $(DTRACE_H).in >$(DTRACE_H) | |
809 $(RMS) $(DTRACE_H).in | |
810 | |
811 mydtrace.h: $(DTRACE_H) | |
812 | |
813 !NO!SUBS! | |
814 ;; | |
815 esac | |
816 case "$dtrace_o" in | |
817 ?*) | |
818 $spitshell >>$Makefile <<'!NO!SUBS!' | |
819 $(DTRACE_O): perldtrace.d $(ndt_obj) | |
820 $(DTRACE) -G -s perldtrace.d -o $(DTRACE_O) $(ndt_obj) | |
821 | |
822 $(MINIDTRACE_O): perldtrace.d $(minindt_obj) perlmini$(OBJ_EXT) | |
823 $(DTRACE) -G -s perldtrace.d -o $(MINIDTRACE_O) $(minindt_obj) perlmini$(OBJ_EXT) | |
824 | |
825 !NO!SUBS! | |
826 ;; | |
827 esac | |
828 $spitshell >>$Makefile <<'!NO!SUBS!' | |
829 $(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT) | |
830 !NO!SUBS! | |
831 case "$useshrplib" in | |
832 true) | |
833 $spitshell >>$Makefile <<'!NO!SUBS!' | |
834 rm -f $@ | |
835 $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) | |
836 !NO!SUBS! | |
837 case "$osname" in | |
838 aix) | |
839 $spitshell >>$Makefile <<'!NO!SUBS!' | |
840 rm -f libperl$(OBJ_EXT) | |
841 mv $@ libperl$(OBJ_EXT) | |
842 $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) | |
843 !NO!SUBS! | |
844 ;; | |
845 esac | |
846 ;; | |
847 *) | |
848 $spitshell >>$Makefile <<'!NO!SUBS!' | |
849 rm -f $(LIBPERL) | |
850 $(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER) | |
851 @$(ranlib) $(LIBPERL) | |
852 !NO!SUBS! | |
853 ;; | |
854 esac | |
855 $spitshell >>$Makefile <<'!NO!SUBS!' | |
856 | |
857 # How to build executables. | |
858 | |
859 # The $& notation tells Sequent machines that it can do a parallel make, | |
860 # and is harmless otherwise. | |
861 # The miniperl -w -MExporter line is a basic cheap test to catch errors | |
862 # before make goes on to run preplibrary and then MakeMaker on extensions. | |
863 # This is very handy because later errors are often caused by miniperl | |
864 # build problems but that's not obvious to the novice. | |
865 # The Module used here must not depend on Config or any extensions. | |
866 | |
867 # The seemingly cranky ordering of having $(MINIPERL_EXE) depend on | |
868 # lib/buildcustomize.pl despite the reality that lib/buildcustomize.pl needs | |
869 # miniperl to exist first permits us to | |
870 # a) have one rule generate both miniperl and lib/buildcustomize.pl | |
871 # (so that lib/buildcustomize.pl is always available. This simplifies things) | |
872 # b) have the rest of the Makefile depend on the more obvious $(MINIPERL_EXE) | |
873 | |
874 $(MINIPERL_EXE): lib/buildcustomize.pl | |
875 | |
876 !NO!SUBS! | |
877 | |
878 case "${osname}${osvers}" in | |
879 aix*) | |
880 $spitshell >>$Makefile <<'!NO!SUBS!' | |
881 lib/buildcustomize.pl: $& $(mini_obj) | |
882 $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(mini_obj) $(libs) | |
883 $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' | |
884 $(MINIPERL) -f write_buildcustomize.pl | |
885 !NO!SUBS! | |
886 ;; | |
887 next4*) | |
888 $spitshell >>$Makefile <<'!NO!SUBS!' | |
889 lib/buildcustomize.pl: $& $(mini_obj) write ldcustomize.pl | |
890 $(CC) -o $(MINIPERL_EXE) $(mini_obj libs) | |
891 $(LDLIBPTH) ./miniperl$(HOST _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' | |
892 $(MINIPERL) -f write_buildcustomize.pl | |
893 !NO!SUBS! | |
894 ;; | |
895 darwin*) | |
896 case "$osvers" in | |
897 [1-6].*) ;; | |
898 *) case "$ldflags" in | |
899 *"-flat_namespace"*) ;; | |
900 *) # to allow opmini.o to override stuff in libperl.dylib | |
901 $spitshell >>$Makefile <<!NO!SUBS! | |
902 NAMESPACEFLAGS = -force_flat_namespace | |
903 !NO!SUBS! | |
904 ;; | |
905 esac | |
906 ;; | |
907 esac | |
908 $spitshell >>$Makefile <<'!NO!SUBS!' | |
909 lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl | |
910 -@rm -f miniperl.xok | |
911 $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ | |
912 $(mini_obj) $(libs) | |
913 $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' | |
914 $(MINIPERL) -f write_buildcustomize.pl | |
915 !NO!SUBS! | |
916 ;; | |
917 *) | |
918 if test "X$hostperl" != X; then | |
919 $spitshell >>$Makefile <<!GROK!THIS! | |
920 lib/buildcustomize.pl: \$& \$(mini_obj) write_buildcustomize.pl | |
921 -@rm -f miniperl.xok | |
922 -@rm \$(MINIPERL_EXE) | |
923 \$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE) | |
924 \$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' | |
925 \$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname" | |
926 !GROK!THIS! | |
927 else | |
928 $spitshell >>$Makefile <<'!NO!SUBS!' | |
929 lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl | |
930 -@rm -f miniperl.xok | |
931 $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ | |
932 $(mini_obj) $(libs) | |
933 $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' | |
934 $(MINIPERL) -f write_buildcustomize.pl | |
935 !NO!SUBS! | |
936 fi | |
937 ;; | |
938 esac | |
939 | |
940 $spitshell >>$Makefile <<'!NO!SUBS!' | |
941 | |
942 $(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl | |
943 -@rm -f miniperl.xok | |
944 !NO!SUBS! | |
945 | |
946 case $osname in | |
947 os390) $spitshell >>$Makefile <<'!NO!SUBS!' | |
948 $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs) | |
949 !NO!SUBS! | |
950 ;; | |
951 *) $spitshell >>$Makefile <<'!NO!SUBS!' | |
952 $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) | |
953 !NO!SUBS! | |
954 ;; | |
955 esac | |
956 | |
957 $spitshell >>$Makefile <<'!NO!SUBS!' | |
958 | |
959 # Microperl. This is just a convenience thing if one happens to | |
960 # build also the full Perl and therefore the real big Makefile: | |
961 # usually one should manually explicitly issue the below command. | |
962 | |
963 .PHONY: microperl | |
964 microperl: | |
965 $(MAKE) -f Makefile.micro | |
966 | |
967 !NO!SUBS! | |
968 | |
969 fi | |
970 | |
971 # Some environment have no system(), which mkpport uses. | |
972 # Let's try running the commands with shell. | |
973 case "${osname}" in | |
974 catamount) | |
975 $spitshell >>$Makefile <<!GROK!THIS! | |
976 .PHONY: makeppport | |
977 makeppport: \$(MINIPERL_EXE) \$(CONFIGPM) | |
978 -@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \ | |
979 (cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \ | |
980 done | |
981 | |
982 !GROK!THIS! | |
983 ;; | |
984 *) | |
985 $spitshell >>$Makefile <<'!NO!SUBS!' | |
986 .PHONY: makeppport | |
987 makeppport: $(MINIPERL_EXE) $(CONFIGPM) $(nonxs_ext) | |
988 $(MINIPERL) mkppport | |
989 | |
990 !NO!SUBS! | |
991 ;; | |
992 esac | |
993 | |
994 $spitshell >>$Makefile <<'!NO!SUBS!' | |
995 | |
996 .PHONY: preplibrary | |
997 preplibrary: $(MINIPERL_EXE) $(CONFIGPM) $(PREPLIBRARY_LIBPERL) | |
998 | |
999 $(CONFIGPM_FROM_CONFIG_SH): $(CONFIGPOD) | |
1000 | |
1001 $(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git.pl | |
1002 $(MINIPERL) configpm | |
1003 | |
1004 unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data | |
1005 | |
1006 uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext) | |
1007 $(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p | |
1008 # Commented out so always runs, mktables looks at far more files than we | |
1009 # can in this makefile to decide if needs to run or not | |
1010 # touch uni.data | |
1011 | |
1012 # $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5 | |
1013 # But also this ensures that all extensions are built before we try to scan | |
1014 # them, which picks up Devel::PPPort's documentation. | |
1015 pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc | |
1016 $(RUN_PERL) -f pod/buildtoc -q | |
1017 | |
1018 pod/perlapi.pod: pod/perlintern.pod | |
1019 | |
1020 pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc | |
1021 $(MINIPERL) autodoc.pl | |
1022 | |
1023 pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST | |
1024 $(MINIPERL) pod/perlmodlib.PL -q | |
1025 | |
1026 pod/perl5222delta.pod: pod/perldelta.pod | |
1027 $(RMS) pod/perl5222delta.pod | |
1028 $(LNS) perldelta.pod pod/perl5222delta.pod | |
1029 | |
1030 extra.pods: $(MINIPERL_EXE) | |
1031 -@test ! -f extra.pods || rm -f `cat extra.pods` | |
1032 -@rm -f extra.pods | |
1033 -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \ | |
1034 nx=`echo $$x | sed -e "s/README\.//"`; \ | |
1035 $(LNS) ../$$x "pod/perl"$$nx".pod" ; \ | |
1036 echo "pod/perl"$$nx".pod" >> extra.pods ; \ | |
1037 done | |
1038 | |
1039 extras.make: $(PERL_EXE) | |
1040 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst` | |
1041 | |
1042 extras.test: $(PERL_EXE) | |
1043 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst` | |
1044 | |
1045 extras.install: $(PERL_EXE) | |
1046 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst` | |
1047 | |
1048 .PHONY: install install-strip install-all install-verbose install-silent \ | |
1049 no-install install.perl install.man install.html | |
1050 | |
1051 # Set this to an empty string to avoid an attempt of rebuild before install | |
1052 INSTALL_DEPENDENCE = all | |
1053 | |
1054 no_install no-install: install-notify | |
1055 | |
1056 install: install-all | |
1057 !NO!SUBS! | |
1058 | |
1059 | |
1060 for name in all notify silent strip verbose; do | |
1061 flags="--$name"; | |
1062 flags=`echo $flags | sed -e 's/--all//'` | |
1063 if test "X$hostperl" != X; then | |
1064 $spitshell >>$Makefile <<EOT | |
1065 | |
1066 install_$name install-$name: \$(INSTALL_DEPENDENCE) installperl all installman | |
1067 \$(HOST_PERL) installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS) | |
1068 \$(HOST_PERL) installman --destdir=\$(DESTDIR) $flags | |
1069 EOT | |
1070 else | |
1071 $spitshell >>$Makefile <<EOT | |
1072 | |
1073 install_$name install-$name: \$(INSTALL_DEPENDENCE) installperl all installman | |
1074 \$(RUN_PERL) installperl --destdir=\$(DESTDIR) $flags \$(INSTALLFLAGS) \$(STRIPFLAGS) | |
1075 \$(RUN_PERL) installman --destdir=\$(DESTDIR) $flags | |
1076 EOT | |
1077 fi | |
1078 | |
1079 test $name = notify || echo ' -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '\''@ARGV&&install(@ARGV)'\'' `cat extras.lst`' >>$Makefile | |
1080 done | |
1081 | |
1082 if test "X$hostperl" != X; then | |
1083 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1084 install.perl: $(INSTALL_DEPENDENCE) installperl | |
1085 $(HOST_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) | |
1086 -@test ! -s extras.lst || $(MAKE) extras.install | |
1087 | |
1088 install.man: all installman | |
1089 $(HOST_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS) | |
1090 | |
1091 # XXX Experimental. Hardwired values, but useful for testing. | |
1092 # Eventually Configure could ask for some of these values. | |
1093 install.html: all installhtml | |
1094 -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd .. | |
1095 $(HOST_PERL) installhtml \ | |
1096 --podroot=. --podpath=. --recurse \ | |
1097 --htmldir=$(privlib)/html \ | |
1098 --htmlroot=$(privlib)/html \ | |
1099 --splithead=pod/perlipc \ | |
1100 --splititem=pod/perlfunc \ | |
1101 --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \ | |
1102 --verbose | |
1103 !NO!SUBS! | |
1104 else | |
1105 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1106 install.perl: $(INSTALL_DEPENDENCE) installperl | |
1107 $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) | |
1108 -@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst` | |
1109 | |
1110 install.man: all installman | |
1111 $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS) | |
1112 | |
1113 # XXX Experimental. Hardwired values, but useful for testing. | |
1114 # Eventually Configure could ask for some of these values. | |
1115 install.html: all installhtml | |
1116 -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd .. | |
1117 $(RUN_PERL) installhtml \ | |
1118 --podroot=. --podpath=. --recurse \ | |
1119 --htmldir=$(privlib)/html \ | |
1120 --htmlroot=$(privlib)/html \ | |
1121 --splithead=pod/perlipc \ | |
1122 --splititem=pod/perlfunc \ | |
1123 --ignore=Porting/Maintainers.pm,Porting/pumpkin.pod,Porting/repository.pod \ | |
1124 --verbose | |
1125 !NO!SUBS! | |
1126 fi | |
1127 | |
1128 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1129 | |
1130 # I now supply perly.c with the kits, so the following section is | |
1131 # used only if you force bison to run by saying | |
1132 # make regen_perly | |
1133 # You normally shouldn't remake perly.[ch]. | |
1134 | |
1135 .PHONY: regen_perly | |
1136 | |
1137 run_byacc run-byacc: | |
1138 @echo "run_byacc is obsolete; try 'make regen_perly' instead" | |
1139 | |
1140 # this outputs perly.h, perly.act and perly.tab | |
1141 regen_perly regen-perly: | |
1142 perl regen_perly.pl | |
1143 | |
1144 # We don't want to regenerate perly.c and perly.h, but they might | |
1145 # appear out-of-date after a patch is applied or a new distribution is | |
1146 # made. | |
1147 perly.c: perly.y | |
1148 -@sh -c true | |
1149 | |
1150 perly.h: perly.y | |
1151 -@sh -c true | |
1152 | |
1153 SYM = globvar.sym perlio.sym | |
1154 | |
1155 SYMH = perlvars.h intrpvar.h | |
1156 | |
1157 CHMOD_W = chmod +w | |
1158 | |
1159 # The following files are generated automatically | |
1160 # embed.pl: proto.h embed.h embedvar.h perlapi.h perlapi.c | |
1161 # opcode.pl: opcode.h opnames.h pp_proto.h | |
1162 # regcomp.pl: regnodes.h | |
1163 # warnings.pl: warnings.h lib/warnings.pm | |
1164 # feature.pl: feature.h lib/feature.pm | |
1165 # The correct versions should be already supplied with the perl kit, | |
1166 # in case you don't have perl available. | |
1167 # To force them to be regenerated, run | |
1168 # perl regen.pl | |
1169 # with your existing copy of perl | |
1170 # (make regen_headers is kept for backwards compatibility) | |
1171 | |
1172 AUTOGEN_FILES = opcode.h opnames.h pp_proto.h proto.h embed.h embedvar.h \ | |
1173 perlapi.h perlapi.c regnodes.h warnings.h lib/warnings.pm \ | |
1174 lib/feature.pm feature.h | |
1175 | |
1176 .PHONY: regen_headers regen_all | |
1177 | |
1178 regen: FORCE | |
1179 -perl regen.pl | |
1180 -perl regen/uconfig_h.pl | |
1181 | |
1182 regen_headers regen-headers: FORCE | |
1183 -perl regen.pl -v | |
1184 -perl regen/uconfig_h.pl -v | |
1185 | |
1186 regen_meta regen-meta: META.yml META.json | |
1187 | |
1188 META.yml: FORCE | |
1189 PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) Porting/makemeta -y | |
1190 | |
1191 META.json: FORCE | |
1192 PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) Porting/makemeta -j | |
1193 | |
1194 | |
1195 regen_all regen-all: regen regen_meta | |
1196 | |
1197 .PHONY: manisort manicheck | |
1198 | |
1199 manisort: FORCE | |
1200 @perl Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \ | |
1201 perl Porting/manisort -q -o MANIFEST; sh -c true) | |
1202 | |
1203 manicheck: FORCE | |
1204 perl Porting/manicheck | |
1205 | |
1206 # Extensions: | |
1207 # Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will | |
1208 # automatically get built. There should ordinarily be no need to change | |
1209 # any of this part of makefile. | |
1210 # | |
1211 # The dummy dependency is a place holder in case $(dynamic_ext) or | |
1212 # $(static_ext) is empty. | |
1213 # | |
1214 # DynaLoader may be needed for extensions that use Makefile.PL. | |
1215 | |
1216 $(DYNALOADER): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE $(nonxs_ext) | |
1217 $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS) | |
1218 | |
1219 d_dummy $(dynamic_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE $(PERLEXPORT) $(LIBPERL) | |
1220 $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic | |
1221 | |
1222 s_dummy $(static_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary makeppport $(DYNALOADER) FORCE | |
1223 $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS) | |
1224 | |
1225 n_dummy $(nonxs_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE | |
1226 $(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) | |
1227 !NO!SUBS! | |
1228 | |
1229 $spitshell >>$Makefile <<EOF | |
1230 $extra_dep | |
1231 EOF | |
1232 | |
1233 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1234 | |
1235 .PHONY: printconfig | |
1236 printconfig: | |
1237 @eval `$(RUN_PERL) -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR) | |
1238 | |
1239 .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \ | |
1240 realclean _realcleaner clobber _clobber \ | |
1241 distclean veryclean _verycleaner | |
1242 | |
1243 clean: realclean | |
1244 | |
1245 realclean: _realcleaner _mopup | |
1246 @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh" | |
1247 | |
1248 _clobber: | |
1249 -@rm -f Cross/run-* Cross/to-* Cross/from-* Cross/mkdir | |
1250 -rm -rf host | |
1251 rm -f t/test_state | |
1252 rm -f config.sh cppstdin Policy.sh extras.lst | |
1253 rm -f $(MANIFEST_SRT) | |
1254 | |
1255 clobber: _realcleaner _mopup _clobber | |
1256 | |
1257 distclean: clobber | |
1258 | |
1259 # Like distclean but also removes emacs backups and *.orig. | |
1260 veryclean: _verycleaner _mopup _clobber | |
1261 -@rm -f Obsolete Wanted | |
1262 | |
1263 # Do not 'make _mopup' directly. | |
1264 _mopup: | |
1265 rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c perlmini.c generate_uudmap$(EXE_EXT) $(generated_headers) | |
1266 -rmdir .depending | |
1267 -@test -f extra.pods && rm -f `cat extra.pods` | |
1268 -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod | |
1269 -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall | |
1270 -rm -f perl.export perl.dll perl.libexp perl.map perl.def | |
1271 -rm -f *perl.xok | |
1272 -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump | |
1273 -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl | |
1274 -rm -f config.arch config.over $(DTRACE_H) | |
1275 | |
1276 _cleaner1: | |
1277 -cd os2; rm -f Makefile | |
1278 -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN) | |
1279 -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN) | |
1280 -@if test -f $(MINIPERL_EXE) ; then \ | |
1281 for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \ | |
1282 $(MINIPERL) make_ext.pl --target=$(CLEAN) $$x MAKE="$(MAKE)" ; \ | |
1283 done ; \ | |
1284 else \ | |
1285 sh $(CLEAN).sh ; \ | |
1286 fi | |
1287 rm -f realclean.sh veryclean.sh | |
1288 -rm -f `grep -v ^# mkppport.lst | grep . | sed -e 's/$$/\/ppport.h/'` | |
1289 | |
1290 # Dear POSIX, thanks for making the default to xargs to be | |
1291 # run once if nothhing is passed in. It is such a great help. | |
1292 | |
1293 # Some systems do not support "?", so keep these files separate. | |
1294 _cleaner2: | |
1295 -rm -f core.*perl.*.? t/core.perl.*.? .?*.c | |
1296 rm -f core *perl.core t/core t/*perl.core core.* t/core.* | |
1297 rm -f t/$(PERL_EXE) t/rantests | |
1298 rm -rf t/tmp* | |
1299 rm -rf $(addedbyconf) | |
1300 rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old utils/Makefile | |
1301 rm -f $(private) | |
1302 rm -rf $(unidatafiles) $(unidatadirs) | |
1303 rm -rf lib/auto | |
1304 rm -f lib/.exists lib/*/.exists lib/*/*/.exists | |
1305 rm -f h2ph.man pstruct | |
1306 rm -rf .config | |
1307 rm -f preload | |
1308 rm -f pod2htmd.tmp | |
1309 rm -rf pod/perlfunc pod/perlipc | |
1310 -rmdir ext/B/lib | |
1311 rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) | |
1312 -rmdir lib/version lib/threads lib/encoding lib/autodie/exception | |
1313 -rmdir lib/autodie/Scope lib/autodie lib/XS lib/Win32API lib/VMS | |
1314 -rmdir lib/Unicode/Collate/Locale lib/Unicode/Collate/CJK | |
1315 -rmdir lib/Unicode/Collate lib/Tie/Hash lib/Thread lib/Text | |
1316 -rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Tester | |
1317 -rmdir lib/Test/Builder/IO lib/Test/Builder lib/Test lib/Term | |
1318 -rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler | |
1319 -rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result | |
1320 -rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness | |
1321 -rmdir lib/TAP/Formatter/File lib/TAP/Formatter/Console | |
1322 -rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub | |
1323 -rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple | |
1324 -rmdir lib/Pod/Perldoc lib/PerlIO/via lib/PerlIO lib/Perl | |
1325 -rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load | |
1326 -rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigInt | |
1327 -rmdir lib/Math/BigFloat lib/Math lib/MIME lib/Locale/Maketext | |
1328 -rmdir lib/Locale/Codes lib/Locale lib/List/Util lib/List lib/JSON/PP | |
1329 -rmdir lib/JSON lib/IPC lib/IO/Uncompress/Adapter lib/IO/Uncompress | |
1330 -rmdir lib/IO/Socket lib/IO/Compress/Zlib lib/IO/Compress/Zip | |
1331 -rmdir lib/IO/Compress/Gzip lib/IO/Compress/Base | |
1332 -rmdir lib/IO/Compress/Adapter lib/IO/Compress lib/IO | |
1333 -rmdir lib/I18N/LangTags lib/I18N lib/Hash/Util lib/Hash lib/HTTP | |
1334 -rmdir lib/Filter/Util lib/Filter lib/File/Spec lib/ExtUtils/Typemaps | |
1335 -rmdir lib/ExtUtils/ParseXS lib/ExtUtils/MakeMaker/version | |
1336 -rmdir lib/ExtUtils/MakeMaker lib/ExtUtils/Liblist | |
1337 -rmdir lib/ExtUtils/Constant lib/ExtUtils/Command | |
1338 -rmdir lib/ExtUtils/CBuilder/Platform/Windows | |
1339 -rmdir lib/ExtUtils/CBuilder/Platform lib/ExtUtils/CBuilder | |
1340 -rmdir lib/Exporter lib/Encode/Unicode lib/Encode/MIME/Header | |
1341 -rmdir lib/Encode/MIME lib/Encode/KR lib/Encode/JP lib/Encode/CN | |
1342 -rmdir lib/Encode lib/Digest lib/Devel lib/Data lib/Config/Perl | |
1343 -rmdir lib/Compress/Raw lib/Compress lib/Carp lib/CPAN/Plugin | |
1344 -rmdir lib/CPAN/Meta/History lib/CPAN/Meta lib/CPAN/LWP | |
1345 -rmdir lib/CPAN/Kwalify lib/CPAN/HTTP lib/CPAN/FTP lib/CPAN/Exception | |
1346 -rmdir lib/CPAN/API lib/CPAN lib/Attribute lib/Archive/Tar lib/Archive | |
1347 -rmdir lib/App/Prove/State/Result lib/App/Prove/State lib/App/Prove | |
1348 -rmdir lib/App | |
1349 | |
1350 _realcleaner: | |
1351 @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=distclean | |
1352 @$(LDLIBPTH) $(MAKE) _cleaner2 | |
1353 | |
1354 _verycleaner: | |
1355 @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean | |
1356 @$(LDLIBPTH) $(MAKE) _cleaner2 | |
1357 -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig | |
1358 | |
1359 .PHONY: lint | |
1360 lint: $(c) | |
1361 rm -f *.ln | |
1362 lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c) | |
1363 | |
1364 .PHONY: splint | |
1365 splint: $(c) | |
1366 splint $(splintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(splintfiles) | |
1367 | |
1368 # Need to unset during recursion to go out of loop. | |
1369 # The README below ensures that the dependency list is never empty and | |
1370 # that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding. | |
1371 | |
1372 MAKEDEPEND = Makefile makedepend | |
1373 | |
1374 $(FIRSTMAKEFILE): README $(MAKEDEPEND) | |
1375 $(MAKE) depend MAKEDEPEND= | |
1376 !NO!SUBS! | |
1377 | |
1378 for f in $SH; do | |
1379 file=`SH_to_target $f` | |
1380 $spitshell >>$Makefile <<!GROK!THIS! | |
1381 | |
1382 $file: $f config.sh | |
1383 \$(SHELL) $f | |
1384 !GROK!THIS! | |
1385 done | |
1386 | |
1387 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1388 | |
1389 .PHONY: depend | |
1390 depend: makedepend $(DTRACE_H) $(generated_headers) | |
1391 sh ./makedepend MAKE="$(MAKE)" cflags | |
1392 | |
1393 .PHONY: test check test_prep test_prep_nodll test_prep_pre \ | |
1394 test_prep_reonly test_tty test-tty test_notty test-notty \ | |
1395 test_harness test_harness_notty minitest test-reonly _test | |
1396 | |
1397 _test: | |
1398 echo >&2 The _test target is deprecated. Please upgrade your smoker | |
1399 $(RUN_TESTS) choose | |
1400 | |
1401 # Cannot delegate rebuilding of t/perl to make | |
1402 # to allow interlaced test and minitest | |
1403 | |
1404 # Architecture-neutral stuff: | |
1405 | |
1406 test_prep_pre: preplibrary utilities $(nonxs_ext) | |
1407 !NO!SUBS! | |
1408 | |
1409 case "$targethost" in | |
1410 '') $spitshell >>$Makefile <<'!NO!SUBS!' | |
1411 test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \ | |
1412 $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) | |
1413 cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) | |
1414 | |
1415 !NO!SUBS! | |
1416 ;; | |
1417 *) $spitshell >>$Makefile <<!GROK!THIS! | |
1418 test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE) \ | |
1419 \$(dynamic_ext) \$(TEST_PERL_DLL) runtests \ | |
1420 \$(generated_pods) | |
1421 $to libperl.* | |
1422 $to t/* | |
1423 $to lib/* | |
1424 $to TestInit.pm | |
1425 $to win32/FindExt.pm | |
1426 $to regen/* | |
1427 $to pod/* | |
1428 $to MANIFEST | |
1429 $to Porting/* | |
1430 $to cpan/*/t | |
1431 $to dist/*/t | |
1432 $to ext/*/t | |
1433 $to cpan/Archive-Tar/* | |
1434 $to cpan/Module-Metadata/* | |
1435 $to cpan/Term-Cap/test.pl | |
1436 $to cpan/Pod-Usage/* | |
1437 $to cpan/Pod-Parser/* | |
1438 $to cpan/IO-Compress/* | |
1439 $to cpan/HTTP-Tiny/lib/* | |
1440 $to cpan/Filter-Util-Call/filter-util.pl | |
1441 $to cpan/Digest-MD5/* | |
1442 $to cpan/Digest-SHA/* | |
1443 $to cpan/Test-Simple/* | |
1444 $to cpan/Pod-Parser/lib/* | |
1445 $to cpan/Test-Harness/* | |
1446 $to cpan/Scalar-List-Utils/* | |
1447 $to ext/IPC-Open3/* | |
1448 $to ext/Tie-Memoize/* | |
1449 $to ext/POSIX/* | |
1450 $to dist/IO/* | |
1451 # --- These three are needed by ExtUtils::MM_Unix to verify PERL_CORE | |
1452 $to config_h.SH | |
1453 $to perl.h | |
1454 $to cflags | |
1455 $to *.h | |
1456 # --- For t/porting/customized.t | |
1457 $to vutil.c | |
1458 $to vxs.inc | |
1459 # --- For t/TEST | |
1460 $to config.sh | |
1461 # --- For lib/diagnostics.t with -Duseshrplib | |
1462 $to \$(PERL_EXE) | |
1463 cd t && (rm -f \$(PERL_EXE); \$(LNS) ../\$(PERL_EXE) \$(PERL_EXE)) && cd .. | |
1464 $to t/\$(PERL_EXE) | |
1465 | |
1466 !GROK!THIS! | |
1467 ;; | |
1468 esac | |
1469 | |
1470 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1471 test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL) | |
1472 $(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic | |
1473 cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) | |
1474 !NO!SUBS! | |
1475 | |
1476 case "$targethost" in | |
1477 '') $spitshell >>$Makefile <<'!NO!SUBS!' | |
1478 | |
1479 test check: test_prep | |
1480 $(RUN_TESTS) choose | |
1481 | |
1482 !NO!SUBS! | |
1483 ;; | |
1484 *) $spitshell >>$Makefile <<!GROK!THIS! | |
1485 | |
1486 test check: test_prep | |
1487 $run -cwd $targetdir/t -env "$targetenv LD_LIBRARY_PATH=$targetdir:$targetdir/lib:$targetdir/lib/auto:\$\$LD_LIBRARY_PATH" ./TEST | |
1488 | |
1489 !GROK!THIS! | |
1490 ;; | |
1491 esac | |
1492 | |
1493 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1494 test_tty test-tty: test_prep | |
1495 $(RUN_TESTS) tty | |
1496 | |
1497 test_notty test-notty: test_prep | |
1498 $(RUN_TESTS) no-tty | |
1499 | |
1500 !NO!SUBS! | |
1501 | |
1502 case "${osname}${osvers}" in | |
1503 linux*|darwin*) | |
1504 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1505 # Targets for valgrind testing: | |
1506 | |
1507 test.valgrind check.valgrind: test_prep | |
1508 @echo "Checking usemymalloc='n' in config.sh..." | |
1509 @grep "^usemymalloc=" config.sh | |
1510 @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1 | |
1511 @echo "And of course you have to have valgrind..." | |
1512 $(VALGRIND) $(VG_TEST) || exit 1 | |
1513 PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' TESTFILE=harness $(RUN_TESTS) choose | |
1514 !NO!SUBS! | |
1515 ;; | |
1516 esac | |
1517 | |
1518 $spitshell >>$Makefile <<'!NO!SUBS!' | |
1519 | |
1520 # minitest can't depend on lib/Config.pm because that might be where miniperl | |
1521 # is crashing. | |
1522 minitest_prep: | |
1523 -@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles) | |
1524 @echo " " | |
1525 @echo "You may see some irrelevant test failures if you have been unable" | |
1526 @echo "to build lib/Config.pm, or the Unicode data files." | |
1527 @echo " " | |
1528 - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) | |
1529 | |
1530 MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t | |
1531 | |
1532 minitest: $(MINIPERL_EXE) minitest_prep | |
1533 - cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) </dev/tty | |
1534 | |
1535 minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep | |
1536 - cd t && PERL_SKIP_TTY_TEST=1 $(RUN_PERL) TEST $(MINITEST_TESTS) | |
1537 | |
1538 # Test via harness | |
1539 | |
1540 test_harness test-harness: test_prep | |
1541 TESTFILE=harness $(RUN_TESTS) choose | |
1542 | |
1543 test_harness_notty: test_prep | |
1544 HARNESS_NOTTY=1 TESTFILE=harness $(RUN_TESTS) choose | |
1545 | |
1546 test_reonly test-reonly: test_prep_reonly | |
1547 TEST_ARGS='-re \bre\/' TESTFILE=harness $(RUN_TESTS) choose | |
1548 | |
1549 | |
1550 # Porting tests (well-formedness of pod, manifest, etc) | |
1551 | |
1552 test_porting test-porting: test_prep | |
1553 cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t | |
1554 | |
1555 # Handy way to run perlbug -ok without having to install and run the | |
1556 # installed perlbug. We don't re-run the tests here - we trust the user. | |
1557 # Please *don't* use this unless all tests pass. | |
1558 # If you want to report test failures, use "make nok" instead. | |
1559 | |
1560 .PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack | |
1561 | |
1562 ok: utilities | |
1563 $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' | |
1564 | |
1565 okfile: utilities | |
1566 $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok | |
1567 | |
1568 oknack: utilities | |
1569 $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -A | |
1570 | |
1571 okfilenack: utilities | |
1572 $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A | |
1573 | |
1574 nok: utilities | |
1575 $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' | |
1576 | |
1577 nokfile: utilities | |
1578 $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok | |
1579 | |
1580 noknack: utilities | |
1581 $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -A | |
1582 | |
1583 nokfilenack: utilities | |
1584 $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A | |
1585 | |
1586 .PHONY: clist hlist | |
1587 | |
1588 clist: $(c) | |
1589 echo $(c) | tr ' ' $(TRNL) >.clist | |
1590 | |
1591 hlist: $(h) | |
1592 echo $(h) | tr ' ' $(TRNL) >.hlist | |
1593 | |
1594 .PHONY: distcheck | |
1595 distcheck: FORCE | |
1596 perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()' | |
1597 | |
1598 .PHONY: ctags | |
1599 | |
1600 ctags: | |
1601 ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c --exclude=perlmini.c *.c *.h | |
1602 | |
1603 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE | |
1604 # If this runs make out of memory, delete /usr/include lines. | |
1605 !NO!SUBS! | |
1606 | |
1607 $eunicefix Makefile | |
1608 $rm -f $firstmakefile | |
1609 | |
1610 # Now do any special processing required before building. | |
1611 | |
1612 case "$ebcdic" in | |
1613 define) | |
1614 xxx='' | |
1615 echo "This is an EBCDIC system, checking if any parser files need regenerating." >&2 | |
1616 case "$osname" in | |
1617 os390|posix-bc) | |
1618 ;; | |
1619 *) | |
1620 echo "'$osname' is an EBCDIC system I don't know that well." >&4 | |
1621 ;; | |
1622 esac | |
1623 case "$xxx" in | |
1624 '') echo "No parser files were regenerated. That's okay." >&2 ;; | |
1625 esac | |
1626 ;; | |
1627 esac | |
1628 | |
1629 # ex: set ts=8 sts=4 sw=4 noet: |