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
5e37b4cb
Commit
5e37b4cb
authored
Mar 24, 2007
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install contrib sql and readme files
parent
ecfb932a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
2 deletions
+82
-2
src/tools/msvc/Install.pm
src/tools/msvc/Install.pm
+82
-2
No files found.
src/tools/msvc/Install.pm
View file @
5e37b4cb
package
Install
;
#
# Package that provides 'make install' functionality for msvc builds
#
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.
2 2007/03/17 14:01:01
mha Exp $
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.
3 2007/03/24 15:28:48
mha Exp $
#
use
strict
;
use
warnings
;
...
...
@@ -34,7 +35,8 @@ sub Install
die
"
Could not find debug or release binaries
"
if
(
$conf
eq
"");
print
"
Installing for
$conf
\n
";
EnsureDirectories
(
$target
,
'
bin
','
lib
','
share
','
share/timezonesets
');
EnsureDirectories
(
$target
,
'
bin
','
lib
','
share
','
share/timezonesets
','
share/contrib
','
doc
',
'
doc/contrib
');
CopySolutionOutput
(
$conf
,
$target
);
copy
(
$target
.
'
/lib/libpq.dll
',
$target
.
'
/bin/libpq.dll
');
...
...
@@ -54,6 +56,7 @@ sub Install
);
GenerateConversionScript
(
$target
);
GenerateTimezoneFiles
(
$target
,
$conf
);
CopyContribFiles
(
$target
);
}
sub
EnsureDirectories
...
...
@@ -194,6 +197,83 @@ sub GenerateTimezoneFiles
print
"
\n
";
}
sub
CopyContribFiles
{
my
$target
=
shift
;
print
"
Copying contrib data files...
";
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
");
my
$mf
=
read_file
("
contrib/
$d
/Makefile
");
$mf
=~
s{\\s*[\r\n]+}{}mg
;
my
$flist
=
'';
if
(
$mf
=~
/^DATA_built\s*=\s*(.*)$/m
)
{
$flist
.=
$1
}
if
(
$mf
=~
/^DATA\s*=\s*(.*)$/m
)
{
$flist
.=
"
$1
"}
$flist
=~
s/^\s*//
;
# Remove leading spaces if we had only DATA_built
if
(
$flist
ne
'')
{
$flist
=
ParseAndCleanRule
(
$flist
,
$mf
);
# Special case for contrib/spi
$flist
=
"
autoinc.sql insert_username.sql moddatetime.sql refint.sql timetravel.sql
"
if
(
$d
eq
'
spi
');
foreach
my
$f
(
split
/\s+/
,
$flist
)
{
copy
('
contrib/
'
.
$d
.
'
/
'
.
$f
,
$target
.
'
/share/contrib/
'
.
basename
(
$f
))
||
croak
("
Could not copy file
$f
in contrib
$d
");
print
'
.
';
}
}
$flist
=
'';
if
(
$mf
=~
/^DOCS\s*=\s*(.*)$/mg
)
{
$flist
.=
$1
}
if
(
$flist
ne
'')
{
$flist
=
ParseAndCleanRule
(
$flist
,
$mf
);
# Special case for contrib/spi
$flist
=
"
README.spi autoinc.example insert_username.example moddatetime.example refint.example timetravel.example
"
if
(
$d
eq
'
spi
');
foreach
my
$f
(
split
/\s+/
,
$flist
)
{
copy
('
contrib/
'
.
$d
.
'
/
'
.
$f
,
$target
.
'
/doc/contrib/
'
.
$f
)
||
croak
("
Coud not copy file
$f
in contrib
$d
");
print
'
.
';
}
}
}
closedir
(
$D
);
print
"
\n
";
}
sub
ParseAndCleanRule
{
my
$flist
=
shift
;
my
$mf
=
shift
;
# Strip out $(addsuffix) rules
if
(
index
(
$flist
,
'
$(addsuffix
')
>=
0
)
{
my
$pcount
=
0
;
my
$i
;
for
(
$i
=
index
(
$flist
,
'
$(addsuffix
')
+
12
;
$i
<
length
(
$flist
);
$i
++
)
{
$pcount
++
if
(
substr
(
$flist
,
$i
,
1
)
eq
'
(
');
$pcount
--
if
(
substr
(
$flist
,
$i
,
1
)
eq
'
)
');
last
if
(
$pcount
<
0
);
}
$flist
=
substr
(
$flist
,
0
,
index
(
$flist
,
'
$(addsuffix
'))
.
substr
(
$flist
,
$i
+
1
);
}
return
$flist
;
}
sub
read_file
{
my
$filename
=
shift
;
...
...
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