diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2010-10-28 11:44:52 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2010-10-28 11:44:52 +0000 |
commit | a95af766bb526c5a8a4c19d8dcef737ac0faf3f9 (patch) | |
tree | 834f951665bb1e2c2cbdfeac58411d5e11673587 /mpc.pl | |
parent | fb7488d75b034c1e975343474526982f31c91cda (diff) | |
download | MPC-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-x | mpc.pl | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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; } # ************************************************************ |