Diff for /loncom/build/Attic/parse.pl between versions 1.14 and 1.15

version 1.14, 2000/12/12 17:05:36 version 1.15, 2000/12/13 21:43:18
Line 161  elsif ($mode eq "install") { Line 161  elsif ($mode eq "install") {
     $a=&make_links_install_segment(\@directories);      $a=&make_links_install_segment(\@directories);
     print $a;      print $a;
 }  }
   elsif ($mode eq "build") {
       @directories=&determine_directory_structure;
       $a=&make_files_build_segment(\@directories);
       print $a;
   }
   
 # ------------------------------------------------------ a list of file targets  # ------------------------------------------------------ a list of file targets
 sub make_file_list {  sub make_file_list {
Line 465  END Line 470  END
     return $description;      return $description;
 }  }
   
   # ------------------------------------------------------ Commands to build files
   sub make_files_build_segment {
       my ($dirs)=@_;
       my $description;
       my @allfiles=keys %{$info{'LOCATION'}{$distribution}};
       my $tab="\t";
       my $sources="all: ";
       foreach my $d (@$dirs) {
    # set other values
    my $dirdescription=$info{'DIRECTORY'}{$distribution}{$d}{'DESCRIPTION'};
    $dirdescription="(" . $dirdescription . ")" if $dirdescription;
    # find files that are contained in this directory
    my @files;
    my @filesfull;
    foreach my $f (@allfiles) {
       if ($f=~/^$d\/([^\/]+)$/) {
    push @files,$1;
    push @filesfull,$f;
       }
    }
    if (@files) {
               foreach my $i (0..$#files) {
    # if has build information, output appropriate something
    my $build=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'BUILD'};
    my $source=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'SOURCE'};
    $build=~s/^\s+//; $build=~s/\s+$//;
    if ($build) {
       my $dependencies=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'DEPENDENCIES'};
       my $source2=$source;
       $source2=~s/^[^\/]+\///;
        $source2="../" . $source2;
       $sources.="$source2 ";
       my $directory=$build;
       $directory=~s/^[^\/]+\///;
       $directory=~s/([^\/]+)$//;
        $directory="../" . $directory;
       my $buildfile=$1;
       my $sdir=$source;
       $sdir=~s/^[^\/]+\///;
       $sdir=~s/([^\/]+)$//;
        $sdir="../" . $sdir;
       $dependencies=~s/\s+$//;
       my $depstat="";
       if ($dependencies=~s/\s+\[ALWAYS_RUN_BUILD_COMMAND\]//) {
    $depstat=" alwaysrun";
       }
       $dependencies=~s/\s+/ $sdir/gs;
       $description.=<<END;
   $source2: $dependencies$depstat
   ${tab}cd $directory; sh ./$buildfile
   
   END
    }
    my $category=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'CATEGORY'};
    my $source=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'SOURCE'};
    my $chown=$info{'OWNERSHIP'}{$category}{'CHOWN'};
    my $chmod=$info{'OWNERSHIP'}{$category}{'CHMOD'};
    my $devchown=$info{'DEVOWNERSHIP'}{$category}{'CHOWN'};
    my $devchmod=$info{'DEVOWNERSHIP'}{$category}{'CHMOD'};
    my $rot=$filesfull[$i];
    $rot=~s/[^\/]+$/\./ if $rot=~/\*/;
   # $description.=<<END if $category ne 'symbolic link';
   #\tinstall -m $devchmod \$(SOURCE)/$source \$(TARGET)/$rot
   #END
       }
    }
       }
       $description.=<<END;
   alwaysrun:
   
   END
       $sources.="\n\n";
       return ($sources . $description);
   }
   
 # --------------------------------------- Installation commands to install files  # --------------------------------------- Installation commands to install files
 sub make_files_install_segment {  sub make_files_install_segment {
     my ($dirs)=@_;      my ($dirs)=@_;
Line 501  END Line 581  END
  my $devchmod=$info{'DEVOWNERSHIP'}{$category}{'CHMOD'};   my $devchmod=$info{'DEVOWNERSHIP'}{$category}{'CHMOD'};
  my $rot=$filesfull[$i];   my $rot=$filesfull[$i];
  $rot=~s/[^\/]+$/\./ if $rot=~/\*/;   $rot=~s/[^\/]+$/\./ if $rot=~/\*/;
  $description.=<<END if $category ne 'symbolic link';   if ($category ne 'conf') {
       $description.=<<END if $category ne 'symbolic link';
 \tinstall -m $devchmod \$(SOURCE)/$source \$(TARGET)/$rot  \tinstall -m $devchmod \$(SOURCE)/$source \$(TARGET)/$rot
 END  END
                   }
     }      }
  }   }
     }      }

Removed from v.1.14  
changed lines
  Added in v.1.15


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>