X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=configpm;h=874e3f38e3507a2dc2e7c582da17f20869c4c723;hb=28a5cf3b760f8b6322a0839e3b3e060e7a6f23ea;hp=e98666457cdf6b500b016abb1c38b746ae7bf4b9;hpb=27da23d53ccce622bc51822f59df8def79b4df95;p=p5sagit%2Fp5-mst-13.2.git diff --git a/configpm b/configpm index e986664..874e3f3 100755 --- a/configpm +++ b/configpm @@ -82,7 +82,7 @@ use strict; # use vars pulls in Carp ENDOFBEG -my $myver = sprintf "v%vd", $^V; +my $myver = sprintf "%vd", $^V; printf CONFIG <<'ENDOFBEG', ($myver) x 3; # This file was created by configpm when Perl was built. Any changes @@ -362,16 +362,12 @@ if (%need_relocation) { print CONFIG_HEAVY @non_v, "\n"; # copy config summary format from the myconfig.SH script -print CONFIG_HEAVY "our \$summary : unique = <<'!END!';\n"; +print CONFIG_HEAVY "our \$summary = <<'!END!';\n"; open(MYCONFIG,") && !/^Summary of/; do { print CONFIG_HEAVY $_ } until !defined($_ = ) || /^\s*$/; close(MYCONFIG); -# NB. as $summary is unique, we need to copy it in a lexical variable -# before expanding it, because may have been made readonly if a perl -# interpreter has been cloned. - print CONFIG_HEAVY "\n!END!\n", <<'EOT'; my $summary_expanded; @@ -418,7 +414,7 @@ s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m; my $config_sh_len = length $_; -our $Config_SH_expanded : unique = "\n$_" . << 'EOVIRTUAL'; +our $Config_SH_expanded = "\n$_" . << 'EOVIRTUAL'; EOT foreach my $prefix (qw(ccflags ldflags)) { @@ -617,13 +613,15 @@ if ($Common{byteorder}) { } my $fast_config = join '', map { " $_,\n" } sort values %Common; +# Sanity check needed to stop an infite loop if Config_heavy.pl fails to define +# &launcher for some reason (eg it got truncated) print CONFIG sprintf <<'ENDOFTIE', $fast_config; sub DESTROY { } sub AUTOLOAD { require 'Config_heavy.pl'; - goto \&launcher; + goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; } @@ -867,6 +865,7 @@ EOS unshift(@INC,'lib'); unshift(@INC,'xlib/symbian') if $Opts{cross}; require $Config_PM; +require $Config_heavy; import Config; die "$0: $Config_PM not valid"