@@ -28,7 +28,7 @@ my $libpgcommon;
28
28
my $postgres ;
29
29
my $libpq ;
30
30
31
- # Set of variables for contrib modules
31
+ # Set of variables formodules in contrib/ and src/test/ modules/
32
32
my $contrib_defines = {' refint' => ' REFINT_VERBOSE' };
33
33
my @contrib_uselibpq =
34
34
(' dblink' ,' oid2name' ,' postgres_fdw' ,' vacuumlo' );
@@ -50,7 +50,7 @@ my $contrib_extraincludes =
50
50
my $contrib_extrasource = {
51
51
' cube' => [' contrib\cube\cubescan.l' ,' contrib\cube\cubeparse.y' ],
52
52
' seg' => [' contrib\seg\segscan.l' ,' contrib\seg\segparse.y' ], };
53
- my @contrib_excludes = (' pgcrypto' ,' intagg' ,' sepgsql' );
53
+ my @contrib_excludes = (' pgcrypto' ,' commit_ts ' , ' intagg' ,' sepgsql' );
54
54
55
55
# Set of variables for frontend modules
56
56
my $frontend_defines = {' initdb' => ' FRONTEND' };
@@ -564,15 +564,18 @@ sub mkvcbuild
564
564
my $mf = Project::read_file(' contrib/pgcrypto/Makefile' );
565
565
GenerateContribSqlFiles(' pgcrypto' ,$mf );
566
566
567
- opendir ($D ,' contrib' ) || croak" Could not opendir on contrib!\n " ;
568
- while (my $d =readdir ($D ))
567
+ foreach my $subdir (' contrib' ,' src/test/modules' )
569
568
{
570
- next if ($d =~/ ^\. / );
571
- next unless (-f " contrib/$d /Makefile" );
572
- next if (grep {/ ^$d $ / }@contrib_excludes );
573
- AddContrib($d );
569
+ opendir ($D ,$subdir ) || croak" Could not opendir on$subdir !\n " ;
570
+ while (my $d =readdir ($D ))
571
+ {
572
+ next if ($d =~/ ^\. / );
573
+ next unless (-f " $subdir /$d /Makefile" );
574
+ next if (grep {/ ^$d $ / }@contrib_excludes );
575
+ AddContrib($subdir ,$d );
576
+ }
577
+ closedir ($D );
574
578
}
575
- closedir ($D );
576
579
577
580
$mf =
578
581
Project::read_file(' src\backend\utils\mb\conversion_procs\Makefile' );
@@ -689,14 +692,15 @@ sub AddSimpleFrontend
689
692
# Add a simple contrib project
690
693
sub AddContrib
691
694
{
695
+ my $subdir =shift ;
692
696
my $n =shift ;
693
- my $mf = Project::read_file(' contrib \\ ' . $n . ' \ Makefile' );
697
+ my $mf = Project::read_file(" $subdir / $n / Makefile" );
694
698
695
699
if ($mf =~/ ^MODULE_big\s *=\s *(.*)$ /mg )
696
700
{
697
701
my $dn =$1 ;
698
702
my $proj =
699
- $solution -> AddProject($dn ,' dll' ,' contrib' ,' contrib \\ ' . $n );
703
+ $solution -> AddProject($dn ,' dll' ,' contrib' ," $subdir / $n " );
700
704
$proj -> AddReference($postgres );
701
705
AdjustContribProj($proj );
702
706
}
@@ -705,16 +709,17 @@ sub AddContrib
705
709
foreach my $mod (split /\s +/,$1 )
706
710
{
707
711
my $proj =
708
- $solution -> AddProject($mod ,' dll' ,' contrib' ,' contrib\\ ' .$n );
709
- $proj -> AddFile(' contrib\\ ' .$n .' \\ ' .$mod .' .c' );
712
+ $solution -> AddProject($mod ,' dll' ,' contrib' ," $subdir /$n " );
713
+ my $filename =$mod .' .c' ;
714
+ $proj -> AddFile($subdir .' \\ ' .$n .' \\ ' .$mod .' .c' );
710
715
$proj -> AddReference($postgres );
711
716
AdjustContribProj($proj );
712
717
}
713
718
}
714
719
elsif ($mf =~/ ^PROGRAM\s *=\s *(.*)$ /mg )
715
720
{
716
721
my $proj =
717
- $solution -> AddProject($1 ,' exe' ,' contrib' ,' contrib \\ ' . $n );
722
+ $solution -> AddProject($1 ,' exe' ,' contrib' ," $subdir / $n " );
718
723
AdjustContribProj($proj );
719
724
}
720
725
else