3 # This file is used to create generic Makefile for cross-compile
4 # (borrowed from Makefile.SH)
5 # (now only small changes are done to establish cross-compilation)
6 # miniperl removed from here, as this is built on HOST
8 Makefile=Makefile-cross-$CROSS_NAME
10 . Cross/config-${CROSS_NAME}.sh
12 # H.Merijn Brand [17 Feb 2004]
13 # This comment is just to ensure that Configure will find variables that
14 # are removed/replaced in patches on blead, but are still needed in the
15 # 5.8.x, 5.6.x and 5.005.x maintainance tracks.
16 # metaconfig -m will scan all .SH files on this level (not deeper), and
17 # not in x2p and other subfolders. This file is as good as any .SH
22 # H.Merijn Brand [30 Oct 2004]
23 # Mentioned for the same reason for future reference
24 # #23434 $d_strlcat $d_strlcpy
26 : This forces SH files to create target in same directory as SH file.
27 : This is so that make depend always knows where to find SH derivatives.
29 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
32 linklibperl='$(LIBPERL)'
33 shrpldflags='$(LDDLFLAGS)'
35 DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
38 # Prefix all runs of 'miniperl' and 'perl' with
39 # $ldlibpth so that ./perl finds *this* shared libperl.
40 case "$LD_LIBRARY_PATH" in
42 ldlibpth="LD_LIBRARY_PATH=`pwd`";;
44 ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
47 pldlflags="$cccdlflags"
49 case "${osname}${osvers}" in
52 lddlflags="-dynamic -undefined warning -framework System \
53 -compatibility_version 1 -current_version $patchlevel \
54 -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
57 shrpldflags="${ldflags} -dynamiclib \
58 -compatibility_version \
59 ${api_revision}.${api_version}.${api_subversion} \
61 ${revision}.${patchlevel}.${subversion} \
62 -install_name \$(shrpdir)/\$@"
70 netbsd*|freebsd[234]*|openbsd*|dragonfly*)
71 linklibperl="-L. -lperl"
74 linklibperl="-L. -lperl"
75 shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
78 shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
81 shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
83 3*) shrpldflags="$shrpldflags -e _nostart"
85 *) shrpldflags="$shrpldflags -b noentry"
88 shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
89 linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl"
92 linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
95 shrpldflags='-W l,XPLINK,dll'
96 linklibperl='libperl.x'
97 DPERL_EXTERNAL_GLOB=''
100 case "$ldlibpthname" in
108 eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
111 # Strip off any trailing :'s
112 ldlibpth=`echo $ldlibpth | sed 's/:*$//'`
118 *" "*) ldlibpth=`echo $ldlibpth|sed 's/ /\\\\ /g'` ;;
123 # If there is a pre-existing $libperl from a previous
124 # installation, Linux needs to use LD_PRELOAD to
125 # override the LD_LIBRARY_PATH setting. See the
126 # INSTALL file, under "Building a shared perl library".
127 # If there is no pre-existing $libperl, we don't need
128 # to do anything further.
129 if test -f $archlib/CORE/$libperl; then
131 cat <<'EOT' > preload
135 test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
139 ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
142 os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
149 static_ldflags='CCCDLFLAGS='
153 : Prepare dependency lists for Makefile.
156 for f in $dynamic_ext; do
157 : the dependency named here will never exist
158 base=`echo "$f" | sed 's/.*\///'`
159 this_target="lib/auto/$f/$base.$dlext"
160 dynamic_list="$dynamic_list $this_target"
162 : Parallel makes reveal that we have some interdependencies
164 Math/BigInt/FastCalc) extra_dep="$extra_dep
165 $this_target: lib/auto/List/Util/Util.$dlext" ;;
166 Unicode/Normalize) extra_dep="$extra_dep
167 $this_target: uni.data" ;;
172 for f in $static_ext; do
173 base=`echo "$f" | sed 's/.*\///'`
174 static_list="$static_list lib/auto/$f/$base\$(LIB_EXT)"
178 for f in $nonxs_ext; do
179 base=`echo "$f" | sed 's/.*\///'`
180 nonxs_list="$nonxs_list ext/$f/pm_to_blib"
183 echo "Extracting $Makefile (with variable substitutions)"
184 $spitshell >$Makefile <<!GROK!THIS!
186 # This file is derived from $Makefile.SH. Any changes made here will
187 # be lost the next time you run Configure.
188 # $Makefile is used to generate $firstmakefile. The only difference
189 # is that $firstmakefile has the dependencies filled in at the end.
197 mallocsrc = $mallocsrc
198 mallocobj = $mallocobj
202 # NOTE: some systems don't grok "cp -f". XXX Configure test needed?
207 # The following are mentioned only to make metaconfig include the
208 # appropriate questions in Configure. If you want to change these,
209 # edit config.sh instead, or specify --man1dir=/wherever on
210 # installman commandline.
212 scriptdir = $scriptdir
213 shrpdir = $archlibexp/CORE
214 privlib = $installprivlib
220 # The following are used to build and install shared libraries for
222 LDDLFLAGS = $lddlflags
223 SHRPLDFLAGS = $shrpldflags
224 CCDLFLAGS = $ccdlflags
226 PLDLFLAGS = $pldlflags
228 LLIBPERL= $linklibperl
231 # Static targets are ordinarily built without CCCDLFLAGS. However,
232 # if building a shared libperl.so that might later be linked into
233 # another application, then it might be appropriate to also build static
234 # extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
236 STATIC_LDFLAGS = $static_ldflags
238 # The following is used to include the current directory in
239 # the dynamic loader path you are building a shared libperl.
242 dynamic_ext = $dynamic_list
243 static_ext = $static_list
244 nonxs_ext = $nonxs_list
245 ext = \$(dynamic_ext) \$(static_ext) \$(nonxs_ext)
246 DYNALOADER = DynaLoader\$(OBJ_EXT)
248 libs = $perllibs $cryptlib
250 public = perl\$(EXE_EXT) utilities translators
252 shellflags = $shellflags
254 # This is set to MAKE=$make if your $make command doesn't
258 # Mention $gmake here so it gets probed for by Configure.
260 # These variables may need to be manually set for non-Unix systems.
267 # If you're going to use valgrind and it can't be invoked as plain valgrind
268 # then you'll need to change this, or override it on the make command line.
271 FIRSTMAKEFILE = $firstmakefile
273 # Any special object files needed by this architecture, e.g. os2/os2.obj
276 .SUFFIXES: .c \$(OBJ_EXT) .i .s
281 # how to tr(anslate) newlines
288 INSTALLPREFIXEXP = $prefix
291 # not used by Makefile but by installperl;
292 # mentioned here so that metaconfig picks these up
296 case "${osname}:${osvers}" in
298 $spitshell >>$Makefile <<EOF
300 # Your locales are broken (osname $osname, osvers $osvers)
301 # and to avoid the numerous
302 # perl: warning: Setting locale failed.
303 # warnings during the build process we reset the locale variables.
312 $spitshell >>$Makefile <<!GROK!THIS!
313 CROSS_NAME = ${CROSS_NAME}
314 CROSS_LIB = xlib/${CROSS_NAME}
316 CCCMD = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$@\`
318 CCCMDSRC = \`sh \$(shellflags) cflags-cross-${CROSS_NAME} "optimize='\$(OPTIMIZE)'" \$<\`
322 ## In the following dollars and backticks do not need the extra backslash.
323 $spitshell >>$Makefile <<'!NO!SUBS!'
325 CONFIGPM = xlib/$(CROSS_NAME)/Config.pm
327 private = preplibrary $(CONFIGPM) $(CROSS_LIB)/Config.pod
329 shextract = Makefile cflags config.h makeaperl makedepend \
330 makedir myconfig writemain pod/Makefile
332 # Files to be built with variable substitution after miniperl is
333 # available. Dependencies handled manually below (for now).
335 pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \
336 pod/pod2usage.PL pod/podchecker.PL pod/podselect.PL
338 # lib/lib.pm is not listed here because it has a rule of its own.
339 plextract = pod/pod2html pod/pod2latex pod/pod2man pod/pod2text \
340 pod/pod2usage pod/podchecker pod/podselect
342 addedbyconf = UU $(shextract) $(plextract) lib/lib.pm pstruct
344 # Unicode data files generated by mktables
345 unidatafiles = lib/unicore/Canonical.pl lib/unicore/Exact.pl \
346 lib/unicore/Properties lib/unicore/Decomposition.pl \
347 lib/unicore/CombiningClass.pl lib/unicore/Name.pl lib/unicore/PVA.pl
349 # Directories of Unicode data files generated by mktables
350 unidatadirs = lib/unicore/To lib/unicore/lib
352 h1 = EXTERN.h INTERN.h XSUB.h av.h xconfig.h cop.h cv.h dosish.h
353 h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h
354 h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h
355 h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h
356 h5 = utf8.h warnings.h
357 h = $(h1) $(h2) $(h3) $(h4) $(h5)
359 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
360 c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c
361 c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c
362 c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c
363 c5 = $(madlysrc) $(mallocsrc)
365 c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c
367 obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT)
368 obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) perl$(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)
369 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)
371 obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
379 -errchk=parentheses \
383 -erroff=E_ASSIGN_NARROW_CONV \
384 -erroff=E_BAD_PTR_CAST \
385 -erroff=E_BAD_PTR_CAST_ALIGN \
386 -erroff=E_BAD_PTR_INT_COMBINATION \
387 -erroff=E_BAD_SIGN_EXTEND \
388 -erroff=E_BLOCK_DECL_UNUSED \
389 -erroff=E_CASE_FALLTHRU \
390 -erroff=E_CONST_EXPR \
391 -erroff=E_CONSTANT_CONDITION \
392 -erroff=E_END_OF_LOOP_CODE_NOT_REACHED \
393 -erroff=E_EQUALITY_NOT_ASSIGNMENT \
394 -erroff=E_EXPR_NULL_EFFECT \
395 -erroff=E_FALSE_LOGICAL_EXPR \
396 -erroff=E_INCL_NUSD \
397 -erroff=E_LOOP_EMPTY \
398 -erroff=E_MAIN_PARAM \
399 -erroff=E_POINTER_TO_OBJECT \
400 -erroff=E_PTRDIFF_OVERFLOW \
401 -erroff=E_SHIFT_CNT_NEG_TOO_BIG_L \
402 -erroff=E_STATIC_UNUSED \
403 -erroff=E_TRUE_LOGICAL_EXPR
406 -I/usr/lib/gcc/i486-linux-gnu/4.0.2/include/ \
407 -D__builtin_va_list=va_list \
408 -Dsigjmp_buf=jmp_buf \
432 $(CCCMD) -I$(CROSS_LIB) $(PLDLFLAGS) $*.c
435 $(CCCMDSRC) -E $*.c > $*.i
440 all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
442 @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
447 # This is now done by installman only if you actually want the man pages.
448 # @echo " "; echo " Making docs"; cd pod; $(MAKE) all;
450 # Phony target to force checking subdirectories.
451 # Apparently some makes require an action for the FORCE target.
456 $spitshell >>$Makefile <<!GROK!THIS!
458 # We do a copy of the op.c instead of a symlink because gcc gets huffy
459 # if we have a symlink forest to another disk (it complains about too many
460 # levels of symbolic links, even if we have only two)
464 \$(CPS) op.c opmini.c
466 opmini\$(OBJ_EXT): opmini.c
467 \$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
472 $spitshell >>$Makefile <<'!NO!SUBS!'
473 miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
474 $(CCCMD) $(PLDLFLAGS) $*.c
476 perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
477 sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
482 ;; # Let cygwin/Makefile.SHs do its work.
484 $spitshell >>$Makefile <<'!NO!SUBS!'
485 perlmain$(OBJ_EXT): perlmain.c
486 $(CCCMD) $(PLDLFLAGS) $*.c
491 $spitshell >>$Makefile <<'!NO!SUBS!'
492 # The file ext.libs is a list of libraries that must be linked in
493 # for static extensions, e.g. -lm -lgdbm, etc. The individual
494 # static extension Makefile's add to it.
495 ext.libs: $(static_ext)
496 -@test -f ext.libs || touch ext.libs
500 # How to build libperl. This is still rather convoluted.
501 # Load up custom Makefile.SH fragment for shared loading and executables:
504 Makefile_s="$osname/Makefile.SHs"
510 $spitshell >>$Makefile <<!GROK!THIS!
512 # In AIX we need to change this for building Perl itself from
513 # its earlier definition (which is for building external
514 # extensions *after* Perl has been built and installed)
515 CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
518 case "$useshrplib" in
520 $spitshell >>$Makefile <<'!NO!SUBS!'
522 LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT)
523 MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT)
525 $(LIBPERL_NONSHR): $(obj)
526 $(RMS) $(LIBPERL_NONSHR)
527 $(AR) rcu $(LIBPERL_NONSHR) $(obj)
529 $(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT)
530 $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \
531 opmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS)
533 MINIPERLEXP = $(MINIPERL_NONSHR)
535 LIBPERLEXPORT = perl.exp
541 $spitshell >>$Makefile <<'!NO!SUBS!'
542 MINIPERLEXP = miniperl$(EXE_EXT)
544 PERLEXPORT = perl.exp
549 $spitshell >>$Makefile <<'!NO!SUBS!'
550 perl.exp: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH)
551 ./$(MINIPERLEXP) makedef.pl PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" | sort -u | sort -f > perl.exp
556 $spitshell >>$Makefile <<'!NO!SUBS!'
557 MINIPERLEXP = miniperl
559 perl5.def: $(MINIPERLEXP) makedef.pl config.sh $(SYM) $(SYMH) miniperl.map
560 ./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
566 if test -r $Makefile_s ; then
568 $spitshell >>$Makefile <<!GROK!THIS!
570 $Makefile: $Makefile_s
573 $spitshell >>$Makefile <<'!NO!SUBS!'
574 $(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
576 case "$useshrplib" in
578 $spitshell >>$Makefile <<'!NO!SUBS!'
580 $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
584 $spitshell >>$Makefile <<'!NO!SUBS!'
585 rm -f libperl$(OBJ_EXT)
586 mv $@ libperl$(OBJ_EXT)
587 $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
593 $spitshell >>$Makefile <<'!NO!SUBS!'
595 $(AR) rcu $(LIBPERL) $(obj) $(DYNALOADER)
596 @$(ranlib) $(LIBPERL)
600 $spitshell >>$Makefile <<'!NO!SUBS!'
602 # How to build executables.
604 # The $& notation tells Sequent machines that it can do a parallel make,
605 # and is harmless otherwise.
606 # The miniperl -w -MExporter line is a basic cheap test to catch errors
607 # before make goes on to run preplibrary and then MakeMaker on extensions.
608 # This is very handy because later errors are often caused by miniperl
609 # build problems but that's not obvious to the novice.
610 # The Module used here must not depend on Config or any extensions.
615 $spitshell >>$Makefile <<'!NO!SUBS!'
617 perl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
619 $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX)dyn$(EXE_EXT) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
620 $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX)$(EXE_EXT) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
622 # Purify/Quantify Perls.
624 pureperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
625 $(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
627 purecovperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
628 $(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
630 quantperl$(EXE_EXT): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
631 $(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
633 # Valgrind perl (currently Linux only)
635 perl.valgrind.config: config.sh
636 @echo "To build perl.valgrind you must Configure -Doptimize=-g -Uusemymalloc, checking..."
637 @$(MAKE) perl.config.dashg
638 @echo "Checking usemymalloc='n' in config.sh..."
639 @grep "^usemymalloc=" config.sh
640 @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
641 @echo "And of course you have to have valgrind..."
642 $(VALGRIND) ./perl -e 1 2>/dev/null || exit 1
644 # Third Degree Perl (Tru64 only)
647 @echo "Checking optimize='-g' in config.sh..."
648 @grep "^optimize=" config.sh
649 @egrep "^optimize='(.*-g.*)'" config.sh >/dev/null || exit 1
651 perl.third.config: config.sh
652 @echo "To build perl.third you must Configure -Doptimize=-g -Uusemymalloc, checking..."
653 @$(MAKE) perl.config.dashg
654 @echo "Checking usemymalloc='n' in config.sh..."
655 @grep "^usemymalloc=" config.sh
656 @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
658 perl.third: /usr/bin/atom perl.third.config perl
659 atom -tool third -L. -all -gp -toolargs="-invalid -uninit heap+stack+copy -min 0" perl
660 @echo "Now you may run perl.third and then study perl.3log."
662 # Pixie Perls (Tru64 and IRIX only)
664 perl.pixie.config: config.sh
665 @echo "To build perl.pixie you must Configure -Doptimize=-g, checking..."
666 @$(MAKE) perl.config.dashg
668 perl.pixie.atom: /usr/bin/atom perl
669 atom -tool pixie -L. -all -toolargs="-quiet" perl
671 perl.pixie.irix: perl
674 perl.pixie: /usr/bin/pixie perl.pixie.config perl
675 if test -x /usr/bin/atom; then \
676 $(MAKE) perl.pixie.atom; \
678 $(MAKE) perl.pixie.irix; \
680 @echo "Now you may run perl.pixie and then run pixie."
685 @echo "Checking optimize='-pg' in config.sh..."
686 @grep "^optimize=" config.sh
687 @grep "^optimize='.*-pg.*'" config.sh >/dev/null || exit 1
689 perl.gprof.config: config.sh
690 @echo "To build perl.gprof you must Configure -Doptimize=-pg, checking..."
691 @$(MAKE) perl.config.dashpg
693 perl.gprof: /usr/bin/gprof perl.gprof.config
695 $(MAKE) PERL_SUFFIX=.gprof PERL_PROFILE_LDFLAGS=-pg perl
696 @echo "Now you may run perl.gprof and then run gprof perl.gprof."
701 @echo "To build perl.gcov you must use gcc 3.0 or newer, checking..."
702 @echo "Checking gccversion in config.sh..."
703 @grep "^gccversion=" config.sh
704 @grep "^gccversion='[3-9]\." config.sh >/dev/null || exit 1
705 @echo "To build perl.gcov you must Configure -Dccflags=-fprofile-arcs -ftest-coverage, checking..."
706 @echo "Checking ccflags='-fprofile-arcs -ftest-coverage' in config.sh..."
707 @grep "^ccflags=" config.sh
708 @grep "^ccflags='.*-fprofile-arcs -ftest-coverage.*'" config.sh >/dev/null || exit 1
710 perl.gcov: perl.config.gcov
712 $(MAKE) PERL_SUFFIX=.gcov PERL_PROFILE_LDFLAGS='' perl
713 @echo "Now you may run perl.gcov and then run gcov some.c."
715 # Microperl. This is just a convenience thing if one happens to
716 # build also the full Perl and therefore the real big Makefile:
717 # usually one should manually explicitly issue the below command.
721 $(MAKE) -f Makefile.micro
727 $spitshell >>$Makefile <<'!NO!SUBS!'
729 # We have to call our ./makedir because Ultrix 4.3 make can't handle the line
730 # test -d lib/auto || mkdir lib/auto
731 # We need to autosplit in two steps because VOS can't handle so many args
734 preplibrary: miniperl $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
735 @sh ./makedir lib/auto
736 @echo " AutoSplitting perl library"
737 $(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
738 autosplit_lib_modules(@ARGV)' lib/*.pm
739 $(LDLIBPTH) ./miniperl -Ilib -MCross -e 'use AutoSplit; \
740 autosplit_lib_modules(@ARGV)' lib/*/*.pm
744 makeppport: miniperl$(EXE_EXT) $(CONFIGPM)
745 $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib mkppport
747 $(CROSS_LIB)/Config.pod: config.sh miniperl configpm Porting/Glossary
748 $(LDLIBPTH) ./miniperl -Ilib configpm --cross=$(CROSS_NAME)
750 cp ext/re/re.pm $(LIBDIR)/
752 $(CONFIGPM): $(CROSS_LIB)/Config.pod xconfig.h
754 lib/re.pm: ext/re/re.pm
756 cp ext/re/re.pm lib/re.pm
758 $(plextract): miniperl $(CONFIGPM) x2p/s2p
760 $(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
762 lib/lib.pm: miniperl $(CONFIGPM)
764 $(LDLIBPTH) ./miniperl -Ilib -MCross lib/lib_pm.PL
766 unidatafiles $(unidatafiles): uni.data
768 uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
769 cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
773 -@test ! -f extra.pods || rm -f `cat extra.pods`
775 -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
776 nx=`echo $$x | sed -e "s/README\.//"`; \
777 cd pod ; $(LNS) ../$$x "perl"$$nx".pod" ; cd .. ; \
778 echo "pod/perl"$$nx".pod" >> extra.pods ; \
780 -@rm -f pod/perlvms.pod
781 -@test -f vms/perlvms.pod && cd pod && $(LNS) ../vms/perlvms.pod perlvms.pod && cd .. && echo "pod/perlvms.pod" >> extra.pods
782 -@rm -f pod/perldelta.pod
783 -@test -f pod/perl5100delta.pod && cd pod && $(LNS) perl5100delta.pod perldelta.pod && cd .. && echo "pod/perldelta.pod" >> extra.pods # See buildtoc
785 extras.make: perl$(EXE_EXT)
786 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
788 extras.test: perl$(EXE_EXT)
789 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
791 extras.install: perl$(EXE_EXT)
792 -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(LDLIBPTH) ./perl -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
794 .PHONY: install install-strip install-all install-verbose install-silent \
795 no-install install.perl install.man install.html
797 META.yml: Porting/makemeta Porting/Maintainers.pl Porting/Maintainers.pm
798 $(LDLIBPTH) ./miniperl -Ilib Porting/makemeta
801 $(MAKE) STRIPFLAGS=-s install DESTDIR="$(DESTDIR)"
804 $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) DESTDIR="$(DESTDIR)"
807 $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-V DESTDIR="$(DESTDIR)"
810 $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-S DESTDIR="$(DESTDIR)"
813 $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-n DESTDIR="$(DESTDIR)"
815 # Set this to an empty string to avoid an attempt of rebuild before install
816 INSTALL_DEPENDENCE = all
818 install.perl: $(INSTALL_DEPENDENCE) installperl
819 $(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
820 -@test ! -s extras.lst || $(MAKE) extras.install
822 install.man: all installman
823 $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
825 # XXX Experimental. Hardwired values, but useful for testing.
826 # Eventually Configure could ask for some of these values.
827 install.html: all installhtml
828 -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod && cd ..
829 $(LDLIBPTH) ./perl installhtml \
830 --podroot=. --podpath=. --recurse \
831 --htmldir=$(privlib)/html \
832 --htmlroot=$(privlib)/html \
833 --splithead=pod/perlipc \
834 --splititem=pod/perlfunc \
835 --libpods=perlfunc:perlguts:perlvar:perlrun:perlop \
836 --ignore=Porting/Maintainers.pm,Porting/patching.pod,Porting/pumpkin.pod,Porting/repository.pod \
840 # I now supply perly.c with the kits, so the following section is
841 # used only if you force bison to run by saying
843 # You normally shouldn't remake perly.[ch].
848 @echo "run_byacc is obsolete; try 'make regen_perly' instead"
850 # this outputs perly.h, perly.act and perly.tab
854 # We don't want to regenerate perly.c and perly.h, but they might
855 # appear out-of-date after a patch is applied or a new distribution is
863 # No compat3.sym here since and including the 5.004_50.
864 # No interp.sym since 5.005_03.
865 SYM = global.sym globvar.sym perlio.sym pp.sym
867 SYMH = perlvars.h intrpvar.h
871 # The following files are generated automatically
872 # embed.pl: proto.h embed.h embedvar.h global.sym
873 # perlapi.h perlapi.c
874 # [* embed.pl needs pp.sym generated by opcode.pl! *]
875 # keywords.pl: keywords.h
876 # opcode.pl: opcode.h opnames.h pp_proto.h pp.sym
877 # regcomp.pl: regnodes.h
878 # warnings.pl: warnings.h lib/warnings.pm
879 # The correct versions should be already supplied with the perl kit,
880 # in case you don't have perl available.
881 # To force them to be regenerated, run
883 # with your existing copy of perl
884 # (make regen_headers is kept for backwards compatibility)
886 AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h \
887 embed.h embedvar.h global.sym \
888 perlapi.h perlapi.c regnodes.h \
889 warnings.h lib/warnings.pm
891 .PHONY: regen_headers regen_all
893 regen regen_headers: FORCE
898 .PHONY: manisort manicheck
901 LC_ALL=C sort -fdc MANIFEST || (echo "WARNING: re-sorting MANIFEST"; \
902 LC_ALL=C sort -fdo MANIFEST MANIFEST)
905 perl Porting/manicheck
908 # Names added to $(dynamic_ext) or $(static_ext) or $(nonxs_ext) will
909 # automatically get built. There should ordinarily be no need to change
910 # any of this part of makefile.
912 # The dummy dependency is a place holder in case $(dynamic_ext) or
913 # $(static_ext) is empty.
915 # DynaLoader may be needed for extensions that use Makefile.PL.
917 ###$(DYNALOADER).c: $(EXTDIR)/DynaLoader/dl_dld.xs $(CONFIGPM)
918 ### if not exist $(AUTODIR) mkdir $(AUTODIR)
919 ### cd $(EXTDIR)\$(*B)
920 ### $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
921 ### $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
923 ### $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
924 ### $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
925 ### cd $(EXTDIR)\$(*B)
926 ### $(XSUBPP) dl_win32.xs > $(*B).c
929 ###$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
930 ### $(COPY) dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
934 $(DYNALOADER): preplibrary FORCE
935 @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
937 d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
938 @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
940 s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE
941 @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
943 n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
944 @$(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --cross $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
947 $spitshell >>$Makefile <<EOF
951 $spitshell >>$Makefile <<'!NO!SUBS!'
955 @eval `$(LDLIBPTH) ./perl -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
957 .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
958 realclean _realcleaner clobber _clobber \
959 distclean veryclean _verycleaner \
960 cleanup_unpacked_files unpack_files
962 clean: cleanup_unpacked_files _tidy _mopup
964 realclean: cleanup_unpacked_files _realcleaner _mopup
965 @echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
968 -@rm -f Cross/run-* Cross/to-* Cross/from-*
969 rm -f config.sh cppstdin Policy.sh extras.lst
971 clobber: cleanup_unpacked_files _realcleaner _mopup _clobber
975 # Like distclean but also removes emacs backups and *.orig.
976 veryclean: _verycleaner _mopup _clobber
977 -@rm -f Obsolete Wanted
979 # Do not 'make _mopup' directly.
981 rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c opmini.c uudmap.h generate_uudmap$(EXE_EXT)
983 -@test -f extra.pods && rm -f `cat extra.pods`
984 -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
985 -rm -f perl.exp ext.libs extra.pods uni.data opmini.o
986 -rm -f perl.export perl.dll perl.libexp perl.map perl.def
987 -rm -f perl.loadmap miniperl.loadmap perl.prelmap miniperl.prelmap
988 -rm -f perl.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
989 -rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
990 -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
991 -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
992 -rm -f perl$(EXE_EXT) miniperl$(EXE_EXT) $(LIBPERL) libperl.* microperl
993 -rm -f opcode.h-old opnames.h-old pp.sym-old pp_proto.h-old
996 # Do not 'make _tidy' directly.
998 -cd pod; $(LDLIBPTH) $(MAKE) clean
999 -cd utils; $(LDLIBPTH) $(MAKE) clean
1000 -cd x2p; $(LDLIBPTH) $(MAKE) clean
1001 -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
1002 $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=clean $$x MAKE=$(MAKE) ; \
1006 -cd os2; rm -f Makefile
1007 -cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
1008 -cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
1009 -cd x2p; $(LDLIBPTH) $(MAKE) $(CLEAN)
1010 -@if test -f miniperl$(EXE_EXT) ; then \
1011 for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) $(nonxs_ext) ; do \
1012 $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=$(CLEAN) $$x MAKE=$(MAKE) ; \
1017 rm -f realclean.sh veryclean.sh
1018 -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib mkppport --clean
1020 # Some systems do not support "?", so keep these files separate.
1022 -rm -f core.*perl.*.? t/core.perl.*.? .?*.c
1023 rm -f core *perl.core t/core t/*perl.core core.* t/core.*
1024 rm -f t/misctmp* t/forktmp* t/tmp* t/c t/perl$(EXE_EXT) t/rantests
1025 rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
1026 rm -rf $(addedbyconf)
1027 rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
1029 rm -rf $(unidatafiles) $(unidatadirs)
1031 rm -f lib/.exists lib/*/.exists lib/*/*/.exists
1032 rm -f h2ph.man pstruct
1035 rm -rf lib/Encode lib/Compress lib/Hash lib/re
1036 rm -rf lib/IO/Compress lib/IO/Uncompress
1037 rm -f lib/ExtUtils/ParseXS/t/XSTest.c
1038 rm -f lib/ExtUtils/ParseXS/t/XSTest$(OBJ_EXT)
1039 rm -f lib/ExtUtils/ParseXS/t/XSTest$(DLSUFFIX)
1040 -rmdir lib/B lib/Data
1041 -rmdir lib/Filter/Util lib/IO/Socket
1042 -rmdir lib/List lib/MIME lib/Scalar lib/Sys
1043 -rmdir lib/threads lib/XS
1046 @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=realclean
1047 @$(LDLIBPTH) $(MAKE) _cleaner2
1050 @$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
1051 @$(LDLIBPTH) $(MAKE) _cleaner2
1052 -rm -f *~ *.orig */*~ */*.orig */*/*~ */*/*.orig
1057 lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
1061 splint $(splintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(splintfiles)
1063 # Need to unset during recursion to go out of loop.
1064 # The README below ensures that the dependency list is never empty and
1065 # that when MAKEDEPEND is empty $(FIRSTMAKEFILE) doesn't need rebuilding.
1067 MAKEDEPEND = Makefile makedepend
1069 $(FIRSTMAKEFILE): README $(MAKEDEPEND)
1070 $(MAKE) depend MAKEDEPEND=
1072 config.h: config_h.SH config.sh
1073 $(SHELL) config_h.SH
1074 # TODO - improve following line
1075 cp config.h $(CROSS_LIB)/
1077 xconfig.h: config_h.SH Cross/config-$(CROSS_NAME).sh
1078 CONFIG_SH=Cross/config-$(CROSS_NAME).sh CONFIG_H=xconfig.h $(SHELL) config_h.SH
1079 #TODO $(LDLIBPTH) ./miniperl -Ilib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(CROSS_LIB)" "CONFIG_H=xconfig.h"
1080 cp xconfig.h $(CROSS_LIB)/
1081 cp xconfig.h $(CROSS_LIB)/config.h
1083 # When done, touch perlmain.c so that it doesn't get remade each time.
1086 sh ./makedepend MAKE=$(MAKE)
1087 - test -s perlmain.c && touch perlmain.c
1088 cd x2p; $(MAKE) depend
1090 # Cannot postpone this until $firstmakefile is ready ;-)
1091 makedepend: makedepend.SH config.sh
1094 .PHONY: test check test_prep test_prep_nodll test_prep_pre _test_prep \
1095 test_tty test-tty _test_tty test_notty test-notty _test_notty \
1096 utest ucheck test.utf8 check.utf8 test.torture torturetest \
1097 test.utf16 check.utf16 utest.utf16 ucheck.utf16 \
1098 test.third check.third utest.third ucheck.third test_notty.third \
1099 test.deparse test_notty.deparse test_harness test_harness_notty \
1100 minitest coretest test.taintwarn
1102 # Cannot delegate rebuilding of t/perl to make
1103 # to allow interlaced test and minitest
1107 _test_prep: unpack_files
1108 cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
1110 # Architecture-neutral stuff:
1112 test_prep_pre: preplibrary utilities $(nonxs_ext)
1114 test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
1115 PERL=./perl $(MAKE) _test_prep
1118 cd t && $(PERL_DEBUG) $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS) </dev/tty
1121 cd t && $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) $(PERL) $(TESTFILE) $(TEST_ARGS)
1124 $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -u -m
1126 cleanup_unpacked_files:
1127 -@test ! -f ./miniperl$(EXE_EXT) || $(LDLIBPTH) ./miniperl$(EXE_EXT) -Ilib uupacktool.pl -c
1129 # The second branch is for testing without a tty or controlling terminal,
1132 if (true </dev/tty) >/dev/null 2>&1; then \
1133 $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_tty ; \
1135 $(MAKE) TEST_ARGS=$(TEST_ARGS) TESTFILE=$(TESTFILE) _test_notty ; \
1137 @echo "Ran tests" > t/rantests
1139 test check: test_prep
1140 PERL=./perl $(MAKE) _test
1143 PERL=./perl $(MAKE) _test_tty
1145 test_notty: test_prep
1146 PERL=./perl $(MAKE) _test_notty
1148 utest ucheck test.utf8 check.utf8: test_prep
1149 PERL=./perl TEST_ARGS=-utf8 $(MAKE) _test
1152 PERL=./perl TEST_ARGS=-core $(MAKE) _test
1154 test-prep: test_prep
1158 test-notty: test_notty
1162 test.torture torturetest: test_prep
1163 PERL=./perl TEST_ARGS=-torture $(MAKE) _test
1165 # Targets for UTF16 testing:
1167 minitest.utf16: minitest.prep
1168 - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
1169 && $(LDLIBPTH) ./perl TEST -minitest -utf16 base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
1171 test.utf16 check.utf16: test_prep
1172 PERL=./perl $(MAKE) TEST_ARGS=-utf16 _test
1174 utest.utf16 ucheck.utf16: test_prep
1175 PERL=./perl $(MAKE) TEST_ARGS="-utf8 -utf16" _test
1177 # Targets for valgrind testing:
1179 test_prep.valgrind: test_prep perl.valgrind
1180 PERL=./perl $(MAKE) _test_prep
1182 test.valgrind check.valgrind: test_prep perl.valgrind.config
1183 PERL=./perl PERL_DEBUG=PERL_VALGRIND=1 VALGRIND='$(VALGRIND)' $(MAKE) _test
1185 utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind.config
1186 PERL=./perl PERL_DEBUG=PERL_VALGRIND=1 TEST_ARGS=-utf8 $(MAKE) _test
1188 test_notty.valgrind: test_prep.valgrind perl.valgrind.config
1189 PERL=./perl $(MAKE) PERL_DEBUG=PERL_VALGRIND=1 _test_notty
1191 # Targets for Third Degree testing.
1193 test_prep.third: test_prep perl.third
1194 PERL=./perl.third $(MAKE) _test_prep
1196 test.third check.third: test_prep.third perl.third
1197 PERL=./perl.third PERL_DEBUG=PERL_3LOG=1 $(MAKE) _test
1199 utest.third ucheck.third: test_prep.third perl.third
1200 PERL=./perl.third PERL_DEBUG=PERL_3LOG=1 TEST_ARGS=-utf8 $(MAKE) _test
1202 test_notty.third: test_prep.third perl.third
1203 PERL=./perl.third $(MAKE) PERL_DEBUG=PERL_3LOG=1 _test_notty
1205 # Targets for Deparse testing.
1207 test.deparse: test_prep
1208 PERL=./perl TEST_ARGS=-deparse $(MAKE) _test
1210 test_notty.deparse: test_prep
1211 PERL=./perl TEST_ARGS=-deparse $(MAKE) _test_notty
1213 # Targets to run the test suite with -t
1215 test.taintwarn: test_prep
1216 PERL=./perl TEST_ARGS=-taintwarn $(MAKE) _test
1219 -@test -f lib/lib.pm && test -f lib/Config.pm || \
1220 $(MAKE) lib/Config.pm lib/lib.pm $(unidatafiles)
1222 @echo "You may see some irrelevant test failures if you have been unable"
1223 @echo "to build lib/Config.pm, lib/lib.pm or the Unicode data files."
1226 # Can't depend on lib/Config.pm because that might be where miniperl
1228 minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
1229 - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
1230 && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
1234 test_harness: test_prep
1235 PERL=./perl $(MAKE) TESTFILE=harness _test
1237 test_harness_notty: test_prep
1238 PERL=./perl HARNESS_NOTTY=1 $(MAKE) TESTFILE=harness _test
1240 # Handy way to run perlbug -ok without having to install and run the
1241 # installed perlbug. We don't re-run the tests here - we trust the user.
1242 # Please *don't* use this unless all tests pass.
1243 # If you want to report test failures, use "make nok" instead.
1245 .PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
1248 $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
1251 $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
1254 $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
1256 okfilenack: utilities
1257 $(LDLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
1260 $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
1263 $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
1266 $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
1268 nokfilenack: utilities
1269 $(LDLIBPTH) ./perl -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
1271 .PHONY: clist hlist shlist pllist
1274 echo $(c) | tr ' ' $(TRNL) >.clist
1277 echo $(h) | tr ' ' $(TRNL) >.hlist
1280 echo $(sh) | tr ' ' $(TRNL) >.shlist
1283 echo $(pl) | tr ' ' $(TRNL) >.pllist
1285 Makefile: Makefile.SH ./config.sh
1286 $(SHELL) Makefile.SH
1290 perl '-MExtUtils::Manifest=&fullcheck' -e 'fullcheck()'
1293 elc: emacs/cperl-mode.elc
1295 emacs/cperl-mode.elc: emacs/cperl-mode.el
1296 -cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el
1298 .PHONY: etags ctags tags
1302 TAGS: emacs/cperl-mode.elc
1305 # Let's hope make will not go into an infinite loop on case-unsensitive systems
1306 # This may also fail if . is in the head of the path, since perl will
1309 perl emacs/e2ctags.pl TAGS > tags
1312 ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c *.c *.h
1314 # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
1315 # If this runs make out of memory, delete /usr/include lines.
1318 $eunicefix $Makefile
1322 $ln $Makefile ../$Makefile
1325 $rm -f $firstmakefile
1327 # Now do any special processing required before building.
1332 echo "This is an EBCDIC system, checking if any parser files need regenerating." >&2
1337 rm -f y.tab.c y.tab.h
1340 # we are using two different yaccs in BS2000 Posix!
1341 byacc a2p.y >/dev/null 2>&1
1344 yacc a2p.y >/dev/null 2>&1
1347 if cmp -s y.tab.c a2p.c
1351 echo "a2p.y -> a2p.c" >&2
1354 sed -e 's/fprintf *( *stderr *,/PerlIO_printf(Perl_debug_log,/g' \
1355 -e 's|^static void __YY_YACC_MAIN.*BS2000.*|/*static main deleted*/|' \
1356 -e 's/y\.tab/a2p/g' a2p.c >a2p.tmp && mv a2p.tmp a2p.c
1359 # In case somebody yacc -d:ed the a2p.y.
1362 if cmp -s y.tab.h a2p.h
1366 echo "a2p.h -> a2p.h" >&2
1375 # Do nothing in VM/ESA.
1378 echo "'$osname' is an EBCDIC system I don't know that well." >&4
1382 '') echo "No parser files were regenerated. That's okay." >&2 ;;
1387 # ex: set ts=8 sts=4 sw=4 noet: