summaryrefslogtreecommitdiff
path: root/mpc.pl
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2010-10-28 11:44:52 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2010-10-28 11:44:52 +0000
commita95af766bb526c5a8a4c19d8dcef737ac0faf3f9 (patch)
tree834f951665bb1e2c2cbdfeac58411d5e11673587 /mpc.pl
parentfb7488d75b034c1e975343474526982f31c91cda (diff)
downloadMPC-a95af766bb526c5a8a4c19d8dcef737ac0faf3f9.tar.gz
ChangeLogTag: Thu Oct 28 11:44:02 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'mpc.pl')
-rwxr-xr-xmpc.pl17
1 files changed, 15 insertions, 2 deletions
diff --git a/mpc.pl b/mpc.pl
index 547acf70..8e09e6b2 100755
--- a/mpc.pl
+++ b/mpc.pl
@@ -27,7 +27,20 @@ use File::Basename;
my $basePath = (defined $FindBin::RealBin && $FindBin::RealBin ne '' ?
$FindBin::RealBin : File::Spec->rel2abs(dirname($0)));
$basePath = VMS::Filespec::unixify($basePath) if ($^O eq 'VMS');
-unshift(@INC, $basePath . '/modules');
+
+## Add the full path to the MPC modules to the Perl include path
+my $mpcpath = $basePath;
+unshift(@INC, $mpcpath . '/modules');
+
+## If the ACE_ROOT environment variable is defined and this version of
+## MPC is located inside the directory to which ACE_ROOT points, we will
+## assume that the user wanted the ACE specific version of this script.
+## We will change the $basePath to what it would have been had the user
+## run this script out of $ACE_ROOT/bin.
+my $aceroot = $ENV{ACE_ROOT};
+$aceroot =~ s!\\!/!g if (defined $aceroot);
+$basePath = $aceroot . '/bin/MakeProjectCreator'
+ if (defined $aceroot && $aceroot eq dirname($basePath));
require Driver;
@@ -36,7 +49,7 @@ require Driver;
# ************************************************************
sub getBasePath {
- return $basePath;
+ return $mpcpath;
}
# ************************************************************