提交 7b0d591d 编写于 作者: B Ben Laurie

Allow variables to be overridden on the command line.

上级 7bbb8c56
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
# It is basically a list of all variables from the passed makefile # It is basically a list of all variables from the passed makefile
# #
while ($ARGV[0] =~ /^(\S+)\s*=(.*)$/)
{
$sym{$1} = $2;
shift;
}
$s=""; $s="";
while (<>) while (<>)
{ {
...@@ -33,7 +39,7 @@ while (<>) ...@@ -33,7 +39,7 @@ while (<>)
$o =~ s/\s+/ /g; $o =~ s/\s+/ /g;
$o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g; $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
$sym{$s}=$o; $sym{$s}=$o if !exists $sym{$s};
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册