Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit22d0053

Browse files
committed
MSVC: install src/test/modules together with contrib
These modules have to be installed so that the testing module can accessthem. (We don't have that yet, but will soon have it.)Author: Michael PaquierReviewed by: Andrew Dunstan
1 parente2999ab commit22d0053

File tree

1 file changed

+83
-71
lines changed

1 file changed

+83
-71
lines changed

‎src/tools/msvc/Install.pm

Lines changed: 83 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -432,98 +432,110 @@ sub CopyContribFiles
432432
my$target =shift;
433433

434434
print"Copying contrib data files...";
435-
my$D;
436-
opendir($D,'contrib') || croak"Could not opendir on contrib!\n";
437-
while (my$d =readdir($D))
435+
foreachmy$subdir ('contrib','src/test/modules')
438436
{
439-
nextif ($d =~/^\./);
440-
nextunless (-f"contrib/$d/Makefile");
441-
next
442-
if ($insttypeeq"client" && !grep {$_eq$d }@client_contribs);
437+
my$D;
438+
opendir($D,$subdir) || croak"Could not opendir on$subdir!\n";
439+
while (my$d =readdir($D))
440+
{
441+
# These configuration-based exclusions must match vcregress.pl
442+
nextif ($deq"uuid-ossp" && !defined($config->{uuid}));
443+
nextif ($deq"sslinfo" && !defined($config->{openssl}));
444+
nextif ($deq"xml2" && !defined($config->{xml}));
445+
nextif ($deq"sepgsql");
443446

444-
# these configuration-based exclusions must match vcregress.pl
445-
nextif ($deq"uuid-ossp" && !defined($config->{uuid}));
446-
nextif ($deq"sslinfo" && !defined($config->{openssl}));
447-
nextif ($deq"xml2" && !defined($config->{xml}));
448-
nextif ($deq"sepgsql");
447+
CopySubdirFiles($subdir,$d,$config,$target);
448+
}
449+
}
450+
print"\n";
451+
}
449452

450-
my$mf = read_file("contrib/$d/Makefile");
451-
$mf =~s{\\\r?\n}{}g;
453+
subCopySubdirFiles
454+
{
455+
my$subdir =shift;
456+
my$module =shift;
457+
my$config =shift;
458+
my$target =shift;
452459

453-
# Note: we currently don't support setting MODULEDIR in the makefile
454-
my$moduledir ='contrib';
460+
returnif ($module =~/^\./);
461+
returnunless (-f"$subdir/$module/Makefile");
462+
return
463+
if ($insttypeeq"client" && !grep {$_eq$module }@client_contribs);
455464

456-
my$flist ='';
457-
if ($mf =~/^EXTENSION\s*=\s*(.*)$/m) {$flist .=$1 }
458-
if ($flistne'')
459-
{
460-
$moduledir ='extension';
461-
$flist = ParseAndCleanRule($flist,$mf);
465+
my$mf = read_file("$subdir/$module/Makefile");
466+
$mf =~s{\\\r?\n}{}g;
462467

463-
foreachmy$f (split /\s+/,$flist)
464-
{
465-
lcopy(
466-
'contrib/' .$d .'/' .$f .'.control',
467-
$target .'/share/extension/' .$f .'.control'
468-
) || croak("Could not copy file$f.control in contrib$d");
469-
print'.';
470-
}
471-
}
468+
# Note: we currently don't support setting MODULEDIR in the makefile
469+
my$moduledir ='contrib';
472470

473-
$flist ='';
474-
if ($mf =~/^DATA_built\s*=\s*(.*)$/m) {$flist .=$1 }
475-
if ($mf =~/^DATA\s*=\s*(.*)$/m) {$flist .="$1" }
476-
$flist =~s/^\s*//;# Remove leading spaces if we had only DATA_built
471+
my$flist ='';
472+
if ($mf =~/^EXTENSION\s*=\s*(.*)$/m) {$flist .=$1 }
473+
if ($flistne'')
474+
{
475+
$moduledir ='extension';
476+
$flist = ParseAndCleanRule($flist,$mf);
477477

478-
if ($flistne'')
478+
foreachmy$f (split /\s+/,$flist)
479479
{
480-
$flist = ParseAndCleanRule($flist,$mf);
481-
482-
foreachmy$f (split /\s+/,$flist)
483-
{
484-
lcopy('contrib/' .$d .'/' .$f,
485-
$target .'/share/' .$moduledir .'/' . basename($f))
486-
|| croak("Could not copy file$f in contrib$d");
480+
lcopy(
481+
"$subdir/$module/$f.control",
482+
"$target/share/extension/$f.control"
483+
) || croak("Could not copy file$f.control in contrib$module");
487484
print'.';
488-
}
489485
}
486+
}
490487

491-
$flist ='';
492-
if ($mf =~/^DATA_TSEARCH\s*=\s*(.*)$/m) {$flist .=$1 }
493-
if ($flistne'')
494-
{
495-
$flist = ParseAndCleanRule($flist,$mf);
488+
$flist ='';
489+
if ($mf =~/^DATA_built\s*=\s*(.*)$/m) {$flist .=$1 }
490+
if ($mf =~/^DATA\s*=\s*(.*)$/m) {$flist .="$1" }
491+
$flist =~s/^\s*//;# Remove leading spaces if we had only DATA_built
496492

497-
foreachmy$f (split /\s+/,$flist)
498-
{
499-
lcopy('contrib/' .$d .'/' .$f,
500-
$target .'/share/tsearch_data/' . basename($f))
501-
|| croak("Could not copy file$f in contrib$d");
493+
if ($flistne'')
494+
{
495+
$flist = ParseAndCleanRule($flist,$mf);
496+
497+
foreachmy$f (split /\s+/,$flist)
498+
{
499+
lcopy("$subdir/$module/$f",
500+
"$target/share/$moduledir/" . basename($f))
501+
|| croak("Could not copy file$f in contrib$module");
502502
print'.';
503-
}
504503
}
504+
}
505505

506-
$flist ='';
507-
if ($mf =~/^DOCS\s*=\s*(.*)$/mg) {$flist .=$1 }
508-
if ($flistne'')
506+
$flist ='';
507+
if ($mf =~/^DATA_TSEARCH\s*=\s*(.*)$/m) {$flist .=$1 }
508+
if ($flistne'')
509+
{
510+
$flist = ParseAndCleanRule($flist,$mf);
511+
512+
foreachmy$f (split /\s+/,$flist)
509513
{
510-
$flist = ParseAndCleanRule($flist,$mf);
514+
lcopy("$subdir/$module/$f",
515+
"$target/share/tsearch_data/" . basename($f))
516+
|| croak("Could not copy file$f in$subdir$module");
517+
print'.';
518+
}
519+
}
520+
521+
$flist ='';
522+
if ($mf =~/^DOCS\s*=\s*(.*)$/mg) {$flist .=$1 }
523+
if ($flistne'')
524+
{
525+
$flist = ParseAndCleanRule($flist,$mf);
511526

512-
# Special case for contrib/spi
513-
$flist =
527+
# Special case for contrib/spi
528+
$flist =
514529
"autoinc.example insert_username.example moddatetime.example refint.example timetravel.example"
515-
if ($deq'spi');
516-
foreachmy$f (split /\s+/,$flist)
517-
{
518-
lcopy('contrib/' .$d .'/' .$f,
519-
$target .'/doc/' .$moduledir .'/' .$f)
520-
|| croak("Could not copy file$f in contrib$d");
521-
print'.';
522-
}
530+
if ($moduleeq'spi');
531+
foreachmy$f (split /\s+/,$flist)
532+
{
533+
lcopy("$subdir/$module/$f",
534+
"$target/doc/$moduledir/$f")
535+
|| croak("Could not copy file$f in contrib$module");
536+
print'.';
523537
}
524538
}
525-
closedir($D);
526-
print"\n";
527539
}
528540

529541
subParseAndCleanRule

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp