Skip to content

Commit e583ffe

Browse files
committed
Unbreak MSVC builds after recent Makefile refactoring.
Based on a suggestion by Peter Eisentraut.
1 parent 4816d2e commit e583ffe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/tools/msvc/pgbison.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
local $/ = undef;
4343
$make = <$mf>;
4444
close($mf);
45-
my $headerflag = ($make =~ /\$\(BISON\)\s+-d/ ? '-d' : '');
45+
my $basetarg = basename($output);
46+
my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : '');
4647

4748
system("bison $headerflag $input -o $output");
4849
exit $? >> 8;

src/tools/msvc/pgflex.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
local $/ = undef;
4545
$make = <$mf>;
4646
close($mf);
47-
my $flexflags = ($make =~ /^\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
47+
my $basetarg = basename($output);
48+
my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
4849

4950
system("flex $flexflags -o$output $input");
5051
if ($? == 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy