diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-26 13:24:58 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-26 13:24:58 +0000 |
commit | fbe9d3805536d4eca4676d99bda0aed48082bb44 (patch) | |
tree | c32f86bc7309a79a9e8dc75734ec207064cef8c7 | |
parent | f27bdfdca96aa2d2d0369d818bdf0fb5f13d9cfb (diff) | |
download | MPC-fbe9d3805536d4eca4676d99bda0aed48082bb44.tar.gz |
ChangeLogTag: Tue Aug 26 08:24:09 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/MakeWorkspaceCreator.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm index 42bd851b..e1d506f0 100644 --- a/modules/MakeWorkspaceCreator.pm +++ b/modules/MakeWorkspaceCreator.pm @@ -76,7 +76,7 @@ sub write_comps { print $fh "\t\@for file in \$(MFILES); do \\$crlf" . "\told=`pwd`; \\$crlf" . "\tcd `dirname \$\$file`; \\$crlf" . - "\t\$(MAKE) -f `basename \$\$file` \$(\@); \\$crlf" . + "\t\$(MAKE) PWD=`pwd` -f `basename \$\$file` \$(\@); \\$crlf" . "\tcd \$\$old; \\$crlf" . "\tdone$crlf"; } @@ -84,10 +84,12 @@ sub write_comps { ## Otherwise, just list the call to make without a for loop print $fh "\t\@"; my($dname) = dirname($list[0]); + my($pwd) = ''; if ($dname ne '.') { print $fh "cd $dname && "; + $pwd = "PWD=$dname"; } - print $fh "\$(MAKE) -f " . + print $fh "\$(MAKE) $pwd -f " . ($dname eq '.' ? $list[0] : basename($list[0])) . " \$(\@);$crlf"; } |