Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / bin / mwc.pl
blobc745710c68f74f6af6eb66735614d33c113d70a9
1 #!/usr/bin/env perl
2 eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
3 & eval 'exec perl -w -S $0 $argv:q'
4 if 0;
6 # ******************************************************************
7 # Author: Chad Elliott
8 # Date: 6/17/2002
9 # ******************************************************************
11 # ******************************************************************
12 # Pragma Section
13 # ******************************************************************
15 require 5.006;
17 use strict;
18 use FindBin;
19 use File::Spec;
20 use File::Basename;
22 my($basePath) = (defined $FindBin::RealBin ? $FindBin::RealBin :
23 File::Spec->rel2abs(dirname($0)));
24 if ($^O eq 'VMS') {
25 $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq '');
26 $basePath = VMS::Filespec::unixify($basePath);
28 $basePath .= '/MakeProjectCreator';
30 my($mpcroot) = $ENV{MPC_ROOT};
31 my($mpcpath) = (defined $mpcroot ? $mpcroot :
32 dirname(dirname($basePath)) . '/MPC');
33 unshift(@INC, $mpcpath . '/modules');
35 if (defined $mpcroot) {
36 print "MPC_ROOT was set to $mpcroot.\n";
39 if (! -d "$mpcpath/modules") {
40 print STDERR "ERROR: Unable to find the MPC modules in $mpcpath.\n";
41 if (defined $mpcroot) {
42 print STDERR "Your MPC_ROOT environment variable does not point to a ",
43 "valid MPC location.\n";
45 else {
46 print STDERR "You can set the MPC_ROOT environment variable to the ",
47 "location of MPC.\n";
49 exit(255);
52 require Driver;
54 # ************************************************************
55 # Subroutine Section
56 # ************************************************************
58 sub getBasePath {
59 return $mpcpath;
62 # ************************************************************
63 # Main Section
64 # ************************************************************
66 my($driver) = new Driver($basePath, Driver::workspaces());
67 exit($driver->run(@ARGV));