diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-05-21 14:28:28 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-05-21 14:28:28 +0000 |
commit | db19162502f36d80bf636959140deb7b3f5c82e5 (patch) | |
tree | 25338fea3452f4909307ae51f6e29e2d9143da36 | |
parent | 9066e89d3aaca6e8168dc09702f29300c7531837 (diff) | |
download | MPC-db19162502f36d80bf636959140deb7b3f5c82e5.tar.gz |
ChangeLogTag: Wed May 21 09:25:16 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/Driver.pm | 14 | ||||
-rw-r--r-- | modules/Parser.pm | 9 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 10 | ||||
-rw-r--r-- | modules/WorkspaceCreator.pm | 13 |
4 files changed, 33 insertions, 13 deletions
diff --git a/modules/Driver.pm b/modules/Driver.pm index 91c70830..be21ca50 100644 --- a/modules/Driver.pm +++ b/modules/Driver.pm @@ -320,9 +320,17 @@ sub run { } $file = $base; } - print 'Generating output using ' . - ($file eq '' ? 'default input' : $file) . "\n"; - print 'Start Time: ' . scalar(localtime(time())) . "\n"; + print 'Generating output using '; + if ($file eq '') { + print 'default input'; + } + else { + my($partial) = $self->getcwd(); + my($oescaped) = $self->escape_regex_special($orig_dir) . '(/)?'; + $partial =~ s/^$oescaped//; + print '' . ($partial ne '' ? "$partial/" : '') . $file; + } + print "\n" . 'Start Time: ' . scalar(localtime(time())) . "\n"; if (!$generator->generate($file)) { print STDERR "ERROR: Unable to process: " . ($file eq '' ? 'default input' : $file) . "\n"; diff --git a/modules/Parser.pm b/modules/Parser.pm index b8cea113..e7533e0c 100644 --- a/modules/Parser.pm +++ b/modules/Parser.pm @@ -168,6 +168,15 @@ sub search_include_path { } +sub escape_regex_special { + my($self) = shift; + my($name) = shift; + + $name =~ s/([\\\$\[\]\(\)\.])/\\$1/g; + return $name; +} + + # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 9e19628c..85340a46 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -1086,16 +1086,6 @@ sub is_special_tag { } -sub escape_regex_special { - my($self) = shift; - my($name) = shift; - - $name =~ s/([\\\$\[\]\(\)\.])/\\$1/g; - - return $name; -} - - sub sift_files { my($self) = shift; my($files) = shift; diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index bccc84d4..4a217fc0 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -472,6 +472,9 @@ sub write_workspace { my($error) = ''; if ($self->get_toplevel()) { + if (!$addfile) { + $self->{'per_project_workspace_name'} = 1; + } my($name) = $self->transform_file_name($self->workspace_file_name()); if (defined $self->{'projects'}->[0]) { my($fh) = new FileHandle(); @@ -532,6 +535,9 @@ sub write_workspace { print "WARNING: No projects were created.\n" . " Workspace $name has not been created.\n"; } + if (!$addfile) { + $self->{'per_project_workspace_name'} = undef; + } } return $status, $error; @@ -909,6 +915,13 @@ sub get_modified_workspace_name { my($type) = $self->{'wctype'}; my($wsname) = $self->get_workspace_name(); + ## If this is a per project workspace, then we should not + ## modify the workspace name. It may overwrite another workspace + ## but that's ok, it will also be a per project workspace. + if ($self->{'per_project_workspace_name'}) { + return "$name$ext"; + } + if (!defined $previous_workspace_name{$type}->{$pwd}) { $previous_workspace_name{$type}->{$pwd} = $wsname; $self->{'current_workspace_name'} = undef; |