mirror of https://github.com/postgres/postgres
parent
fa5d08fbf8
commit
c2c0b14086
@ -1,18 +1,21 @@ |
||||
# 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; |
||||
|
||||
@ -1,50 +1,50 @@ |
||||
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"; |
||||
|
||||
@ -1,27 +1,37 @@ |
||||
@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 |
||||
|
||||
@ -1,21 +1,23 @@ |
||||
@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 |
||||
|
||||
Loading…
Reference in new issue