X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fcheckcfgvar.pl;h=a757d6bfd8cc43904d61ddd2c73f96f71c3b6cd4;hb=115454352a978d4e8b08f627af1ad772bab2816b;hp=adf65a79c3c4f1b3cb464e995ffa2d2f58b183ce;hpb=522c08cc9e4389a24a0837cf43aee02468b29a53;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/checkcfgvar.pl b/Porting/checkcfgvar.pl index adf65a7..a757d6b 100644 --- a/Porting/checkcfgvar.pl +++ b/Porting/checkcfgvar.pl @@ -6,7 +6,8 @@ # needed symbols are not lagging after how Configure thinks the world # is laid out. # -# VMS is not handled here, due to their own rather elaborate DCL scripting. +# VMS is probably not handled properly here, due to their own +# rather elaborate DCL scripting. # use strict; @@ -17,6 +18,8 @@ my %MASTER_CFG; my @CFG = ( # This list contains both 5.8.x and 5.9.x files, # we check from MANIFEST whether they are expected to be present. + # We can't base our check on $], because that's the version of the + # perl that we are running, not the version of the source tree. "Cross/config.sh-arm-linux", "epoc/config.sh", "NetWare/config.wc", @@ -28,7 +31,10 @@ my @CFG = ( "win32/config.bc", "win32/config.gc", "win32/config.vc", - "wince/config.ce", + "win32/config.vc64", + "win32/config.ce", + "configure.com", + "Porting/config.sh", ); sub read_file { @@ -46,8 +52,7 @@ sub read_file { sub config_h_SH_reader { my $cfg = shift; return sub { - return if 1../^echo \"Extracting \$CONFIG_H/; - while (/[^\\]\$(\w+)/g) { + while (/[^\\]\$([a-z]\w+)/g) { my $v = $1; next if $v =~ /^(CONFIG_H|CONFIG_SH)$/; $cfg->{$v}++; @@ -76,13 +81,17 @@ sub check_cfg { for my $cfg (@CFG) { unless (exists $MANIFEST{$cfg}) { - print "[skipping not-expected '$cfg']\n"; + print STDERR "[skipping not-expected '$cfg']\n"; next; } my %cfg; read_file($cfg, sub { - return if /^\#/ || /^\s*$/; + return if /^\#/ || /^\s*$/ || /^\:/; + if ($cfg eq 'configure.com') { + s/(\s*!.*|\s*)$//; # remove trailing comments or whitespace + return if ! /^\$\s+WC "(\w+)='(.*)'"$/; + } # foo='bar' # foo=bar # $foo='bar' # VOS 5.8.x specialty @@ -92,9 +101,15 @@ for my $cfg (@CFG) { } elsif (/^\$?(\w+)=(.*)$/) { $cfg{$1}++; + } + elsif (/^\$\s+WC "(\w+)='(.*)'"$/) { + $cfg{$1}++; } else { warn "$cfg:$.:$_"; } }); + if ($cfg eq 'configure.com') { + $cfg{startperl}++; # Cheat. + } check_cfg($cfg, \%cfg); }