summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-01-30 13:43:48 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-01-30 13:43:48 +0000
commit17b6ec0a3b3b33808a85f2ba1511127952fc25ff (patch)
tree33278d9119e91eb5108f8116382a023692a30106
parent306296912f4c266f8b9953d229d86fe7ee6b8f4c (diff)
downloadATCD-17b6ec0a3b3b33808a85f2ba1511127952fc25ff.tar.gz
ChangeLogTag: Fri Jan 30 07:41:20 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog12
-rw-r--r--bin/MakeProjectCreator/modules/MPC.pm56
-rw-r--r--bin/MakeProjectCreator/modules/MWC.pm55
-rwxr-xr-xbin/mpc.pl26
-rwxr-xr-xbin/mwc.pl25
5 files changed, 131 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ceb7c829ec..bb414f6e40e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Fri Jan 30 07:41:20 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/MPC.pm:
+ * bin/MakeProjectCreator/modules/MWC.pm:
+ * bin/mpc.pl:
+ * bin/mwc.pl:
+
+ Pulled the creator lists out of the perl scripts and moved them
+ into the new MPC and MWC modules. This will allow the extension
+ of MPC by providing a way to hook new workspace and project types
+ into MPC without adding anything to the MPC repository.
+
Thu Jan 29 14:10:51 2004 Chad Elliott <elliott_c@ociweb.com>
* bin/MakeProjectCreator/modules/MakeWorkspaceCreator.pm:
diff --git a/bin/MakeProjectCreator/modules/MPC.pm b/bin/MakeProjectCreator/modules/MPC.pm
new file mode 100644
index 00000000000..102fe5ce7b6
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/MPC.pm
@@ -0,0 +1,56 @@
+package MPC;
+
+# ******************************************************************
+# Description : Instantiate a Driver and run it
+# Author : Chad Elliott
+# Create Date : 1/30/2004
+# ******************************************************************
+
+# ******************************************************************
+# Pragma Section
+# ******************************************************************
+
+use strict;
+use Driver;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($self) = bless {'creators' => [ 'GNUACEProjectCreator',
+ 'NMakeProjectCreator',
+ 'VC6ProjectCreator',
+ 'VC7ProjectCreator',
+ 'VC71ProjectCreator',
+ 'BorlandProjectCreator',
+ 'CbxProjectCreator',
+ 'GHSProjectCreator',
+ 'EM3ProjectCreator',
+ 'VA4ProjectCreator',
+ 'MakeProjectCreator',
+ 'AutomakeProjectCreator',
+ ],
+ }, $class;
+ return $self;
+}
+
+
+sub getCreatorList {
+ my($self) = shift;
+ return $self->{'creators'};
+}
+
+
+sub execute {
+ my($self) = shift;
+ my($base) = shift;
+ my($name) = shift;
+ my($args) = shift;
+ my($driver) = new Driver($base, $name, @{$self->{'creators'}});
+ return $driver->run(@$args);
+}
+
+
+1;
diff --git a/bin/MakeProjectCreator/modules/MWC.pm b/bin/MakeProjectCreator/modules/MWC.pm
new file mode 100644
index 00000000000..e0a1ba75c86
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/MWC.pm
@@ -0,0 +1,55 @@
+package MWC;
+
+# ******************************************************************
+# Description : Instantiate a Driver and run it
+# Author : Chad Elliott
+# Create Date : 1/30/2004
+# ******************************************************************
+
+# ******************************************************************
+# Pragma Section
+# ******************************************************************
+
+use strict;
+use Driver;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub new {
+ my($class) = shift;
+ my($self) = bless {'creators' => [ 'GNUACEWorkspaceCreator',
+ 'NMakeWorkspaceCreator',
+ 'VC6WorkspaceCreator',
+ 'VC7WorkspaceCreator',
+ 'VC71WorkspaceCreator',
+ 'BorlandWorkspaceCreator',
+ 'GHSWorkspaceCreator',
+ 'EM3WorkspaceCreator',
+ 'VA4WorkspaceCreator',
+ 'MakeWorkspaceCreator',
+ 'AutomakeWorkspaceCreator',
+ ],
+ }, $class;
+ return $self;
+}
+
+
+sub getCreatorList {
+ my($self) = shift;
+ return $self->{'creators'};
+}
+
+
+sub execute {
+ my($self) = shift;
+ my($base) = shift;
+ my($name) = shift;
+ my($args) = shift;
+ my($driver) = new Driver($base, $name, @{$self->{'creators'}});
+ return $driver->run(@$args);
+}
+
+
+1;
diff --git a/bin/mpc.pl b/bin/mpc.pl
index 27e29b1c5d4..fae597cc9ac 100755
--- a/bin/mpc.pl
+++ b/bin/mpc.pl
@@ -19,25 +19,7 @@ use File::Basename;
my($basePath) = getExecutePath($0) . '/MakeProjectCreator';
unshift(@INC, $basePath . '/modules');
-require Driver;
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my(@creators) = ('GNUACEProjectCreator',
- 'NMakeProjectCreator',
- 'VC6ProjectCreator',
- 'VC7ProjectCreator',
- 'VC71ProjectCreator',
- 'BorlandProjectCreator',
- 'CbxProjectCreator',
- 'GHSProjectCreator',
- 'EM3ProjectCreator',
- 'VA4ProjectCreator',
- 'MakeProjectCreator',
- 'AutomakeProjectCreator',
- );
+require MPC;
# ************************************************************
# Subroutine Section
@@ -93,8 +75,8 @@ sub getExecutePath {
# ************************************************************
-# Subroutine Section
+# Main Section
# ************************************************************
-my($driver) = new Driver($basePath, basename($0), @creators);
-exit($driver->run(@ARGV));
+my($driver) = new MPC();
+exit($driver->execute($basePath, basename($0), \@ARGV));
diff --git a/bin/mwc.pl b/bin/mwc.pl
index c9891f4ca17..22f9bf399ed 100755
--- a/bin/mwc.pl
+++ b/bin/mwc.pl
@@ -19,24 +19,7 @@ use File::Basename;
my($basePath) = getExecutePath($0) . '/MakeProjectCreator';
unshift(@INC, $basePath . '/modules');
-require Driver;
-
-# ************************************************************
-# Data Section
-# ************************************************************
-
-my(@creators) = ('GNUACEWorkspaceCreator',
- 'NMakeWorkspaceCreator',
- 'VC6WorkspaceCreator',
- 'VC7WorkspaceCreator',
- 'VC71WorkspaceCreator',
- 'BorlandWorkspaceCreator',
- 'GHSWorkspaceCreator',
- 'EM3WorkspaceCreator',
- 'VA4WorkspaceCreator',
- 'MakeWorkspaceCreator',
- 'AutomakeWorkspaceCreator',
- );
+require MWC;
# ************************************************************
# Subroutine Section
@@ -92,8 +75,8 @@ sub getExecutePath {
# ************************************************************
-# Subroutine Section
+# Main Section
# ************************************************************
-my($driver) = new Driver($basePath, basename($0), @creators);
-exit($driver->run(@ARGV));
+my($driver) = new MWC();
+exit($driver->execute($basePath, basename($0), \@ARGV));