Обсуждение: Windows help needed for flex and bison

Поиск
Список
Период
Сортировка

Windows help needed for flex and bison

От
Peter Eisentraut
Дата:
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)



Re: Windows help needed for flex and bison

От
Andrew Dunstan
Дата:
On 10/11/2012 09:05 AM, Peter Eisentraut wrote:
> 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?


Close, but not quite. I have made it work and committed it.

cheers

andrew