summaryrefslogtreecommitdiff
path: root/modules/NMakeWorkspaceCreator.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-01-29 20:12:20 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-01-29 20:12:20 +0000
commitd2d7524c184d13d3bd5fab6bffdca40103ec5131 (patch)
tree6950087c5af8eee9fa7641ba61d6301fc722e130 /modules/NMakeWorkspaceCreator.pm
parentba690ef36642212940575536b73d35c13229dd79 (diff)
downloadMPC-d2d7524c184d13d3bd5fab6bffdca40103ec5131.tar.gz
ChangeLogTag: Thu Jan 29 14:10:51 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/NMakeWorkspaceCreator.pm')
-rw-r--r--modules/NMakeWorkspaceCreator.pm35
1 files changed, 32 insertions, 3 deletions
diff --git a/modules/NMakeWorkspaceCreator.pm b/modules/NMakeWorkspaceCreator.pm
index 0b14435b..b5fd57ec 100644
--- a/modules/NMakeWorkspaceCreator.pm
+++ b/modules/NMakeWorkspaceCreator.pm
@@ -94,7 +94,8 @@ sub write_comps {
my($fh) = shift;
my($projects) = $self->get_projects();
my($pjs) = $self->get_project_info();
- my(@list) = $self->sort_dependencies($projects, $pjs);
+ my(%targnum) = ();
+ my(@list) = $self->number_target_deps($projects, $pjs, \%targnum);
my($crlf) = $self->crlf();
my($default) = 'Win32 Debug';
@@ -108,7 +109,7 @@ sub write_comps {
last;
}
}
-
+
## Print out the content
print $fh '!IF "$(CFG)" == ""' . $crlf .
'CFG=' . $default . $crlf .
@@ -116,11 +117,39 @@ sub write_comps {
'Defaulting to ' . $default . '.' . $crlf .
'!ENDIF' . $crlf;
- foreach my $target ('ALL', 'DEPEND', 'CLEAN', 'REALCLEAN') {
+ ## Print out the "all" target
+ print $fh $crlf . 'ALL:';
+ foreach my $project (@list) {
+ print $fh " $$pjs{$project}->[0]";
+ }
+ print $fh $crlf;
+
+ ## Print out all other targets here
+ foreach my $target ('DEPEND', 'CLEAN', 'REALCLEAN') {
print $fh $crlf .
$target . ':' . $crlf;
$self->write_project_targets($fh, 'CFG="$(CFG)" ' . $target, \@list);
}
+
+ ## Print out each target separately
+ foreach my $project (@list) {
+ my($dname) = dirname($project);
+ print $fh $crlf . $$pjs{$project}->[0] . ':';
+ if (defined $targnum{$project}) {
+ foreach my $number (@{$targnum{$project}}) {
+ print $fh " $$pjs{$list[$number]}->[0]";
+ }
+ }
+
+ print $fh $crlf;
+ $self->write_project_targets($fh, 'CFG="$(CFG)" ' . 'ALL', [ $project ]);
+ }
+
+ ## Print out the project_name_list target
+ print $fh $crlf . "project_name_list:$crlf";
+ foreach my $project (@list) {
+ print $fh "\t\@echo $$pjs{$project}->[0]$crlf";
+ }
}