summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-02-22 16:32:32 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-02-22 16:32:32 +0000
commit40b5a996cd2e04aa5f79c545a38f7697148a1273 (patch)
treed86322f7972c689c7c36f3a2bb590f4155beb2fe
parentc3019d8b4ac7bc3b5b8b92148d9ae29def2fa21f (diff)
downloadATCD-40b5a996cd2e04aa5f79c545a38f7697148a1273.tar.gz
ChangeLogTag: Wed Feb 22 16:31:28 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog14
-rw-r--r--bin/MakeProjectCreator/config/vcl.mpb5
-rwxr-xr-xbin/mpc.pl75
-rwxr-xr-xbin/mwc.pl75
4 files changed, 43 insertions, 126 deletions
diff --git a/ChangeLog b/ChangeLog
index 556e51481bc..8144a519b0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Wed Feb 22 16:31:28 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/config/vcl.mpb:
+
+ Added the 'bmake' type in order to support VCL.
+
+ * bin/mpc.pl:
+ * bin/mwc.pl:
+
+ Simplified these scripts by using FindBin. Also, made a
+ modification to preserve @ARGV so that when it is used by the
+ workspace creators, it contains the original arguments provided by
+ the user.
+
Wed Feb 22 16:26:43 GMT 2006 Rich Seibel <seibel_r@ociweb.com>
* include/makeinclude/platform_aix_ibm.GNU:
diff --git a/bin/MakeProjectCreator/config/vcl.mpb b/bin/MakeProjectCreator/config/vcl.mpb
index 00bed71f3da..bf6a1b9f571 100644
--- a/bin/MakeProjectCreator/config/vcl.mpb
+++ b/bin/MakeProjectCreator/config/vcl.mpb
@@ -4,8 +4,9 @@
project {
requires += vcl
macros += ACE_HAS_VCL=1
- specific(borland) {
- lit_libs += rtl vcl
+ specific(bmake, borland) {
+ use_vcl = 1
+ lit_libs += rtl vcl
compile_flags += -tW -tWV
}
verbatim(borland,macros) {
diff --git a/bin/mpc.pl b/bin/mpc.pl
index 56dd7152891..1fa9409d274 100755
--- a/bin/mpc.pl
+++ b/bin/mpc.pl
@@ -13,16 +13,17 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
# ******************************************************************
use strict;
-use Cwd;
use Config;
+use FindBin;
+use File::Spec;
use File::Basename;
-if ( $^O eq 'VMS' ) {
- require VMS::Filespec;
- import VMS::Filespec qw(unixpath);
+my($basePath) = $FindBin::Bin;
+if ($^O eq 'VMS') {
+ $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq '');
+ $basePath = VMS::Filespec::unixify($basePath);
}
-
-my($basePath) = getExecutePath($0) . '/MakeProjectCreator';
+$basePath .= '/MakeProjectCreator';
unshift(@INC, $basePath . '/modules');
my($mpcroot) = $ENV{MPC_ROOT};
@@ -65,58 +66,6 @@ sub getBasePath {
return $mpcpath;
}
-
-sub which {
- my($prog) = shift;
- my($exec) = $prog;
-
- if (defined $ENV{'PATH'}) {
- my($part) = '';
- my($envSep) = $Config{'path_sep'};
- foreach $part (split(/$envSep/, $ENV{'PATH'})) {
- $part .= "/$prog";
- if ( -x $part ) {
- $exec = $part;
- last;
- }
- }
- }
-
- return $exec;
-}
-
-
-sub getExecutePath {
- my($prog) = shift;
- my($loc) = '';
-
- if ($prog ne basename($prog)) {
- my($dir) = ($^O eq 'VMS' ? unixpath(dirname($prog)) : dirname($prog));
- if ($prog =~ /^[\/\\]/ ||
- $prog =~ /^[A-Za-z]:[\/\\]?/) {
- $loc = $dir;
- }
- else {
- $loc = ($^O eq 'VMS' ? unixpath(getcwd()) : getcwd()) . '/' . $dir;
- }
- }
- else {
- $loc = dirname(which($prog));
- if ($^O eq 'VMS') {
- $loc = unixpath($loc);
- }
- }
-
- $loc =~ s/\/\.$//;
-
- if ($loc eq '.') {
- $loc = ($^O eq 'VMS' ? unixpath(getcwd()) : getcwd());
- }
-
- return $loc;
-}
-
-
# ************************************************************
# Main Section
# ************************************************************
@@ -128,9 +77,11 @@ my($driver) = new MPC();
my($creators) = $driver->getCreatorList();
unshift(@$creators, @creators);
-## Add the mpc path to the include paths
-unshift(@ARGV, '-include', "$mpcpath/config",
- '-include', "$mpcpath/templates");
+## 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), \@ARGV));
+exit($driver->execute($basePath, basename($0), \@args));
diff --git a/bin/mwc.pl b/bin/mwc.pl
index 688d278b513..13dd157f7ef 100755
--- a/bin/mwc.pl
+++ b/bin/mwc.pl
@@ -13,16 +13,17 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
# ******************************************************************
use strict;
-use Cwd;
use Config;
+use FindBin;
+use File::Spec;
use File::Basename;
-if ( $^O eq 'VMS' ) {
- require VMS::Filespec;
- import VMS::Filespec qw(unixpath);
+my($basePath) = $FindBin::Bin;
+if ($^O eq 'VMS') {
+ $basePath = File::Spec->rel2abs(dirname($0)) if ($basePath eq '');
+ $basePath = VMS::Filespec::unixify($basePath);
}
-
-my($basePath) = getExecutePath($0) . '/MakeProjectCreator';
+$basePath .= '/MakeProjectCreator';
unshift(@INC, $basePath . '/modules');
my($mpcroot) = $ENV{MPC_ROOT};
@@ -65,58 +66,6 @@ sub getBasePath {
return $mpcpath;
}
-
-sub which {
- my($prog) = shift;
- my($exec) = $prog;
-
- if (defined $ENV{'PATH'}) {
- my($part) = '';
- my($envSep) = $Config{'path_sep'};
- foreach $part (split(/$envSep/, $ENV{'PATH'})) {
- $part .= "/$prog";
- if ( -x $part ) {
- $exec = $part;
- last;
- }
- }
- }
-
- return $exec;
-}
-
-
-sub getExecutePath {
- my($prog) = shift;
- my($loc) = '';
-
- if ($prog ne basename($prog)) {
- my($dir) = ($^O eq 'VMS' ? unixpath(dirname($prog)) : dirname($prog));
- if ($prog =~ /^[\/\\]/ ||
- $prog =~ /^[A-Za-z]:[\/\\]?/) {
- $loc = $dir;
- }
- else {
- $loc = ($^O eq 'VMS' ? unixpath(getcwd()) : getcwd()) . '/' . $dir;
- }
- }
- else {
- $loc = dirname(which($prog));
- if ($^O eq 'VMS') {
- $loc = unixpath($loc);
- }
- }
-
- $loc =~ s/\/\.$//;
-
- if ($loc eq '.') {
- $loc = ($^O eq 'VMS' ? unixpath(getcwd()) : getcwd());
- }
-
- return $loc;
-}
-
-
# ************************************************************
# Main Section
# ************************************************************
@@ -128,9 +77,11 @@ my($driver) = new MWC();
my($creators) = $driver->getCreatorList();
unshift(@$creators, @creators);
-## Add the mpc path to the include paths
-unshift(@ARGV, '-include', "$mpcpath/config",
- '-include', "$mpcpath/templates");
+## 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), \@ARGV));
+exit($driver->execute($basePath, basename($0), \@args));