summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-07-17 11:24:57 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-07-17 11:24:57 +0000
commitfbe1f63e49f02ac8cb916942f5d63f0707f07e9b (patch)
treeb54b1d75919a0fe9f5baa57cce270604a0cc04ca
parent129bbc4c21f8021b601eb933ab5d81e4158033ed (diff)
downloadMPC-fbe1f63e49f02ac8cb916942f5d63f0707f07e9b.tar.gz
ChangeLogTag: Thu Jul 17 06:21:30 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/Driver.pm9
-rw-r--r--modules/NMakeWorkspaceCreator.pm9
-rw-r--r--modules/Options.pm7
-rw-r--r--modules/ProjectCreator.pm1
-rw-r--r--modules/WorkspaceCreator.pm14
5 files changed, 33 insertions, 7 deletions
diff --git a/modules/Driver.pm b/modules/Driver.pm
index a8eb65d9..3d0b6c1e 100644
--- a/modules/Driver.pm
+++ b/modules/Driver.pm
@@ -40,7 +40,7 @@ sub new {
$self->{'path'} = $path;
$self->{'name'} = $name;
- $self->{'version'} = 1.9;
+ $self->{'version'} = "2.0";
$self->{'types'} = {};
$self->{'creators'} = \@creators;
$self->{'default'} = $creators[0];
@@ -101,7 +101,7 @@ sub optionError {
$spaces . "[-noreldefs] [-notoplevel] [-static] [-static_only]\n" .
$spaces . "[-value_template <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
$spaces . "[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
- $spaces . "[-feature_file <file name>]\n" .
+ $spaces . "[-feature_file <file name>] [-make_coexistence]\n" .
$spaces . "[-type <";
my(@keys) = sort keys %{$self->{'types'}};
@@ -141,6 +141,8 @@ sub optionError {
" -relative Any \$() variable in an mpc that is matched to NAME\n" .
" is replaced by VAR only if VAR can be made into a\n" .
" relative path based on the current working directory.\n" .
+" -make_coexistence If multiple 'make' based project types are\n" .
+" generated, they will be named such that they can coexist.\n" .
" -noreldefs Do not try to generate default relative definitions.\n" .
" -notoplevel Do not generate the top level target file. Files\n" .
" are still process, but no top level file is created.\n" .
@@ -325,7 +327,8 @@ sub run {
$options->{'toplevel'},
$options->{'baseprojs'},
$global_feature_file,
- $options->{'feature_file'});
+ $options->{'feature_file'},
+ $options->{'coexistence'});
if ($base ne $file) {
my($dir) = ($base eq '' ? $file : dirname($file));
if (!$generator->cd($dir)) {
diff --git a/modules/NMakeWorkspaceCreator.pm b/modules/NMakeWorkspaceCreator.pm
index 75dc20f0..e8935edf 100644
--- a/modules/NMakeWorkspaceCreator.pm
+++ b/modules/NMakeWorkspaceCreator.pm
@@ -32,8 +32,13 @@ sub crlf {
sub workspace_file_name {
my($self) = shift;
- return $self->get_modified_workspace_name($self->get_workspace_name(),
- '.nmake');
+ if ($self->make_coexistence()) {
+ return $self->get_modified_workspace_name($self->get_workspace_name(),
+ '.nmake');
+ }
+ else {
+ return $self->get_modified_workspace_name('Makefile', '');
+ }
}
diff --git a/modules/Options.pm b/modules/Options.pm
index 23c8a610..de5d819e 100644
--- a/modules/Options.pm
+++ b/modules/Options.pm
@@ -29,7 +29,7 @@ sub completion_command {
my($str) = "complete $name " .
"'c/-/(global include type template relative " .
"ti static noreldefs notoplevel feature_file " .
- "value_template value_project)/' " .
+ "value_template value_project make_coexistence)/' " .
"'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
"'n/-ti/(dll lib dll_exe lib_exe)/:' 'n/-type/(";
@@ -67,6 +67,7 @@ sub options {
my($toplevel) = ($defaults ? 1 : undef);
my($static) = ($defaults ? 0 : undef);
my($recurse) = ($defaults ? 0 : undef);
+ my($makeco) = ($defaults ? 0 : undef);
## Process the command line arguments
for(my $i = 0; $i <= $#args; $i++) {
@@ -133,6 +134,9 @@ sub options {
push(@include, $include);
}
}
+ elsif ($arg eq '-make_coexistence') {
+ $makeco = 1;
+ }
elsif ($arg eq '-noreldefs') {
$reldefs = 0;
}
@@ -274,6 +278,7 @@ sub options {
'recurse' => $recurse,
'addtemp' => \%addtemp,
'addproj' => \%addproj,
+ 'coexistence' => $makeco,
);
return \%options;
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 99345057..3a7287a3 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -143,6 +143,7 @@ sub new {
my($baseprojs) = shift;
my($gfeature) = shift;
my($feature) = shift;
+ my($makeco) = shift;
my($self) = Creator::new($class, $global, $inc,
$template, $ti, $dynamic, $static,
$relative, $addtemp, $addproj,
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
index 70c85434..2d0dee8c 100644
--- a/modules/WorkspaceCreator.pm
+++ b/modules/WorkspaceCreator.pm
@@ -61,6 +61,7 @@ sub new {
my($baseprojs) = shift;
my($gfeature) = shift;
my($feature) = shift;
+ my($makeco) = shift;
my($self) = Creator::new($class, $global, $inc,
$template, $ti, $dynamic, $static,
$relative, $addtemp, $addproj,
@@ -80,6 +81,7 @@ sub new {
$self->{'wctype'} = $self->extractType("$self");
$self->{'modified_count'} = 0;
$self->{'global_feature_file'} = $gfeature;
+ $self->{'coexistence'} = $makeco;
## Add a hash reference for our workspace type
if (!defined $previous_workspace_name{$self->{'wctype'}}) {
@@ -832,6 +834,9 @@ sub process_cmdline {
if (defined $options->{'reldefs'}) {
$self->optionError('-noreldefs is ignored');
}
+ if (defined $options->{'coexistence'}) {
+ $self->optionError('-make_coexistence is ignored');
+ }
if (defined $options->{'input'}->[0]) {
$self->optionError('Command line files ' .
'specified in a workspace are ignored');
@@ -895,7 +900,8 @@ sub project_creator {
$parameters{'toplevel'},
$parameters{'baseprojs'},
$self->{'global_feature_file'},
- $parameters{'feature_file'});
+ $parameters{'feature_file'},
+ $self->make_coexistence());
}
@@ -905,6 +911,12 @@ sub sort_files {
}
+sub make_coexistence {
+ my($self) = shift;
+ return $self->{'coexistence'};
+}
+
+
sub get_modified_workspace_name {
my($self) = shift;
my($name) = shift;