--- loncom/build/lpml_parse.pl 2012/01/27 23:50:57 1.60 +++ loncom/build/lpml_parse.pl 2014/06/09 05:14:12 1.61 @@ -12,7 +12,7 @@ # The LearningOnline Network with CAPA # lpml_parse.pl - Linux Packaging Markup Language parser # -# $Id: lpml_parse.pl,v 1.60 2012/01/27 23:50:57 raeburn Exp $ +# $Id: lpml_parse.pl,v 1.61 2014/06/09 05:14:12 raeburn Exp $ # # Written by Scott Harrison, codeharrison@yahoo.com # @@ -1230,6 +1230,7 @@ sub format_file { my @tokeninfo=@_; $file=''; $source=''; $target=''; $categoryname=''; $description=''; $note=''; $build=''; $status=''; $dependencies=''; $installscript=''; + $buildlink = ''; my $text=&trim($parser->get_text('/file')); my $buildtest; $file_count++; @@ -1323,8 +1324,9 @@ END } return $result; } - my $bflag='-b1'; - $bflag='-b3' if (($dependencies or $buildlink) or + my $bflag='-b5'; + $bflag='-b3' if ($buildlink); + $bflag='-b6' if (($dependencies) or ($categoryname eq 'pdf manual')); if ($tokeninfo[2]{type} eq 'private') { return <get_text('/buildlink')); if ($text) { $parser->get_tag('/buildlink'); $buildlink=$sourceroot.'/'.$text; + } else { + $buildlink=''; } return ''; } @@ -1684,12 +1687,13 @@ sub format_status { # ------------------------------------------------- Format dependencies section sub format_dependencies { my @tokeninfo=@_; - #$dependencies=''; my $text=&trim($parser->get_text('/dependencies')); if ($text) { $parser->get_tag('/dependencies'); $dependencies=join(';',((map {s/^\s*//;s/\s$//;$_} split(/\;/,$text)),$dependencies)); $dependencies=~s/;$//; + } else { + $dependencies=''; } return ''; }