[LON-CAPA-cvs] cvs: loncom /build lpml_parse.pl

harris41 lon-capa-cvs@mail.lon-capa.org
Fri, 26 Apr 2002 15:53:01 -0000


harris41		Fri Apr 26 11:53:01 2002 EDT

  Modified files:              
    /loncom/build	lpml_parse.pl 
  Log:
  latest version
  
  
Index: loncom/build/lpml_parse.pl
diff -u loncom/build/lpml_parse.pl:1.46 loncom/build/lpml_parse.pl:1.47
--- loncom/build/lpml_parse.pl:1.46	Sun Apr 21 19:36:17 2002
+++ loncom/build/lpml_parse.pl	Fri Apr 26 11:53:00 2002
@@ -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 @@
     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<!-- FILESORT:$target -->".