my %seen_quotes;
{
my ($name, $val);
- open(CONFIG_SH, $Config_SH) || die "Can't open $Config_SH: $!";
+ open(CONFIG_SH, '<', $Config_SH) || die "Can't open $Config_SH: $!";
while (<CONFIG_SH>) {
next if m:^#!/bin/sh:;
my ($bincompat, $non_bincompat, $date, @patches) = Internals::V();
- my $opts = join ' ', sort split ' ', "$bincompat $non_bincompat";
-
- # wrap at 76 columns.
-
- $opts =~ s/(?=.{53})(.{1,53}) /$1\n /mg;
+ my @opts = sort split ' ', "$bincompat $non_bincompat";
print Config::myconfig();
print "\nCharacteristics of this %s: \n";
- print " Compile-time options: $opts\n";
+ print " Compile-time options:\n";
+ print " $_\n" for @opts;
if (@patches) {
print " Locally applied patches:\n";
- print "\t$_\n" foreach @patches;
+ print " $_\n" foreach @patches;
}
print " Built under %s\n";
# copy config summary format from the myconfig.SH script
$heavy_txt .= "our \$summary = <<'!END!';\n";
-open(MYCONFIG,"<myconfig.SH") || die "open myconfig.SH failed: $!";
+open(MYCONFIG,'<','myconfig.SH') || die "open myconfig.SH failed: $!";
1 while defined($_ = <MYCONFIG>) && !/^Summary of/;
do { $heavy_txt .= $_ } until !defined($_ = <MYCONFIG>) || /^\s*$/;
close(MYCONFIG);
local *_ = \my $a;
$_ = <<'!END!';
EOT
-
-$heavy_txt .= join('', sort @v_others) . "!END!\n";
+#proper lexicographical order of the keys
+$heavy_txt .= join('',
+ map { $_->[-1] }
+ sort {$a->[0] cmp $b->[0] }
+ map {
+ /^([^=]+)/ ? [ $1, $_ ]
+ : [ $_, $_ ] # shouldnt happen
+ } @v_others
+) . "!END!\n";
# Only need the dynamic byteorder code in Config.pm if 'byteorder' is one of
# the precached keys
$heavy_txt .= "${prefix}_nolargefiles='$value'\n";
}
+if (open(my $fh, '<', 'cflags')) {
+ my $ccwarnflags;
+ my $ccstdflags;
+ while (<$fh>) {
+ if (/^warn="(.+)"$/) {
+ $ccwarnflags = $1;
+ } elsif (/^stdflags="(.+)"$/) {
+ $ccstdflags = $1;
+ }
+ }
+ if (defined $ccwarnflags) {
+ $heavy_txt .= "ccwarnflags='$ccwarnflags'\n";
+ }
+ if (defined $ccstdflags) {
+ $heavy_txt .= "ccstdflags='$ccstdflags'\n";
+ }
+}
+
$heavy_txt .= "EOVIRTUAL\n";
$heavy_txt .= <<'ENDOFGIT';
ENDOFTIE
-open(CONFIG_POD, ">$Config_POD") or die "Can't open $Config_POD: $!";
+open(CONFIG_POD, '>', $Config_POD) or die "Can't open $Config_POD: $!";
print CONFIG_POD <<'ENDOFTAIL';
=head1 NAME
ENDOFTAIL
if ($Opts{glossary}) {
- open(GLOS, "<$Glossary") or die "Can't open $Glossary: $!";
+ open(GLOS, '<', $Glossary) or die "Can't open $Glossary: $!";
}
my %seen = ();
my $text = 0;