Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c2c0b140
Commit
c2c0b140
authored
Oct 22, 2006
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various MSVC build fixes from Magnus; also remove stray Windows
newlines.
parent
fa5d08fb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
296 additions
and
139 deletions
+296
-139
src/tools/msvc/Project.pm
src/tools/msvc/Project.pm
+17
-2
src/tools/msvc/config.pl
src/tools/msvc/config.pl
+21
-18
src/tools/msvc/gendef.pl
src/tools/msvc/gendef.pl
+50
-50
src/tools/msvc/mkvcbuild.pl
src/tools/msvc/mkvcbuild.pl
+148
-21
src/tools/msvc/pgbison.bat
src/tools/msvc/pgbison.bat
+37
-27
src/tools/msvc/pgflex.bat
src/tools/msvc/pgflex.bat
+23
-21
No files found.
src/tools/msvc/Project.pm
View file @
c2c0b140
...
...
@@ -286,7 +286,7 @@ EOF
my $of = $f;
$of =~ s/
\
.y$/.c/;
$of =~ s{^src
\\
pl
\\
plpgsql
\\
src
\\
gram.c$}{src
\\
pl
\\
plpgsql
\\
src
\\
pl_gram.c};
print F
'
>
'
. GenerateCustomTool(
'
Running
bison
on
'
. $f,
'
src
\
tools
\
msvc
\
pgbison
.
bat
'
. $f, $of) .
'
</
File
>
'
. "
\
n";
print F
'
>
'
. GenerateCustomTool(
'
Running
bison
on
'
. $f,
'
cmd
/V:ON /c
src
\
tools
\
msvc
\
pgbison
.
bat
'
. $f, $of) .
'
</
File
>
'
. "
\
n";
}
elsif ($f =~ /
\
.l$/) {
my $of = $f;
...
...
@@ -358,7 +358,7 @@ sub WriteConfiguration
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
<Tool Name="VCCLCompilerTool" Optimization="$p->{opt}"
AdditionalIncludeDirectories="src/include;src/include/port/win32;src/include/port/win32_msvc;$self->{solution}->{options}->{pthread};$self->{includes}"
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}"
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;
WIN32_STACK_RLIMIT=4194304;
_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}"
StringPooling="$p->{strpool}"
RuntimeLibrary="$p->{runtime}" DisableSpecificWarnings="$self->{disablewarnings}"
EOF
...
...
@@ -407,4 +407,19 @@ EOF
}
# Utility function that loads a complete file
sub read_file {
my $filename = shift;
my $F;
my $t = $/;
undef $/;
open($F, $filename) || croak "Could not open file $filename
\
n";
my $txt = <$F>;
close($F);
$/ = $t;
return $txt;
}
1;
src/tools/msvc/config.pl
View file @
c2c0b140
# Configuration arguments for vcbuild.
use
strict
;
use
warnings
;
our
$config
=
{
asserts
=>
1
,
# --enable-cassert
nls
=>
undef
,
# --enable-nls=<path>
tcl
=>
'
c:
\
tcl
',
# --with-tls=<path>
perl
=>
1
,
# --with-perl
python
=>
'
c:
\
python24
',
# --with-python=<path>
krb5
=>
'
c:
\
prog
\
pgsql
\
depend
\
krb5
',
# --with-krb5=<path>
ldap
=>
1
,
# --with-ldap
openssl
=>
'
c:
\
openssl
',
# --with-ssl=<path>
pthread
=>
'
c:
\
prog
\
pgsql
\
depend
\
pthread
',
# foo baz?
zlib
=>
'
c:
\
prog
\
pgsql
\
depend
\
zlib
'
# --with-zlib=<path>
};
1
;
# Configuration arguments for vcbuild.
use
strict
;
use
warnings
;
our
$config
=
{
asserts
=>
1
,
# --enable-cassert
nls
=>
undef
,
# --enable-nls=<path>
tcl
=>
'
c:
\
tcl
',
# --with-tls=<path>
perl
=>
1
,
# --with-perl
python
=>
'
c:
\
python24
',
# --with-python=<path>
krb5
=>
'
c:
\
prog
\
pgsql
\
depend
\
krb5
',
# --with-krb5=<path>
ldap
=>
1
,
# --with-ldap
openssl
=>
'
c:
\
openssl
',
# --with-ssl=<path>
pthread
=>
'
c:
\
prog
\
pgsql
\
depend
\
pthread
',
xml
=>
'
c:
\
prog
\
pgsql
\
depend
\
libxml2
',
xslt
=>
'
c:
\
prog
\
pgsql
\
depend
\
libxslt
',
iconv
=>
'
c:
\
prog
\
pgsql
\
depend
\
iconv
',
zlib
=>
'
c:
\
prog
\
pgsql
\
depend
\
zlib
'
# --with-zlib=<path>
};
1
;
src/tools/msvc/gendef.pl
View file @
c2c0b140
my
@def
;
die
"
Usage: gendef.pl <modulepath>
\n
"
unless
(
$ARGV
[
0
]
=~
/\\([^\\]+$)/
);
my
$defname
=
uc
$1
;
if
(
-
f
"
$ARGV
[0]/
$defname
.def
")
{
print
"
Not re-generating
$defname
.DEF, file already exists.
\n
";
exit
(
0
);
}
print
"
Generating
$defname
.DEF from directory
$ARGV
[0]
\n
";
while
(
<
$ARGV
[
0
]
/*>
)
{
print
"
.
";
open
(
F
,"
dumpbin /symbols
$_
|
")
||
die
"
Could not open
$_
\n
";
while
(
<
F
>
)
{
s/\(\)//g
;
next
unless
/^\d/
;
my
@pieces
=
split
;
next
unless
$pieces
[
6
];
next
if
(
$pieces
[
2
]
eq
"
UNDEF
");
next
unless
(
$pieces
[
4
]
eq
"
External
");
next
if
$pieces
[
6
]
=~
/^@/
;
next
if
$pieces
[
6
]
=~
/^\(/
;
next
if
$pieces
[
6
]
=~
/^__real/
;
next
if
$pieces
[
6
]
=~
/^__imp/
;
next
if
$pieces
[
6
]
=~
/NULL_THUNK_DATA$/
;
next
if
$pieces
[
6
]
=~
/^__IMPORT_DESCRIPTOR/
;
next
if
$pieces
[
6
]
=~
/^__NULL_IMPORT/
;
push
@def
,
$pieces
[
6
];
}
close
(
F
);
}
print
"
\n
";
open
(
DEF
,"
>
$ARGV
[0]/
$defname
.def
")
||
die
"
Could not write to
$defname
\n
";
print
DEF
"
EXPORTS
\n
";
my
$i
=
0
;
my
$last
=
"";
foreach
my
$f
(
sort
@def
)
{
next
if
(
$f
eq
$last
);
$last
=
$f
;
$f
=~
s/^_//
;
$i
++
;
# print DEF " $f \@ $i\n"; # ordinaled exports?
print
DEF
"
$f
\n
";
}
close
(
DEF
);
print
"
Generated
$i
symbols
\n
";
my
@def
;
die
"
Usage: gendef.pl <modulepath>
\n
"
unless
(
$ARGV
[
0
]
=~
/\\([^\\]+$)/
);
my
$defname
=
uc
$1
;
if
(
-
f
"
$ARGV
[0]/
$defname
.def
")
{
print
"
Not re-generating
$defname
.DEF, file already exists.
\n
";
exit
(
0
);
}
print
"
Generating
$defname
.DEF from directory
$ARGV
[0]
\n
";
while
(
<
$ARGV
[
0
]
/*>
)
{
print
"
.
";
open
(
F
,"
dumpbin /symbols
$_
|
")
||
die
"
Could not open
$_
\n
";
while
(
<
F
>
)
{
s/\(\)//g
;
next
unless
/^\d/
;
my
@pieces
=
split
;
next
unless
$pieces
[
6
];
next
if
(
$pieces
[
2
]
eq
"
UNDEF
");
next
unless
(
$pieces
[
4
]
eq
"
External
");
next
if
$pieces
[
6
]
=~
/^@/
;
next
if
$pieces
[
6
]
=~
/^\(/
;
next
if
$pieces
[
6
]
=~
/^__real/
;
next
if
$pieces
[
6
]
=~
/^__imp/
;
next
if
$pieces
[
6
]
=~
/NULL_THUNK_DATA$/
;
next
if
$pieces
[
6
]
=~
/^__IMPORT_DESCRIPTOR/
;
next
if
$pieces
[
6
]
=~
/^__NULL_IMPORT/
;
push
@def
,
$pieces
[
6
];
}
close
(
F
);
}
print
"
\n
";
open
(
DEF
,"
>
$ARGV
[0]/
$defname
.def
")
||
die
"
Could not write to
$defname
\n
";
print
DEF
"
EXPORTS
\n
";
my
$i
=
0
;
my
$last
=
"";
foreach
my
$f
(
sort
@def
)
{
next
if
(
$f
eq
$last
);
$last
=
$f
;
$f
=~
s/^_//
;
$i
++
;
# print DEF " $f \@ $i\n"; # ordinaled exports?
print
DEF
"
$f
\n
";
}
close
(
DEF
);
print
"
Generated
$i
symbols
\n
";
src/tools/msvc/mkvcbuild.pl
View file @
c2c0b140
...
...
@@ -144,16 +144,73 @@ my $pgrestore = AddSimpleFrontend('pg_dump', 1);
$pgrestore
->
{
name
}
=
'
pg_restore
';
$pgrestore
->
AddFile
('
src
\
bin
\
pg_dump
\
pg_restore.c
');
open
(
MF
,'
src
\
backend
\
utils
\
mb
\
conversion_procs
\
Makefile
')
||
die
'
Could not open src
\
backend
\
utils
\
mb
\
conversion_procs
\
Makefile
';
my
$t
=
$/
;
undef
$/
;
my
$mf
=
<
MF
>
;
close
(
MF
);
my
$zic
=
$solution
->
AddProject
('
zic
','
exe
','
utils
');
$zic
->
AddFiles
('
src
\
timezone
','
zic.c
','
ialloc.c
','
scheck.c
','
localtime.c
');
$zic
->
AddReference
(
$libpgport
);
my
$contrib_defines
=
{
'
refint
'
=>
'
REFINT_VERBOSE
'
};
my
@contrib_uselibpq
=
('
dblink
',
'
oid2name
',
'
pgbench
',
'
vacuumlo
');
my
@contrib_uselibpgport
=
('
oid2name
',
'
pgbench
',
'
vacuumlo
');
my
$contrib_extralibs
=
{
'
pgbench
'
=>
['
wsock32.lib
']
};
my
$contrib_extraincludes
=
{
'
tsearch2
'
=>
['
contrib/tsearch2
']
};
my
$contrib_extrasource
=
{
'
cube
'
=>
['
cubescan.l
','
cubeparse.y
'],
'
seg
'
=>
['
segscan.l
','
segparse.y
']
};
my
@contrib_excludes
=
('
pgcrypto
');
if
(
$solution
->
{
options
}
->
{
xml
})
{
$contrib_extraincludes
->
{'
xml2
'}
=
[
$solution
->
{
options
}
->
{
xml
}
.
'
\
include
'
,
$solution
->
{
options
}
->
{
xslt
}
.
'
\
include
',
$solution
->
{
options
}
->
{
iconv
}
.
'
\
include
'];
$contrib_extralibs
->
{'
xml2
'}
=
[
$solution
->
{
options
}
->
{
xml
}
.
'
\
lib
\
libxml2.lib
',
$solution
->
{
options
}
->
{
xslt
}
.
'
\
lib
\
libxslt.lib
'];
}
else
{
push
@contrib_excludes
,'
xml2
';
}
# Pgcrypto makefile too complex to parse....
my
$pgcrypto
=
$solution
->
AddProject
('
pgcrypto
','
dll
','
crypto
');
$pgcrypto
->
AddFiles
('
contrib
\
pgcrypto
','
pgcrypto.c
','
px.c
','
px-hmac.c
','
px-crypt.c
',
'
crypt-gensalt.c
','
crypt-blowfish.c
','
crypt-des.c
','
crypt-md5.c
','
mbuf.c
',
'
pgp.c
','
pgp-armor.c
','
pgp-cfb.c
','
pgp-compress.c
','
pgp-decrypt.c
','
pgp-encrypt.c
',
'
pgp-info.c
','
pgp-mpi.c
','
pgp-pubdec.c
','
pgp-pubenc.c
','
pgp-pubkey.c
','
pgp-s2k.c
',
'
pgp-pgsql.c
');
if
(
$solution
->
{
options
}
->
{
openssl
})
{
$pgcrypto
->
AddFiles
('
contrib
\
pgcrypto
',
'
openssl.c
','
pgp-mpi-openssl.c
');
}
else
{
$pgcrypto
->
AddFiles
('
contrib
\
pgcrypto
',
'
md5.c
','
sha1.c
','
sha2.c
','
internal.c
','
internal-sha2.c
',
'
blf.c
','
rijndael.c
','
fortuna.c
','
random.c
','
pgp-mpi-internal.c
','
imath.c
');
}
$pgcrypto
->
AddReference
(
$postgres
);
$pgcrypto
->
AddLibrary
('
wsock32.lib
');
my
$D
;
opendir
(
$D
,
'
contrib
')
||
croak
"
Could not opendir on contrib!
\n
";
while
(
my
$d
=
readdir
(
$D
))
{
next
if
(
$d
=~
/^\./
);
next
unless
(
-
f
"
contrib/
$d
/Makefile
");
next
if
(
grep
{
/^$d$/
}
@contrib_excludes
);
AddContrib
(
$d
);
}
closedir
(
$D
);
my
$mf
=
Project::
read_file
('
src
\
backend
\
utils
\
mb
\
conversion_procs
\
Makefile
');
$mf
=~
s{\\s*[\r\n]+}{}mg
;
$mf
=~
m{DIRS\s*=\s*(.*)$}m
||
die
'
Could not match in conversion makefile
'
.
"
\n
";
foreach
my
$sub
(
split
/\s+/
,
$1
)
{
open
(
MF
,'
src
\
backend
\
utils
\
mb
\
conversion_procs
\
\'
. $sub .
'
\
Makefile
'
) || die
'
Could
not
open
Makefile
for
$sub
'
;
$mf = <MF>;
close(MF);
my
$mf
=
Project::
read_file
('
src
\
backend
\
utils
\
mb
\
conversion_procs
\
\'
. $sub .
'
\
Makefile
'
);
my $p = $solution->AddProject($sub,
'
dll
'
,
'
conversion
procs
'
);
$p->AddFile(
'
src
\
backend
\
utils
\
mb
\
conversion_procs
\\
'
. $sub .
'
\\
'
. $sub .
'
.
c
'
);
if ($mf =~ m{^SRCS
\
s*
\
+=
\
s*(.*)$}m) {
...
...
@@ -162,9 +219,7 @@ foreach my $sub (split /\s+/,$1) {
$p->AddReference($postgres);
}
open(MF,
'
src
\
bin
\
scripts
\
Makefile
'
) || die
'
Could
not
open
src
\
bin
\
scripts
\
Makefile
'
;
$mf = <MF>;
close(MF);
$mf = Project::read_file(
'
src
\
bin
\
scripts
\
Makefile
'
);
$mf =~ s{
\\
s*[
\
r
\
n]+}{}mg;
$mf =~ m{PROGRAMS
\
s*=
\
s*(.*)$}m || die
'
Could
not
match
in
bin
\
scripts
\
Makefile
'
. "
\
n";
foreach my $prg (split /
\
s+/,$1) {
...
...
@@ -194,7 +249,6 @@ foreach my $prg (split /\s+/,$1) {
$proj->AddReference($libpq,$libpgport);
$proj->AddResourceFile(
'
src
\
bin
\
scripts
'
,
'
PostgreSQL
Utility
'
);
}
$/ = $t;
# Regression DLLs
...
...
@@ -202,16 +256,6 @@ my $regress = $solution->AddProject('regress','dll','misc');
$regress->AddFile(
'
src
\
test
\
regress
\
regress
.
c
'
);
$regress->AddReference($postgres);
my $refint = $solution->AddProject(
'
refint
'
,
'
dll
'
,
'
contrib
'
);
$refint->AddFile(
'
contrib
\
spi
\
refint
.
c
'
);
$refint->AddReference($postgres);
$refint->AddDefine(
'
REFINT_VERBOSE
'
);
my $autoinc = $solution->AddProject(
'
autoinc
'
,
'
dll
'
,
'
contrib
'
);
$autoinc ->AddFile(
'
contrib
\
spi
\
autoinc
.
c
'
);
$autoinc->AddReference($postgres);
$solution->Save();
#####################
...
...
@@ -234,3 +278,86 @@ sub AddSimpleFrontend {
return $p;
}
# Add a simple contrib project
sub AddContrib {
my $n = shift;
my $mf = Project::read_file(
'
contrib
\\
'
. $n .
'
\
Makefile
'
);
if ($mf =~ /^MODULE_big/mg) {
$mf =~ s{
\\\
s*[
\
r
\
n]+}{}mg;
my $proj = $solution->AddProject($n,
'
dll
'
,
'
contrib
'
);
$mf =~ /^OBJS
\
s*=
\
s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n
\
n";
foreach my $o (split /
\
s+/, $1) {
$o =~ s/
\
.o$/.c/;
$proj->AddFile(
'
contrib
\\
'
. $n .
'
\\
'
. $o);
}
$proj->AddReference($postgres);
if ($mf =~ /^SUBDIRS
\
s*:?=
\
s*(.*)$/mg) {
foreach my $d (split /
\
s+/, $1) {
my $mf2 = Project::read_file(
'
contrib
\\
'
. $n .
'
\\
'
. $d .
'
\
Makefile
'
);
$mf2 =~ s{
\\\
s*[
\
r
\
n]+}{}mg;
$mf2 =~ /^SUBOBJS
\
s*=
\
s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n, subdir $d
\
n";
foreach my $o (split /
\
s+/, $1) {
$o =~ s/
\
.o$/.c/;
$proj->AddFile(
'
contrib
\\
'
. $n .
'
\\
'
. $d .
'
\\
'
. $o);
}
}
}
AdjustContribProj($proj);
return $proj;
}
elsif ($mf =~ /^MODULES
\
s*=
\
s*(.*)$/mg) {
foreach my $mod (split /
\
s+/, $1) {
my $proj = $solution->AddProject($mod,
'
dll
'
,
'
contrib
'
);
$proj->AddFile(
'
contrib
\\
'
. $n .
'
\\
'
. $mod .
'
.
c
'
);
$proj->AddReference($postgres);
AdjustContribProj($proj);
}
return undef;
}
elsif ($mf =~ /^PROGRAM
\
s*=
\
s*(.*)$/mg) {
my $proj = $solution->AddProject($1,
'
exe
'
,
'
contrib
'
);
$mf =~ /^OBJS
\
s*=
\
s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n
\
n";
foreach my $o (split /
\
s+/, $1) {
$o =~ s/
\
.o$/.c/;
$proj->AddFile(
'
contrib
\\
'
. $n .
'
\\
'
. $o);
}
AdjustContribProj($proj);
return $proj;
}
else {
croak "Could not determine contrib module type for $n
\
n";
}
}
sub AdjustContribProj {
my $proj = shift;
my $n = $proj->{name};
if ($contrib_defines->{$n}) {
foreach my $d ($contrib_defines->{$n}) {
$proj->AddDefine($d);
}
}
if (grep {/^$n$/} @contrib_uselibpq) {
$proj->AddIncludeDir(
'
src
\
interfaces
\
libpq
'
);
$proj->AddReference($libpq);
}
if (grep {/^$n$/} @contrib_uselibpgport) {
$proj->AddReference($libpgport);
}
if ($contrib_extralibs->{$n}) {
foreach my $l (@{$contrib_extralibs->{$n}}) {
$proj->AddLibrary($l);
}
}
if ($contrib_extraincludes->{$n}) {
foreach my $i (@{$contrib_extraincludes->{$n}}) {
$proj->AddIncludeDir($i);
}
}
if ($contrib_extrasource->{$n}) {
$proj->AddFiles(
'
contrib
\\
'
. $n, @{$contrib_extrasource->{$n}});
}
}
src/tools/msvc/pgbison.bat
View file @
c2c0b140
@echo
off
bison
-V
>
NUL
if
errorlevel
1
goto
nobison
if
"
%
1"
==
"src\backend\parser\gram.y"
call
:generate
%
1
src
\backend\parser\gram.c
src
\include\parser\parse.h
if
"
%
1"
==
"src\backend\bootstrap\bootparse.y"
call
:generate
%
1
src
\backend\bootstrap\bootparse.c
src
\backend\bootstrap\bootstrap_tokens.h
if
"
%
1"
==
"src\pl\plpgsql\src\gram.y"
call
:generate
%
1
src
\pl\plpgsql\src\pl_gram.c
src
\pl\plpgsql\src\pl.tab.h
if
"
%
1"
==
"src\interfaces\ecpg\preproc\preproc.y"
call
:generate
%
1
src
\interfaces\ecpg\preproc\preproc.c
src
\interfaces\ecpg\preproc\preproc.h
echo
Unknown
bison
input
:
%
1
exit
1
:generate
SET
fn
=
%
1
bison
-d
%fn%
if
errorlevel
1
exit
1
copy
/y
%fn
:
~
0
,-
2
%
.tab.c
%
2
if
errorlevel
1
exit
1
copy
/y
%fn
:
~
0
,-
2
%
.tab.h
%
3
if
errorlevel
1
exit
1
del
%fn
:
~
0
,-
2
%
.tab.
*
exit
0
:nobison
echo
WARNING
!
Bison
install
not
found
,
attempting
to
build
without
!
exit
0
@echo
off
SET
BV
=
for
/F
"tokens=4 usebackq"
%%f
in
(
`bison -V`
)
do
if
"
!BV!
"
==
""
SET
BV
=
%%f
if
"
%BV%
"
==
""
goto
novarexp
if
%BV%
LSS
1
.875
goto
nobison
if
%BV%
EQU
2
.1
goto
nobison
if
"
%
1"
==
"src\backend\parser\gram.y"
call
:generate
%
1
src
\backend\parser\gram.c
src
\include\parser\parse.h
if
"
%
1"
==
"src\backend\bootstrap\bootparse.y"
call
:generate
%
1
src
\backend\bootstrap\bootparse.c
src
\backend\bootstrap\bootstrap_tokens.h
if
"
%
1"
==
"src\pl\plpgsql\src\gram.y"
call
:generate
%
1
src
\pl\plpgsql\src\pl_gram.c
src
\pl\plpgsql\src\pl.tab.h
if
"
%
1"
==
"src\interfaces\ecpg\preproc\preproc.y"
call
:generate
%
1
src
\interfaces\ecpg\preproc\preproc.c
src
\interfaces\ecpg\preproc\preproc.h
if
"
%
1"
==
"contrib\cube\cubeparse.y"
call
:generate
%
1
contrib
\cube\cubeparse.c
contrib
\cube\cubeparse.h
if
"
%
1"
==
"contrib\seg\segparse.y"
call
:generate
%
1
contrib
\seg\segparse.c
contrib
\seg\segparse.h
echo
Unknown
bison
input
:
%
1
exit
1
:generate
SET
fn
=
%
1
bison
-d
%fn%
if
errorlevel
1
exit
1
copy
/y
%fn
:
~
0
,-
2
%
.tab.c
%
2
if
errorlevel
1
exit
1
copy
/y
%fn
:
~
0
,-
2
%
.tab.h
%
3
if
errorlevel
1
exit
1
del
%fn
:
~
0
,-
2
%
.tab.
*
exit
0
:novarexp
echo
pgbison
must
be
called
with
cmd
/V
:ON
/C
pgbison
to
work
!
exit
1
:nobison
echo
WARNING
!
Bison
install
not
found
,
or
unsupported
Bison
version
.
echo
Attempting
to
build
without
.
exit
0
src/tools/msvc/pgflex.bat
View file @
c2c0b140
@echo
off
flex
-V
>
NUL
if
errorlevel
1
goto
noflex
if
"
%
1"
==
"src\backend\parser\scan.l"
call
:generate
%
1
src
\backend\parser\scan.c
-CF
if
"
%
1"
==
"src\backend\bootstrap\bootscanner.l"
call
:generate
%
1
src
\backend\bootstrap\bootscanner.c
if
"
%
1"
==
"src\backend\utils\misc\guc-file.l"
call
:generate
%
1
src
\backend\utils\misc\guc
-file
.c
if
"
%
1"
==
"src\pl\plpgsql\src\scan.l"
call
:generate
%
1
src
\pl\plpgsql\src\pl_scan.c
if
"
%
1"
==
"src\interfaces\ecpg\preproc\pgc.l"
call
:generate
%
1
src
\interfaces\ecpg\preproc\pgc.c
if
"
%
1"
==
"src\bin\psql\psqlscan.l"
call
:generate
%
1
src
\bin\psql\psqlscan.c
echo
Unknown
flex
input
:
%
1
exit
1
:generate
flex
%
3
-o
%
2
%
1
exit
%errorlevel%
:noflex
echo
WARNING
!
flex
install
not
found
,
attempting
to
build
without
exit
0
@echo
off
flex
-V
>
NUL
if
errorlevel
1
goto
noflex
if
"
%
1"
==
"src\backend\parser\scan.l"
call
:generate
%
1
src
\backend\parser\scan.c
-CF
if
"
%
1"
==
"src\backend\bootstrap\bootscanner.l"
call
:generate
%
1
src
\backend\bootstrap\bootscanner.c
if
"
%
1"
==
"src\backend\utils\misc\guc-file.l"
call
:generate
%
1
src
\backend\utils\misc\guc
-file
.c
if
"
%
1"
==
"src\pl\plpgsql\src\scan.l"
call
:generate
%
1
src
\pl\plpgsql\src\pl_scan.c
if
"
%
1"
==
"src\interfaces\ecpg\preproc\pgc.l"
call
:generate
%
1
src
\interfaces\ecpg\preproc\pgc.c
if
"
%
1"
==
"src\bin\psql\psqlscan.l"
call
:generate
%
1
src
\bin\psql\psqlscan.c
if
"
%
1"
==
"contrib\cube\cubescan.l"
call
:generate
%
1
contrib
\cube\cubescan.c
if
"
%
1"
==
"contrib\seg\segscan.l"
call
:generate
%
1
contrib
\seg\segscan.c
echo
Unknown
flex
input
:
%
1
exit
1
:generate
flex
%
3
-o
%
2
%
1
exit
%errorlevel%
:noflex
echo
WARNING
!
flex
install
not
found
,
attempting
to
build
without
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment