This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add cpan/Text-Tabs/lib to buildcustomize.pl and hence miniperl's @INC.
[perl5.git] / Makefile.SH
index e7ee13f..e0220db 100755 (executable)
@@ -681,15 +681,9 @@ generate_uudmap$(OBJ_EXT): mg_raw.h
 generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
        $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
 
-miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
-       $(CCCMD) $(PLDLFLAGS) $*.c
-
 perlmain.c: $(MINIPERL_EXE) lib/ExtUtils/Miniperl.pm
        $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(@ARGV)' DynaLoader $(static_ext) > perlmain.c
 
-perlmain$(OBJ_EXT): perlmain.c
-       $(CCCMD) $(PLDLFLAGS) $*.c
-
 # The file ext.libs is a list of libraries that must be linked in
 # for static extensions, e.g. -lm -lgdbm, etc.  The individual
 # static extension Makefile's add to it.
@@ -865,7 +859,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
                $spitshell >>$Makefile <<'!NO!SUBS!'
 lib/buildcustomize.pl: $& $(mini_obj)
        $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(mini_obj) $(libs)
-       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
+       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
        $(MINIPERL) -f write_buildcustomize.pl
 !NO!SUBS!
                ;;
@@ -873,7 +867,7 @@ lib/buildcustomize.pl: $& $(mini_obj)
                $spitshell >>$Makefile <<'!NO!SUBS!'
 lib/buildcustomize.pl: $& $(mini_obj) write    ldcustomize.pl
        $(CC) -o $(MINIPERL_EXE) $(mini_obj    libs)
-       $(LDLIBPTH) $(RUN) ./miniperl$(HOST    _EXT) -w -Ilib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
+       $(LDLIBPTH) $(RUN) ./miniperl$(HOST    _EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
        $(MINIPERL) -f write_buildcustomize.pl    
 !NO!SUBS!
                ;;
@@ -895,7 +889,7 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
        -@rm -f miniperl.xok
        $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
            $(mini_obj) $(libs)
-       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
+       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
        $(MINIPERL) -f write_buildcustomize.pl
 !NO!SUBS!
                ;;
@@ -905,7 +899,7 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
        -@rm -f miniperl.xok
        $(LDLIBPTH) $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
            $(mini_obj) $(libs)
-       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
+       $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
        $(MINIPERL) -f write_buildcustomize.pl
 !NO!SUBS!
                ;;
@@ -915,18 +909,7 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
 
 $(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
        -@rm -f miniperl.xok
-       $(SHRPENV) $(LDLIBPTH) $(CC) -o perl$(PERL_SUFFIX) $(PERL_PROFILE_LDFLAGS) $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-# Purify/Quantify Perls.
-
-pure$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-       $(SHRPENV) $(LDLIBPTH) purify $(CC) -o pureperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-purecov$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-       $(SHRPENV) $(LDLIBPTH) purecov $(CC) -o purecovperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-quant$(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT)
-       $(SHRPENV) $(LDLIBPTH) quantify $(CC) -o quantperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 !NO!SUBS!
 
@@ -936,8 +919,6 @@ linux*|darwin*)
 # Valgrind perl (currently Linux, Darwin only)
 
 perl.valgrind.config: config.sh
-       @echo "To build perl.valgrind you must Configure -Doptimize=-g -Uusemymalloc, checking..."
-       @$(MAKE) perl.config.dashg
        @echo "Checking usemymalloc='n' in config.sh..."
        @grep "^usemymalloc="    config.sh
        @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
@@ -949,77 +930,6 @@ esac
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-# Third Degree Perl (Tru64 only)
-
-perl.config.dashg:
-       @echo "Checking optimize='-g' in config.sh..."
-       @grep "^optimize=" config.sh
-       @egrep "^optimize='(.*-g.*)'" config.sh >/dev/null || exit 1
-
-perl.third.config: config.sh
-       @echo "To build perl.third you must Configure -Doptimize=-g -Uusemymalloc, checking..."
-       @$(MAKE) perl.config.dashg
-       @echo "Checking usemymalloc='n' in config.sh..."
-       @grep "^usemymalloc="    config.sh
-       @grep "^usemymalloc='n'" config.sh >/dev/null || exit 1
-
-perl.third: /usr/bin/atom perl.third.config perl
-       atom -tool third -L. -all -gp -toolargs="-invalid -uninit heap+stack+copy -min 0" perl
-       @echo "Now you may run perl.third and then study perl.3log."
-
-# Pixie Perls (Tru64 and IRIX only)
-
-perl.pixie.config: config.sh
-       @echo "To build perl.pixie you must Configure -Doptimize=-g, checking..."
-       @$(MAKE) perl.config.dashg
-
-perl.pixie.atom: /usr/bin/atom perl
-       atom -tool pixie -L. -all -toolargs="-quiet" perl
-
-perl.pixie.irix: perl
-       pixie perl
-
-perl.pixie: /usr/bin/pixie perl.pixie.config perl
-       if test -x /usr/bin/atom; then \
-         $(MAKE) perl.pixie.atom; \
-       else \
-         $(MAKE) perl.pixie.irix; \
-       fi
-       @echo "Now you may run perl.pixie and then run pixie."
-
-# Gprof Perl
-
-perl.config.dashpg:
-       @echo "Checking optimize='-pg' in config.sh..."
-       @grep "^optimize="      config.sh
-       @grep "^optimize='.*-pg.*'" config.sh >/dev/null || exit 1
-
-perl.gprof.config: config.sh
-       @echo "To build perl.gprof you must Configure -Doptimize=-pg, checking..."
-       @$(MAKE) perl.config.dashpg
-
-perl.gprof: /usr/bin/gprof perl.gprof.config
-       @-rm -f perl
-       $(MAKE) PERL_SUFFIX=.gprof PERL_PROFILE_LDFLAGS=-pg perl
-       @echo "Now you may run perl.gprof and then run gprof perl.gprof."
-
-# Gcov Perl
-
-perl.config.gcov:
-       @echo "To build perl.gcov you must use gcc 3.0 or newer, checking..."
-       @echo "Checking gccversion in config.sh..."
-       @grep "^gccversion="      config.sh
-       @grep "^gccversion='[3-9]\." config.sh >/dev/null || exit 1
-       @echo "To build perl.gcov you must Configure -Dccflags=-fprofile-arcs -ftest-coverage, checking..."
-       @echo "Checking ccflags='-fprofile-arcs -ftest-coverage' in config.sh..."
-       @grep "^ccflags="      config.sh
-       @grep "^ccflags='.*-fprofile-arcs -ftest-coverage.*'" config.sh >/dev/null || exit 1
-
-perl.gcov: perl.config.gcov
-       @-rm -f perl
-       $(MAKE) PERL_SUFFIX=.gcov PERL_PROFILE_LDFLAGS='' perl
-       @echo "Now you may run perl.gcov and then run gcov some.c."
-
 # Microperl.  This is just a convenience thing if one happens to
 # build also the full Perl and therefore the real big Makefile:
 # usually one should manually explicitly issue the below command.
@@ -1076,7 +986,7 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
 #      can in this makefile to decide if needs to run or not
 #      touch uni.data
 
-# $(PERL_EXE) and ext because buildtoc uses Text::Wrap uses re
+# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
 # But also this ensures that all extensions are built before we try to scan
 # them, which picks up Devel::PPPort's documentation.
 pod/perltoc.pod: $(perltoc_pod_prereqs)  $(PERL_EXE) $(ext) pod/buildtoc
@@ -1084,8 +994,7 @@ pod/perltoc.pod: $(perltoc_pod_prereqs)  $(PERL_EXE) $(ext) pod/buildtoc
 
 pod/perlapi.pod: pod/perlintern.pod
 
-# Depending on $(nonxs_ext) gets us Text::Wrap built
-pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc $(nonxs_ext)
+pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc
        $(MINIPERL) autodoc.pl
 
 pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
@@ -1294,9 +1203,7 @@ _mopup:
        -@test -f vms/README_vms.pod && rm -f vms/README_vms.pod
        -rm -f perl.exp ext.libs $(generated_pods) uni.data opmini.o perlmini.o pod/roffitall
        -rm -f perl.export perl.dll perl.libexp perl.map perl.def
-       -rm -f perl.third lib*.so.perl.third perl.3log t/perl.third t/perl.3log
-       -rm -f perl.pixie lib*.so.perl.pixie lib*.so.Addrs
-       -rm -f perl.Addrs perl.Counts t/perl.Addrs t/perl.Counts *perl.xok
+       -rm -f *perl.xok
        -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump
        -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl
        -rm -f config.arch config.over $(DTRACE_H)
@@ -1434,7 +1341,7 @@ depend: makedepend
 
 _test:
        echo >&2 The _test target is deprecated. Please upgrade your smoker
-       PERL=./perl $(RUN_TESTS) choose
+       $(RUN_TESTS) choose
 
 # Cannot delegate rebuilding of t/perl to make
 # to allow interlaced test and minitest
@@ -1481,16 +1388,14 @@ esac
 
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
-minitest.prep:
+# Can't depend on lib/Config.pm because that might be where miniperl
+# is crashing.
+minitest: $(MINIPERL_EXE)
        -@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
        @echo " "
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm, or the Unicode data files."
        @echo " "
-
-# Can't depend on lib/Config.pm because that might be where miniperl
-# is crashing.
-minitest: $(MINIPERL_EXE) minitest.prep
        - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
                && $(RUN_PERL) TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t </dev/tty