diff options
author | Tony Cook <tony@develop-help.com> | 2018-01-10 11:32:43 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2018-02-08 13:58:14 +1100 |
commit | c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239 (patch) | |
tree | b7781d7bde6800522f3b4cf56ed46bd59fb6551d /Makefile.SH | |
parent | d6ecacbcfb0cb2280a237e991e0a57ff707e4e42 (diff) | |
download | perl-c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239.tar.gz |
(perl #127743) re-work recursion limit handling
Previously this worked by calculating the limits and then rebuilding
Storable.so, this meant Storable.so was built twice meaning a new make
would then rebuild its dependencies.
This was also a hard limit, so if Storable's user knew the available
stack space changed they would need to rebuild Storable to adapt.
This also allows for successful static Storable builds.
I also updated the stacksize tool to prevent popping up segfault error
messages at the user on Win32.
Since I was still seeing test failures in recurse.t on a variety of
platforms, I made the default limit calculations even more
conservative.
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/Makefile.SH b/Makefile.SH index b2fb12d904..486953a0bd 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -176,11 +176,15 @@ esac : is Cwd static or dynamic static_cwd='define' +storable_limit_dep='' +storable_type='' list_util_dep='$(PERL_EXE)' for f in $dynamic_ext; do case $f in Cwd) static_cwd='undef' ;; - List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext + List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;; + Storable) storable_limit_dep=lib/auto/Storable/Storable.$dlext + storable_type='dynamic' ;; esac done @@ -217,6 +221,7 @@ for f in $static_ext; do $this_target: lib/auto/List/Util/Util\$(LIB_EXT)" ;; Unicode/Normalize) extra_dep="$extra_dep $this_target: uni.data" ;; + Storable) storable_type='static' ;; esac done @@ -618,7 +623,7 @@ lintflags = \ @echo `$(CCCMDSRC)` -S $*.c @`$(CCCMDSRC)` -S $*.c -all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT) +all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT) common_build @echo " "; @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." @@ -1090,7 +1095,7 @@ esac $spitshell >>$Makefile <<'!NO!SUBS!' -.PHONY: preplibrary rebuild_storable +.PHONY: preplibrary common_build preplibrary: $(MINIPERL_EXE) $(CONFIGPM) $(PREPLIBRARY_LIBPERL) $(CONFIGPM_FROM_CONFIG_SH): $(CONFIGPOD) @@ -1106,10 +1111,6 @@ 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 -rebuild_storable: $(PERL_EXE) - $(RUN_PERL) dist/Storable/stacksize --core - $(MAKE) -C dist/Storable PERL_CORE=1 - # $(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. @@ -1137,7 +1138,7 @@ extra.pods: $(MINIPERL_EXE) echo "pod/perl"$$nx".pod" >> extra.pods ; \ done -extras.make: $(PERL_EXE) rebuild_storable +extras.make: $(PERL_EXE) -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst` extras.test: $(PERL_EXE) @@ -1157,6 +1158,21 @@ no_install no-install: install-notify install: install-all !NO!SUBS! +if test "$storable_type" != "" ; then + +$spitshell >>$Makefile <<EOT + +dist/Storable/lib/Storable/Limit.pm : \$(PERL_EXE) dist/Storable/stacksize $storable_limit_dep + \$(RUN_PERL) dist/Storable/stacksize --core + +lib/Storable/Limit.pm : dist/Storable/lib/Storable/Limit.pm + test -d lib/Storable || mkdir lib/Storable + cp dist/Storable/lib/Storable/Limit.pm lib/Storable/Limit.pm +EOT + +common_build_deps="$common_build_deps lib/Storable/Limit.pm" + +fi for name in all notify silent strip verbose; do flags="--$name"; @@ -1504,7 +1520,7 @@ test_prep_pre: preplibrary utilities $(nonxs_ext) case "$targethost" in '') $spitshell >>$Makefile <<'!NO!SUBS!' test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \ - $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) + $(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE)) !NO!SUBS! @@ -1512,7 +1528,7 @@ test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \ *) $spitshell >>$Makefile <<!GROK!THIS! test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE) \ \$(dynamic_ext) \$(TEST_PERL_DLL) runtests \ - \$(generated_pods) + \$(generated_pods) common_build $to libperl.* $to t/* $to lib/* @@ -1647,6 +1663,17 @@ test_reonly test-reonly: test_prep_reonly test_porting test-porting: test_prep cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t +!NO!SUBS! + +$spitshell>>$Makefile <<!GROK!THIS! + +# intended as a common way to add dependencies to test-prep and all +common_build: $common_build_deps + +!GROK!THIS! + +$spitshell >>$Makefile <<'!NO!SUBS!' + # Handy way to run perlbug -ok without having to install and run the # installed perlbug. We don't re-run the tests here - we trust the user. # Please *don't* use this unless all tests pass. |