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