OSDN Git Service

Add PL extension files to MSVC Install procedure.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 5 Mar 2011 21:21:37 +0000 (16:21 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 5 Mar 2011 21:21:37 +0000 (16:21 -0500)
src/tools/msvc/Install.pm

index bb291b6..e1747c4 100644 (file)
@@ -113,6 +113,25 @@ sub Install
     CopyContribFiles($config,$target);
     CopyIncludeFiles($target);
 
+       my $pl_extension_files = [];
+       my @pldirs = ('src/pl/plpgsql/src');
+       push @pldirs,"src/pl/plperl" if $config->{perl};
+       push @pldirs,"src/pl/plpython" if $config->{python};
+       push @pldirs,"src/pl/tcl" if $config->{tcl};
+    File::Find::find(
+        {
+            wanted =>sub {
+                /^(.*--.*\.sql|.*\.control)\z/s
+                  &&push(@$pl_extension_files, $File::Find::name);
+              }
+        },
+        @pldirs
+    );
+    CopySetOfFiles(
+        'PL Extension files', $pl_extension_files,
+        $target . '/share/extension/'
+    );
+
     GenerateNLSFiles($target,$config->{nls},$majorver) if ($config->{nls});
 
     print "Installation complete.\n";