# It is basically a list of all variables from the passed makefile
#
+while ($ARGV[0] =~ /^([^\s=]+)\s*=\s*(.*)$/)
+ {
+ $sym{$1} = $2;
+ shift;
+ }
+
$s="";
while (<>)
{
chop;
s/#.*//;
- if (/^(\S+)\s*=\s*(.*)$/)
+ if (/^([^\s=]+)\s*=\s*(.*)$/)
{
$o="";
($s,$b)=($1,$2);
$o =~ s/\s+/ /g;
$o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
- $sym{$s}=$o;
+ $sym{$s}=$o if !exists $sym{$s};
}
}