Windows help needed for flex and bison - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Windows help needed for flex and bison
Date
Msg-id 5076C412.6050506@gmx.net
Whole thread Raw
Responses Re: Windows help needed for flex and bison  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
The flex and bison make rules refactoring I just did broke the Windows
build.  I think the fixes should look like the patch below.  Could
someone please verify and/or commit that?

diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl
index d6f2444..15db921 100644
--- a/src/tools/msvc/pgbison.pl
+++ b/src/tools/msvc/pgbison.pl
@@ -42,7 +42,7 @@local $/ = undef;$make = <$mf>;close($mf);
-my $headerflag = ($make =~ /\$\(BISON\)\s+-d/ ? '-d' : '');
+my $headerflag = ($make =~ /^$output: BISONFLAGS\b.*-d/ ? '-d' : '');
system("bison $headerflag $input -o $output");exit $? >> 8;
diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl
index 259f218..29dbc8e 100644
--- a/src/tools/msvc/pgflex.pl
+++ b/src/tools/msvc/pgflex.pl
@@ -44,7 +44,7 @@local $/ = undef;$make = <$mf>;close($mf);
-my $flexflags = ($make =~ /^\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
+my $flexflags = ($make =~ /^$output:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : '');
system("flex $flexflags -o$output $input");if ($? == 0)



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached)
Next
From: Alvaro Herrera
Date:
Subject: Re: embedded list