X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=configpm;h=ccf7816f293a9fbdc40a239b71ff4c4b7b5d4697;hb=af5683d1a11b86657bb9d3800d54c4d65ca7b5a0;hp=ab26eefe407ce1f125f3c2ee90342f797539890a;hpb=9137345a080bfc646c2f9440cdb7bd90b8b37428;p=p5sagit%2Fp5-mst-13.2.git diff --git a/configpm b/configpm index ab26eef..ccf7816 100755 --- a/configpm +++ b/configpm @@ -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"; } @@ -861,6 +859,7 @@ EOS $cross =~ s/\*\*\*replace-marker\*\*\*/$Opts{cross}/g; print CROSS $cross; close CROSS; + unshift(@INC,"xlib/$Opts{cross}"); } # Now do some simple tests on the Config.pm file we have created