--- loncom/build/lpml_parse.pl 2002/04/21 23:36:17 1.46 +++ loncom/build/lpml_parse.pl 2002/04/26 15:53:00 1.47 @@ -12,7 +12,7 @@ # The LearningOnline Network with CAPA # lpml_parse.pl - Linux Packaging Markup Language parser # -# $Id: lpml_parse.pl,v 1.46 2002/04/21 23:36:17 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.47 2002/04/26 15:53:00 harris41 Exp $ # # Written by Scott Harrison, codeharrison@yahoo.com # @@ -1178,7 +1178,18 @@ sub format_file { if ($source) { $parser->get_tag('/file'); if ($mode eq 'MANIFEST') { - return $source."\n"; + my $command=$build; + if ($command!~/\s/) { + $command=~s/\/([^\/]*)$//; + } + else { + $command=~s/(.*?\/)([^\/]+\s+.*)$/$1/; + } + $command=~s/^$sourceroot\///; + my (@deps)=split(/\;/,$dependencies); + my $retval=join("\n",($source, + (map {"$command$_"} @deps))); + return $retval."\n"; } elsif ($mode eq 'html') { return ($file="\n".