summaryrefslogtreecommitdiff
path: root/ACE/bin/mpc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/bin/mpc.pl')
-rwxr-xr-xACE/bin/mpc.pl29
1 files changed, 26 insertions, 3 deletions
diff --git a/ACE/bin/mpc.pl b/ACE/bin/mpc.pl
index c547851e21d..c9a7e37d796 100755
--- a/ACE/bin/mpc.pl
+++ b/ACE/bin/mpc.pl
@@ -15,6 +15,7 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
require 5.006;
use strict;
+use Config;
use FindBin;
use File::Spec;
use File::Basename;
@@ -25,6 +26,7 @@ if ($^O eq 'VMS') {
$basePath = VMS::Filespec::unixify($basePath);
}
$basePath .= '/MakeProjectCreator';
+unshift(@INC, $basePath . '/modules');
my($mpcroot) = $ENV{MPC_ROOT};
my($mpcpath) = (defined $mpcroot ? $mpcroot :
@@ -48,7 +50,15 @@ if (! -d "$mpcpath/modules") {
exit(255);
}
-require Driver;
+require MPC;
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my(@creators) = ('GNUACEProjectCreator',
+ 'BorlandProjectCreator',
+ );
# ************************************************************
# Subroutine Section
@@ -62,5 +72,18 @@ sub getBasePath {
# Main Section
# ************************************************************
-my($driver) = new Driver($basePath, basename($0));
-exit($driver->run(@ARGV));
+## Allocate a driver
+my($driver) = new MPC();
+
+## Add our creators to the front of the list
+my($creators) = $driver->getCreatorList();
+unshift(@$creators, @creators);
+
+## Add the mpc path to the include paths, but preserve
+## the original @ARGV as it is included in the output of
+## most of the workspace creators.
+my(@args) = ('-include', "$mpcpath/config",
+ '-include', "$mpcpath/templates", @ARGV);
+
+## Execute the driver
+exit($driver->execute($basePath, basename($0), \@args));