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
e69f7f45
Commit
e69f7f45
authored
Mar 23, 2007
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate SQL files for /contrib (based on .sql.in)
parent
fb8155d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
5 deletions
+63
-5
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Mkvcbuild.pm
+55
-4
src/tools/msvc/clean.bat
src/tools/msvc/clean.bat
+8
-1
No files found.
src/tools/msvc/Mkvcbuild.pm
View file @
e69f7f45
package
Mkvcbuild
;
#
# Package that generates build files for msvc build
#
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.
4 2007/03/21 14:39:2
3 mha Exp $
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.
5 2007/03/23 09:53:3
3 mha Exp $
#
use
Carp
;
use
Win32
;
...
...
@@ -249,6 +250,8 @@ sub mkvcbuild
}
$pgcrypto
->
AddReference
(
$postgres
);
$pgcrypto
->
AddLibrary
('
wsock32.lib
');
my
$mf
=
Project::
read_file
('
contrib/pgcrypto/Makefile
');
GenerateContribSqlFiles
('
pgcrypto
',
$mf
);
my
$D
;
opendir
(
$D
,
'
contrib
')
||
croak
"
Could not opendir on contrib!
\n
";
...
...
@@ -384,7 +387,6 @@ sub AddContrib
}
}
AdjustContribProj($proj);
return $proj;
}
elsif ($mf =~ /^MODULES
\
s*=
\
s*(.*)$/mg)
{
...
...
@@ -395,7 +397,6 @@ sub AddContrib
$proj->AddReference($postgres);
AdjustContribProj($proj);
}
return undef;
}
elsif ($mf =~ /^PROGRAM
\
s*=
\
s*(.*)$/mg)
{
...
...
@@ -407,12 +408,62 @@ sub AddContrib
$proj->AddFile(
'
contrib
\\
'
. $n .
'
\\
'
. $o);
}
AdjustContribProj($proj);
return $proj;
}
else
{
croak "Could not determine contrib module type for $n
\
n";
}
# Are there any output data files to build?
GenerateContribSqlFiles($n, $mf);
}
sub GenerateContribSqlFiles
{
my $n = shift;
my $mf = shift;
if ($mf =~ /^DATA_built
\
s*=
\
s*(.*)$/mg)
{
my $l = $1;
# Strip out $(addsuffix) rules
if (index($l,
'
$
(
addsuffix
'
) >= 0)
{
my $pcount = 0;
my $i;
for ($i = index($l,
'
$
(
addsuffix
'
) + 12; $i < length($l); $i++)
{
$pcount++ if (substr($l, $i, 1) eq
'('
);
$pcount-- if (substr($l, $i, 1) eq
')'
);
last if ($pcount < 0);
}
$l = substr($l, 0, index($l,
'
$
(
addsuffix
'
)) . substr($l, $i+1);
}
# Special case for contrib/spi
$l = "autoinc.sql insert_username.sql moddatetime.sql refint.sql timetravel.sql"
if ($n eq
'
spi
'
);
foreach my $d (split /
\
s+/, $l)
{
my $in = "$d.in";
my $out = "$d";
# tsearch2 uses inconsistent naming
$in = "tsearch.sql.in" if ($in eq "tsearch2.sql.in");
$in = "untsearch.sql.in" if ($in eq "uninstall_tsearch2.sql.in");
if (Solution::IsNewer("contrib/$n/$out", "contrib/$n/$in"))
{
print "Building $out from $in (contrib/$n)...
\
n";
my $cont = Project::read_file("contrib/$n/$in");
$cont =~ s/MODULE_PATHNAME/
\
$libdir
\
/$n/g;
my $o;
open($o,">contrib/$n/$out") || croak "Could not write to contrib/$n/$d";
print $o $cont;
close($o);
}
}
}
}
sub AdjustContribProj
...
...
src/tools/msvc/clean.bat
View file @
e69f7f45
@echo
off
REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.
3 2007/03/17 14:01:01
mha Exp $
REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.
4 2007/03/23 09:53:33
mha Exp $
set
D
=
%CD%
if
exist
..\msvc
if
exist
..\..\..\src
cd
..\..\..
...
...
@@ -51,6 +51,13 @@ call :del contrib\spi\refint.dll
call
:del
contrib
\spi\autoinc.dll
call
:del
src
\test\regress\regress.dll
REM Clean up datafiles built with contrib
cd
contrib
for
/r
%%f
in
(*
.sql
)
do
if
exist
%%f
.in
del
%%f
REM Clean up tsearch2 which uses inconsistent names
call
:del
tsearch2
\tsearch2.sql
call
:del
tsearch2
\uninstall_tsearch2.sql
cd
%D%
goto
:eof
...
...
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