Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
e69f7f45
Commit
e69f7f45
authored
18 years ago
by
Magnus Hagander
Browse files
Options
Downloads
Patches
Plain Diff
Generate SQL files for /contrib (based on .sql.in)
parent
fb8155d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tools/msvc/Mkvcbuild.pm
+55
-4
55 additions, 4 deletions
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/clean.bat
+8
-1
8 additions, 1 deletion
src/tools/msvc/clean.bat
with
63 additions
and
5 deletions
src/tools/msvc/Mkvcbuild.pm
+
55
−
4
View file @
e69f7f45
package
Mkvcbuild
;
package
Mkvcbuild
;
#
#
# Package that generates build files for msvc build
# Package that generates build files for msvc build
#
#
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.
4
2007/03/2
1 14:39:2
3 mha Exp $
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.
5
2007/03/2
3 09:53:3
3 mha Exp $
#
#
use
Carp
;
use
Carp
;
use
Win32
;
use
Win32
;
...
@@ -249,6 +250,8 @@ sub mkvcbuild
...
@@ -249,6 +250,8 @@ sub mkvcbuild
}
}
$pgcrypto
->
AddReference
(
$postgres
);
$pgcrypto
->
AddReference
(
$postgres
);
$pgcrypto
->
AddLibrary
('
wsock32.lib
');
$pgcrypto
->
AddLibrary
('
wsock32.lib
');
my
$mf
=
Project::
read_file
('
contrib/pgcrypto/Makefile
');
GenerateContribSqlFiles
('
pgcrypto
',
$mf
);
my
$D
;
my
$D
;
opendir
(
$D
,
'
contrib
')
||
croak
"
Could not opendir on contrib!
\n
";
opendir
(
$D
,
'
contrib
')
||
croak
"
Could not opendir on contrib!
\n
";
...
@@ -384,7 +387,6 @@ sub AddContrib
...
@@ -384,7 +387,6 @@ sub AddContrib
}
}
}
}
AdjustContribProj
(
$proj
);
AdjustContribProj
(
$proj
);
return
$proj
;
}
}
elsif
(
$mf
=~
/^MODULES\s*=\s*(.*)$/mg
)
elsif
(
$mf
=~
/^MODULES\s*=\s*(.*)$/mg
)
{
{
...
@@ -395,7 +397,6 @@ sub AddContrib
...
@@ -395,7 +397,6 @@ sub AddContrib
$proj
->
AddReference
(
$postgres
);
$proj
->
AddReference
(
$postgres
);
AdjustContribProj
(
$proj
);
AdjustContribProj
(
$proj
);
}
}
return
undef
;
}
}
elsif
(
$mf
=~
/^PROGRAM\s*=\s*(.*)$/mg
)
elsif
(
$mf
=~
/^PROGRAM\s*=\s*(.*)$/mg
)
{
{
...
@@ -407,12 +408,62 @@ sub AddContrib
...
@@ -407,12 +408,62 @@ sub AddContrib
$proj
->
AddFile
('
contrib
\\
'
.
$n
.
'
\\
'
.
$o
);
$proj
->
AddFile
('
contrib
\\
'
.
$n
.
'
\\
'
.
$o
);
}
}
AdjustContribProj
(
$proj
);
AdjustContribProj
(
$proj
);
return
$proj
;
}
}
else
else
{
{
croak
"
Could not determine contrib module type for
$n
\n
";
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
sub
AdjustContribProj
...
...
This diff is collapsed.
Click to expand it.
src/tools/msvc/clean.bat
+
8
−
1
View file @
e69f7f45
@echo
off
@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%
set
D
=
%CD%
if
exist
..\msvc
if
exist
..\..\..\src
cd
..\..\..
if
exist
..\msvc
if
exist
..\..\..\src
cd
..\..\..
...
@@ -51,6 +51,13 @@ call :del contrib\spi\refint.dll
...
@@ -51,6 +51,13 @@ call :del contrib\spi\refint.dll
call
:del
contrib
\spi\autoinc.dll
call
:del
contrib
\spi\autoinc.dll
call
:del
src
\test\regress\regress.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%
cd
%D%
goto
:eof
goto
:eof
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment