diff options
Diffstat (limited to 'bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm')
-rw-r--r-- | bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm new file mode 100644 index 00000000000..f1eebf02842 --- /dev/null +++ b/bin/MakeProjectCreator/modules/VA4WorkspaceCreator.pm @@ -0,0 +1,76 @@ +package VA4WorkspaceCreator; + +# ************************************************************ +# Description : A VA4 Workspace Creator +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use VA4ProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub crlf { + my($self) = shift; + return $self->windows_crlf(); +} + + +sub workspace_file_name { + my($self) = shift; + return $self->get_workspace_name() . ".icp"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + my($crlf) = $self->crlf(); + + print $fh "// Visual Age C++ 4 workspace file$crlf$crlf"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + my(@list) = $self->sort_dependencies($projects, $pjs); + my($crlf) = $self->crlf(); + + foreach my $project (@list) { + my($base) = $project; + $base =~ s/\.[^\.]+//; + my($ics) = "$base.ics"; + + print $fh "subproject $base icc \"$project\", ics \"$ics\"$crlf" . + "{$crlf" . + "}$crlf"; + } + + print $fh "build buildAll$crlf" . + "{$crlf"; + foreach my $project (@list) { + my($base) = $project; + $base =~ s/\.[^\.]+//; + print $fh " use $base$crlf"; + } + print $fh "}$crlf$crlf"; +} + + +1; |