提交 e583ffe9 编写于 作者: A Andrew Dunstan

Unbreak MSVC builds after recent Makefile refactoring.

Based on a suggestion by Peter Eisentraut.
上级 4816d2ea
......@@ -42,7 +42,8 @@ open($mf, $makefile);
local $/ = undef;
$make = <$mf>;
close($mf);
my $headerflag = ($make =~ /\$\(BISON\)\s+-d/ ? '-d' : '');
my $basetarg = basename($output);
my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : '');
system("bison $headerflag $input -o $output");
exit $? >> 8;
......@@ -44,7 +44,8 @@ open($mf, $makefile);
local $/ = undef;
$make = <$mf>;
close($mf);
my $flexflags = ($make =~ /^\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
my $basetarg = basename($output);
my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
system("flex $flexflags -o$output $input");
if ($? == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册