diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-28 12:12:21 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-08-28 12:12:21 +0000 |
commit | 41da28bc7148d02ff0c32ebb24c4fb0402c8ebec (patch) | |
tree | dc0df4470580d54bff75c2fca07f5ea9dd413f6b /bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm | |
parent | 8a994d77525b162dde7e6d8dd55b852f0db01e94 (diff) | |
download | ATCD-41da28bc7148d02ff0c32ebb24c4fb0402c8ebec.tar.gz |
ChangeLogTag: Thu Aug 28 07:10:54 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm')
-rw-r--r-- | bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm index 60ec3726def..c4ff8243033 100644 --- a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm @@ -91,6 +91,8 @@ sub write_comps { ## If there is more than one project, use a for loop if ($#list > 0) { + my(@dirs) = (); + my(%added) = (); print $fh "ifeq (\$(KEEP_GOING),1)$crlf" . "\t\@for file in \$(MFILES); do \\$crlf" . "\t\$(MAKE) -f `basename \$\$file` -C `dirname \$\$file` \$(\@); \\$crlf" . @@ -98,12 +100,35 @@ sub write_comps { "else$crlf"; foreach my $project (@list) { print $fh "\t\@\$(MAKE) -f " . basename($project) . ' -C ' . dirname($project) . " \$(\@);$crlf"; + my($dname) = dirname($project); + if ($dname ne '.' && !defined $added{$dname}) { + push(@dirs, $dname); + $added{$dname} = 1; + } } print $fh "endif$crlf"; + + ## Print out the reverseclean target + if (defined $dirs[0]) { + print $fh $crlf . + 'DIRS = \\' . $crlf; + for(my $i = 0; $i <= $#dirs; ++$i) { + print $fh " $dirs[$i]" . ($i != $#dirs ? ' \\' : '') . $crlf; + } + print $fh $crlf . + "reverseclean:$crlf" . + "\t\@\$(ACE_ROOT)/bin/reverse_clean \$(DIRS)$crlf"; + } } else { ## Otherwise, just list the call to make without a for loop - print $fh "\t\@\$(MAKE) -f " . basename($list[0]) . ' -C ' . dirname($list[0]) . " \$(\@);$crlf"; + my($dir) = dirname($list[0]); + my($base) = basename($list[0]); + print $fh "\t\@\$(MAKE) -f $base " . ($dir ne '.' ? "-C $dir " : '') . + "\$(\@);$crlf$crlf" . + "reverseclean:$crlf" . + "\t\@\$(MAKE) -f $base " . ($dir ne '.' ? "-C $dir " : '') . + "realclean$crlf"; } } |