Skip to content

Commit 01ff8dd

Browse files
committed
Fix MSVC build scripts for recent extension-related changes.
Untested, but we'll soon see if the buildfarm likes this.
1 parent 555353c commit 01ff8dd

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

src/tools/msvc/Install.pm

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ sub Install
5656
my $majorver = DetermineMajorVersion();
5757
print "Installing version $majorver for $conf in $target\n";
5858

59-
EnsureDirectories($target, 'bin','lib','share','share/timezonesets','share/contrib','doc',
60-
'doc/contrib', 'symbols', 'share/tsearch_data');
59+
EnsureDirectories($target, 'bin', 'lib', 'share', 'share/timezonesets',
60+
'share/extension', 'share/contrib',
61+
'doc', 'doc/extension', 'doc/contrib',
62+
'symbols', 'share/tsearch_data');
6163

6264
CopySolutionOutput($conf, $target);
6365
lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');
@@ -316,7 +318,27 @@ sub CopyContribFiles
316318

317319
my $mf = read_file("contrib/$d/Makefile");
318320
$mf =~ s{\\s*[\r\n]+}{}mg;
321+
322+
# Note: we currently don't support setting MODULEDIR in the makefile
323+
my $moduledir = 'contrib';
324+
319325
my $flist = '';
326+
if ($mf =~ /^EXTENSION\s*=\s*(.*)$/m) {$flist .= $1}
327+
if ($flist ne '')
328+
{
329+
$moduledir = 'extension';
330+
$flist = ParseAndCleanRule($flist, $mf);
331+
332+
foreach my $f (split /\s+/,$flist)
333+
{
334+
lcopy('contrib/' . $d . '/' . $f . '.control',
335+
$target . '/share/extension/' . $f . '.control')
336+
|| croak("Could not copy file $f.control in contrib $d");
337+
print '.';
338+
}
339+
}
340+
341+
$flist = '';
320342
if ($mf =~ /^DATA_built\s*=\s*(.*)$/m) {$flist .= $1}
321343
if ($mf =~ /^DATA\s*=\s*(.*)$/m) {$flist .= " $1"}
322344
$flist =~ s/^\s*//; # Remove leading spaces if we had only DATA_built
@@ -327,7 +349,8 @@ sub CopyContribFiles
327349

328350
foreach my $f (split /\s+/,$flist)
329351
{
330-
lcopy('contrib/' . $d . '/' . $f,$target . '/share/contrib/' . basename($f))
352+
lcopy('contrib/' . $d . '/' . $f,
353+
$target . '/share/' . $moduledir . '/' . basename($f))
331354
|| croak("Could not copy file $f in contrib $d");
332355
print '.';
333356
}
@@ -341,7 +364,8 @@ sub CopyContribFiles
341364

342365
foreach my $f (split /\s+/,$flist)
343366
{
344-
lcopy('contrib/' . $d . '/' . $f,$target . '/share/tsearch_data/' . basename($f))
367+
lcopy('contrib/' . $d . '/' . $f,
368+
$target . '/share/tsearch_data/' . basename($f))
345369
|| croak("Could not copy file $f in contrib $d");
346370
print '.';
347371
}
@@ -359,7 +383,8 @@ sub CopyContribFiles
359383
if ($d eq 'spi');
360384
foreach my $f (split /\s+/,$flist)
361385
{
362-
lcopy('contrib/' . $d . '/' . $f, $target . '/doc/contrib/' . $f)
386+
lcopy('contrib/' . $d . '/' . $f,
387+
$target . '/doc/' . $moduledir . '/' . $f)
363388
|| croak("Could not copy file $f in contrib $d");
364389
print '.';
365390
}
@@ -430,7 +455,7 @@ sub CopyIncludeFiles
430455
'src/include/', 'pg_config.h', 'pg_config_os.h'
431456
);
432457
CopyFiles('Grammar header', $target . '/include/server/parser/',
433-
'src/backend/parser/', 'gram.h');
458+
'src/backend/parser/', 'gram.h');
434459
CopySetOfFiles('',[ glob("src\\include\\*.h") ],$target . '/include/server/');
435460
my $D;
436461
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy