summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-01-07 16:35:46 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-01-07 16:35:46 +0000
commitbe11cf20708deedc53ca734b8297fd8e4d75c5d3 (patch)
tree9dfcd6a67aecfd67cc0c838d167f3090b91d3807
parentf40c43ea990f1c33f5324cb453e96f2b1604d127 (diff)
downloadATCD-be11cf20708deedc53ca734b8297fd8e4d75c5d3.tar.gz
ChangeLogTag: Wed Jan 7 10:34:29 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog13
-rw-r--r--bin/MakeProjectCreator/USAGE11
-rw-r--r--bin/MakeProjectCreator/modules/Creator.pm9
-rw-r--r--bin/MakeProjectCreator/modules/Driver.pm6
-rw-r--r--bin/MakeProjectCreator/modules/Options.pm9
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm28
-rw-r--r--bin/MakeProjectCreator/modules/WorkspaceCreator.pm7
7 files changed, 73 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 2afe6add1c7..5b52eb96b69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Jan 7 10:34:29 2004 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/USAGE:
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/Driver.pm:
+ * bin/MakeProjectCreator/modules/Options.pm:
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+
+ Added an option that causes MPC to apply the name modifier
+ (specified by the -name_modifier option) to project names in
+ addition to workspace and project file names.
+
Wed Jan 7 14:04:11 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
* bin/MakeProjectCreator/templates/bor.mpd:
diff --git a/bin/MakeProjectCreator/USAGE b/bin/MakeProjectCreator/USAGE
index 64e1f46b41a..49b52f7010d 100644
--- a/bin/MakeProjectCreator/USAGE
+++ b/bin/MakeProjectCreator/USAGE
@@ -17,6 +17,7 @@ Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]
[-feature_file <file name>] [-make_coexistence]
[-exclude <directories>] [-name_modifier <pattern>]
+ [-apply_project]
[-type <automake | borland | em3 | ghs | gnuace | make |
nmake | va4 | vc6 | vc7 | vc71>]
[files]
@@ -50,6 +51,8 @@ Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
-name_modifier Modify output names. The pattern passed to this
parameter will have the '*' portion replaced with the
actual output name. Ex. *_Static
+ -apply_project When used in conjunction with -name_modifier, it applies
+ the name modifier to the project name also.
-noreldefs Do not try to generate default relative definitions.
-notoplevel Do not generate the top level target file. Files
are still process, but no top level file is created.
@@ -114,6 +117,11 @@ project name. Thus, passing -name_modifier '*_Static' to mwc.pl will result
in all workspace and project names ending in _Static. (Ex. ACE_Static.dsw,
ACE_Static.dsp, etc.)
+The -apply_project option, when used in conjunction with the -name_modifier
+option, causes MPC to apply the name modifier to the project name in
+addition to the workspace and project file names. This option has no effect
+outside the scope of the -name_modifier option.
+
The -noreldefs option says not to generate default relative definitions for
ACE_ROOT and TAO_ROOT (which would come from environment variables).
@@ -156,6 +164,7 @@ Usage: mpc.pl [-global <file>] [-include <directory>] [-recurse]
[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]
[-feature_file <file name>] [-make_coexistence]
[-exclude <directories>] [-name_modifier <pattern>]
+ [-apply_project]
[-type <automake | borland | em3 | ghs | gnuace | make |
nmake | va4 | vc6 | vc7 | vc71>]
[files]
@@ -189,6 +198,8 @@ Usage: mpc.pl [-global <file>] [-include <directory>] [-recurse]
-name_modifier Modify output names. The pattern passed to this
parameter will have the '*' portion replaced with the
actual output name. Ex. *_Static
+ -apply_project When used in conjunction with -name_modifier, it applies
+ the name modifier to the project name also.
-noreldefs Do not try to generate default relative definitions.
-notoplevel Do not generate the top level target file. Files
are still process, but no top level file is created.
diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm
index 14f6f379bf9..c3e3e993413 100644
--- a/bin/MakeProjectCreator/modules/Creator.pm
+++ b/bin/MakeProjectCreator/modules/Creator.pm
@@ -27,6 +27,7 @@ my(@statekeys) = ('global', 'include', 'template', 'ti',
'dynamic', 'static', 'relative', 'addtemp',
'addproj', 'progress', 'toplevel', 'baseprojs',
'feature_file', 'hierarchy', 'name_modifier',
+ 'apply_project',
);
my(%all_written) = ();
@@ -52,6 +53,7 @@ sub new {
my($feature) = shift;
my($hierarchy) = shift;
my($nmodifier) = shift;
+ my($applypj) = shift;
my($type) = shift;
my($self) = Parser::new($class, $inc);
@@ -77,6 +79,7 @@ sub new {
$self->{'feature_file'} = $feature;
$self->{'hierarchy'} = $hierarchy;
$self->{'name_modifier'} = $nmodifier;
+ $self->{'apply_project'} = $applypj;
$self->{'convert_slashes'} = $self->convert_slashes();
return $self;
@@ -786,12 +789,18 @@ sub get_hierarchy {
return $self->{'hierarchy'};
}
+
sub get_name_modifier {
my($self) = shift;
return $self->{'name_modifier'};
}
+sub get_apply_project {
+ my($self) = shift;
+ return $self->{'apply_project'};
+}
+
# ************************************************************
# Virtual Methods To Be Overridden
# ************************************************************
diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm
index 9ed7fe7f3fd..39de1b48df1 100644
--- a/bin/MakeProjectCreator/modules/Driver.pm
+++ b/bin/MakeProjectCreator/modules/Driver.pm
@@ -103,6 +103,7 @@ sub optionError {
$spaces . "[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
$spaces . "[-feature_file <file name>] [-make_coexistence]\n" .
$spaces . "[-exclude <directories>] [-name_modifier <pattern>]\n" .
+ $spaces . "[-apply_project]\n" .
$spaces . "[-type <";
my(@keys) = sort keys %{$self->{'types'}};
@@ -149,6 +150,8 @@ sub optionError {
" -name_modifier Modify output names. The pattern passed to this\n" .
" parameter will have the '*' portion replaced with the\n" .
" actual output name. Ex. *_Static\n" .
+" -apply_project When used in conjunction with -name_modifier, it applies\n" .
+" the name modifier to the project name also.\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" .
@@ -345,7 +348,8 @@ sub run {
$options->{'hierarchy'},
$options->{'exclude'},
$options->{'coexistence'},
- $options->{'name_modifier'});
+ $options->{'name_modifier'},
+ $options->{'apply_project'});
if ($base ne $file) {
my($dir) = ($base eq '' ? $file : dirname($file));
if (!$creator->cd($dir)) {
diff --git a/bin/MakeProjectCreator/modules/Options.pm b/bin/MakeProjectCreator/modules/Options.pm
index a9f34827ff1..9e0ef8970e3 100644
--- a/bin/MakeProjectCreator/modules/Options.pm
+++ b/bin/MakeProjectCreator/modules/Options.pm
@@ -30,7 +30,7 @@ sub completion_command {
"'c/-/(global include type template relative " .
"ti static noreldefs notoplevel feature_file " .
"value_template value_project make_coexistence " .
- "hierarchy exclude name_modifier)/' " .
+ "hierarchy exclude name_modifier apply_project)/' " .
"'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
"'n/-ti/(dll lib dll_exe lib_exe)/:' 'n/-type/(";
@@ -72,11 +72,15 @@ sub options {
my($static) = ($defaults ? 0 : undef);
my($recurse) = ($defaults ? 0 : undef);
my($makeco) = ($defaults ? 0 : undef);
+ my($applypj) = ($defaults ? 0 : undef);
## Process the command line arguments
for(my $i = 0; $i <= $#args; $i++) {
my($arg) = $args[$i];
- if ($arg eq '-complete') {
+ if ($arg eq '-apply_project') {
+ $applypj = 1;
+ }
+ elsif ($arg eq '-complete') {
print $self->completion_command($name, $types) . "\n";
return undef;
}
@@ -311,6 +315,7 @@ sub options {
'hierarchy' => $hierarchy,
'exclude' => \@exclude,
'name_modifier' => $nmodifier,
+ 'apply_project' => $applypj,
);
return \%options;
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index 6e278d2565b..93691707805 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -149,11 +149,13 @@ sub new {
my($exclude) = shift;
my($makeco) = shift;
my($nmod) = shift;
+ my($applypj) = shift;
my($self) = Creator::new($class, $global, $inc,
$template, $ti, $dynamic, $static,
$relative, $addtemp, $addproj,
$progress, $toplevel, $baseprojs,
- $feature, $hierarchy, $nmod, 'project');
+ $feature, $hierarchy, $nmod, $applypj,
+ 'project');
$self->{$self->{'type_check'}} = 0;
$self->{'feature_defined'} = 0;
@@ -375,7 +377,7 @@ sub parse_line {
my($def) = $self->get_default_project_name();
$name = $self->fill_type_name($name, $def);
- $self->process_assignment('project_name', $name);
+ $self->set_project_name($name);
}
}
$self->{$typecheck} = 1;
@@ -1672,8 +1674,7 @@ sub generate_defaults {
## Generate default project name
if (!defined $self->get_assignment('project_name')) {
- $self->process_assignment('project_name',
- $self->get_default_project_name());
+ $self->set_project_name($self->get_default_project_name());
}
## Generate the default pch file names (if needed)
@@ -1733,6 +1734,23 @@ sub generate_defaults {
}
+sub set_project_name {
+ my($self) = shift;
+ my($name) = shift;
+
+ if ($self->get_apply_project()) {
+ my($nmod) = $self->get_name_modifier();
+
+ if (defined $nmod) {
+ $nmod =~ s/\*/$name/g;
+ $name = $nmod;
+ }
+ }
+
+ $self->process_assignment('project_name', $name);
+}
+
+
sub project_name {
my($self) = shift;
return $self->get_assignment('project_name');
@@ -2403,7 +2421,7 @@ sub get_modified_project_file_name {
my($ext) = shift;
my($nmod) = $self->get_name_modifier();
- if (defined $nmod) {
+ if (defined $nmod && !$self->get_apply_project()) {
$nmod =~ s/\*/$name/g;
$name = $nmod;
}
diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
index 4333b880934..6bd84433d99 100644
--- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
@@ -65,11 +65,13 @@ sub new {
my($exclude) = shift;
my($makeco) = shift;
my($nmod) = shift;
+ my($applypj) = shift;
my($self) = Creator::new($class, $global, $inc,
$template, $ti, $dynamic, $static,
$relative, $addtemp, $addproj,
$progress, $toplevel, $baseprojs,
- $feature, $hierarchy, $nmod, 'workspace');
+ $feature, $hierarchy, $nmod, $applypj,
+ 'workspace');
my($typecheck) = $self->{'type_check'};
$self->{'workspace_name'} = undef;
@@ -1308,7 +1310,8 @@ sub project_creator {
$parameters{'hierarchy'},
$self->{'exclude'}->{$self->{'wctype'}},
$self->make_coexistence(),
- $parameters{'name_modifier'});
+ $parameters{'name_modifier'},
+ $parameters{'apply_project'});
}