diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-04-09 19:11:40 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-04-09 19:11:40 +0000 |
commit | 9a3d0d794702c7e1212989fca138f5e27d74189d (patch) | |
tree | f423d97462ede18d060f60c376b1809adf18b284 /modules/MakeWorkspaceCreator.pm | |
parent | 2b6a9eb58f2ade3cf4ca10af755be09b4f67d65c (diff) | |
download | MPC-9a3d0d794702c7e1212989fca138f5e27d74189d.tar.gz |
ChangeLogTag: Wed Apr 9 14:10:42 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/MakeWorkspaceCreator.pm')
-rw-r--r-- | modules/MakeWorkspaceCreator.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm index 2f67e6eb..99675f87 100644 --- a/modules/MakeWorkspaceCreator.pm +++ b/modules/MakeWorkspaceCreator.pm @@ -74,12 +74,22 @@ sub write_comps { ## If there is more than one project, use a for loop if ($#list > 0) { print $fh "\t\@for file in \$(MFILES); do \\$crlf" . - "\t\$(MAKE) -f \$\$file \$(\@); \\$crlf" . + "\told=`pwd`; \\$crlf" . + "\tcd `dirname \$\$file`; \\$crlf" . + "\t\$(MAKE) -f `basename \$\$file` \$(\@); \\$crlf" . + "\tcd \$\$old; \\$crlf" . "\tdone$crlf"; } else { ## Otherwise, just list the call to make without a for loop - print $fh "\t\@\$(MAKE) -f " . $list[0] . " \$(\@);$crlf"; + print $fh "\t\@"; + my($dname) = dirname($list[0]); + if ($dname ne '.') { + print $fh "cd $dname && "; + } + print $fh "\$(MAKE) -f " . + ($dname eq '.' ? $list[0] : basename($list[0])) . + " \$(\@);$crlf"; } } |