--- loncom/build/lpml_parse.pl 2001/12/05 01:39:08 1.26 +++ loncom/build/lpml_parse.pl 2001/12/06 00:22:53 1.27 @@ -7,8 +7,8 @@ # 9/5/2001,9/6,9/7,9/8 - Scott Harrison # 9/17,9/18 - Scott Harrison # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison -# -# $Id: lpml_parse.pl,v 1.26 2001/12/05 01:39:08 harris41 Exp $ +# 12/2,12/3,12/4,12/5 - Scott Harrison +# $Id: lpml_parse.pl,v 1.27 2001/12/06 00:22:53 harris41 Exp $ ### ############################################################################### @@ -77,6 +77,8 @@ if (@ARGV) { my $targetroot; my $sourceroot; +my $targetrootarg; +my $sourcerootarg; if (@ARGV) { $sourceroot = shift @ARGV; } @@ -85,6 +87,8 @@ if (@ARGV) { } $sourceroot=~s/\/$//; $targetroot=~s/\/$//; +$sourcerootarg=$sourceroot; +$targetrootarg=$targetroot; my $logcmd='| tee -a WARNINGS'; @@ -493,6 +497,7 @@ sub format_category { $fab{$category_att_name}=$abbreviation; if ($mode eq 'html') { if ($category_att_type eq $categorytype) { + $categoryhash{$category_att_name}="$chmod $chown"; return $category="". "\n". @@ -953,9 +958,11 @@ sub format_file { if ($mode eq 'html') { return ($file="\n". "". - "  ". + "". - "$categoryname". + "$categoryname
". + $categoryhash{$categoryname}."". "SOURCE: $source
TARGET: $target". "$description". "$note". @@ -1011,7 +1018,7 @@ $buildtest \@if !(test -e "${sourceroot} case "\$\$ECODE" in \\ 1) echo "${targetroot}/${target} is unchanged";; \\ 2) echo "**** WARNING **** target file ${targetroot}/${target} is newer than CVS source; saving current (old) target file to ${targetroot}/${target}.lpmlsave and then overwriting"$logcmd && install -o www -g www -m 0600 ${targetroot}/${target} ${targetroot}/${target}.lpmlsave && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\ - 0) echo "install $categoryhash{$categorname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\ + 0) echo "install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\ esac; \\ perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\ fi @@ -1066,16 +1073,41 @@ END # --------------------------------------------------------- Format link section sub format_link { my @tokeninfo=@_; - $link=''; $linkto=''; $target=''; $categoryname=''; $description=''; - $note=''; $build=''; $status=''; $dependencies=''; + $link=''; $linkto=''; $source=''; $target=''; $categoryname=''; + $description=''; $note=''; $build=''; $status=''; $dependencies=''; my $text=&trim($parser->get_text('/link')); if ($linkto) { $parser->get_tag('/link'); if ($mode eq 'html') { - return $link="\nBEGIN LINK\n". - "$linkto $target $categoryname $description $note " . - "$build $status $dependencies" . - "\nEND LINK"; + my @targets=map {s/^\s*//;s/\s$//;$_} split(/\;/,$target); + foreach my $tgt (@targets) { + push @links,("\n". + "". + " ". + "". + "$categoryname". + "LINKTO: $linkto
TARGET: $tgt". + "$description". + "$note". + ""); +# push @links,"\t".'ln -fs /'.$linkto.' /'.$targetroot.$tgt. +# "\n"; + } + return join('',@links); +# return ($link="\n". +# "". +# " ". +# "$categoryname". +# "LINKTO: $linkto
TARGET: $target". +# "$description". +# "$note". +# ""); +# return $link="\nBEGIN LINK\n". +# "$linkto $target $categoryname $description $note " . +# "$build $status $dependencies" . +# "\nEND LINK"; } elsif ($mode eq 'install') { my @targets=map {s/^\s*//;s/\s$//;$_} split(/\;/,$target); @@ -1099,13 +1131,31 @@ sub format_fileglob { $note=''; $build=''; $status=''; $dependencies=''; $filenames=''; my $text=&trim($parser->get_text('/fileglob')); + my $filenames2=$filenames;$filenames2=~s/\s//g; if ($sourcedir) { $parser->get_tag('/fileglob'); if ($mode eq 'html') { - return $fileglob="\nBEGIN FILEGLOB\n". - "$glob sourcedir $targetdir $categoryname $description $note ". - "$build $status $dependencies $filenames" . - "\nEND FILEGLOB"; + return $fileglob="\n". + " ". + ""."". + "$categoryname
". + "".$categoryhash{$categoryname}."". + "SOURCEDIR: $sourcedir
". + "TARGETDIR: $targetdir
". + "GLOB: $glob
". + "FILENAMES: $filenames". + "". + "$description". + "$note". + ""; +# return $fileglob="\nBEGIN FILEGLOB\n". +# "$glob sourcedir $targetdir $categoryname $description $note ". +# "$build $status $dependencies $filenames" . +# "\nEND FILEGLOB"; } elsif ($mode eq 'install') { return "\t".'install '.