Tune configure.com checking to ignore trailing comments.
Craig A. Berry [Thu, 23 Nov 2006 16:11:16 +0000 (16:11 +0000)]
p4raw-id: //depot/perl@29362

Porting/checkcfgvar.pl

index 84e0f05..955120e 100644 (file)
@@ -87,8 +87,10 @@ for my $cfg (@CFG) {
     read_file($cfg,
              sub {
                  return if /^\#/ || /^\s*$/;
-                 return if $cfg eq 'configure.com' &&
-                           ! /^\$\s+WC "(\w+)='(.*)'"$/;
+                 if ($cfg eq 'configure.com') {
+                     s/\s*!.*$//; # remove trailing comments
+                     return if ! /^\$\s+WC "(\w+)='(.*)'"$/;
+                 }
                  # foo='bar'
                  # foo=bar
                  # $foo='bar' # VOS 5.8.x specialty