--- loncom/build/Attic/parse.pl 2001/02/27 15:23:35 1.30 +++ loncom/build/Attic/parse.pl 2001/05/21 21:56:35 1.40 @@ -2,8 +2,19 @@ # Scott Harrison # November 2000 - -# Read in loncapa tags and metagroup tags +# 12/5/2000,12/7,12/8,12/9,12/10,12/11,12/12,12/13,12/14,12/21 Scott Harrison +# 1/8/2001,1/10/2001,1/13/2001,1/16/2001,1/18/2001,1/23/2001 Scott Harrison +# 2/26/2001,2/27/2001,3/5/2001,4/10/2001,4/11,2001,4/13,2001 Scott Harrison +# 4/17/2001 Scott Harrison + +# Read in loncapa tags and metagroup tags. Output various +# useful files for viewing, compiling, monitoring, updating, +# and installing. + +# This code works well. HOWEVER, I was in a rush when I +# wrote it. Future plans are that the parsing should be +# much more event-state based and the input should be +# more XML-ish. -Scott # ---------------------------------------------- Read in command line arguments my ($file,$mode)=@ARGV; @@ -171,6 +182,35 @@ www:!!:500:500:www:/home/www:/bin/bash END close OUT; open OUT,">>setup_file_list.txt"; + print OUT "BinaryRoot/etc/group\n"; + close OUT; + open OUT,">BinaryRoot/etc/group"; + print OUT<>setup_file_list.txt"; print OUT "BinaryRoot/etc/hosts.deny\n"; close OUT; open OUT,">BinaryRoot/etc/hosts.deny"; @@ -179,7 +219,7 @@ ALL: ALL END close OUT; - `install -o 500 -g 500 -m 0700 -d BinaryRoot/home/www`; + `install -o www -g users -m 0700 -d BinaryRoot/home/www`; open OUT,">>setup_file_list.txt"; print OUT "BinaryRoot/home/www\n"; close OUT; @@ -568,7 +608,9 @@ sub make_files_build_segment { my $description; my @allfiles=keys %{$info{'LOCATION'}{$distribution}}; my $tab="\t"; - my $sources="all: "; + my $sources="# Dynamic Makefile generated by LON-CAPA build process\n\n"; + $sources.="SHELL=\"/bin/sh\"\n\n"; + $sources.="\nall: "; foreach my $d (@$dirs) { # set other values my $dirdescription=$info{'DIRECTORY'}{$distribution}{$d}{'DESCRIPTION'}; @@ -591,27 +633,43 @@ sub make_files_build_segment { if ($build) { my $dependencies=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'DEPENDENCIES'}; my $source2=$source; - $source2=~s/^[^\/]+\///; - $source2="../" . $source2; +# $source2=~s/^[^\/]+\///; + $source2="../../" . $source2; $sources.="$source2 "; my $directory=$build; - $directory=~s/^[^\/]+\///; +# $directory=~s/^[^\/]+\///; $directory=~s/([^\/]+)$//; - $directory="../" . $directory; + $directory="../../" . $directory; my $buildfile=$1; my $sdir=$source; - $sdir=~s/^[^\/]+\///; +# $sdir=~s/^[^\/]+\///; $sdir=~s/([^\/]+)$//; - $sdir="../" . $sdir; + $sdir="../../" . $sdir; $dependencies=~s/\s+$//; my $depstat=""; if ($dependencies=~s/\s+\[ALWAYS_RUN_BUILD_COMMAND\]//) { $depstat=" alwaysrun"; } $dependencies=~s/\s+/ $sdir/gs; + my @deps=split(/\s+/,$dependencies); + shift @deps; + my $testing=</dev/null; install -o $owner -g $group -m $devchmod \$(SOURCE)/$source \$(TARGET)/$rot END } }