--- loncom/build/lpml_parse.pl 2001/11/07 16:53:52 1.16
+++ loncom/build/lpml_parse.pl 2001/11/17 23:23:36 1.22
@@ -6,7 +6,10 @@
# 06/19/2001,06/20,06/24 - Scott Harrison
# 9/5/2001,9/6,9/7,9/8 - Scott Harrison
# 9/17,9/18 - Scott Harrison
-# 11/4 - Scott Harrison
+# 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison
+#
+# $Id: lpml_parse.pl,v 1.22 2001/11/17 23:23:36 harris41 Exp $
+###
###############################################################################
## ##
@@ -83,9 +86,11 @@ if (@ARGV) {
$sourceroot=~s/\/$//;
$targetroot=~s/\/$//;
+my $logcmd='| tee -a WARNINGS';
+
my $invocation;
# --------------------------------------------------- Record program invocation
-if ($mode eq 'install') {
+if ($mode eq 'install' or $mode eq 'configinstall' or $mode eq 'build') {
$invocation=(<TARGETROOT: $text";
}
- elsif ($mode eq 'install') {
- return '# TARGET INSTALL LOCATION is "'.$targetroot."\"\n";
- }
- elsif ($mode eq 'build') {
+ elsif ($mode eq 'install' or $mode eq 'build' or
+ $mode eq 'configinstall') {
return '# TARGET INSTALL LOCATION is "'.$targetroot."\"\n";
}
else {
@@ -384,10 +388,8 @@ sub format_sourceroot {
if ($mode eq 'html') {
return $sourceroot="\n
SOURCEROOT: $text";
}
- elsif ($mode eq 'install') {
- return '# SOURCE CODE LOCATION IS "'.$sourceroot."\"\n";;
- }
- elsif ($mode eq 'build') {
+ elsif ($mode eq 'install' or $mode eq 'build' or
+ $mode eq 'configinstall') {
return '# SOURCE CODE LOCATION IS "'.$sourceroot."\"\n";;
}
else {
@@ -695,22 +697,22 @@ sub format_files {
$depstring.="\telif !(test -r $command/$dep);\\\n";
$depstring.="\t\tthen echo ".
"\"**** WARNING **** missing the file: ".
- "$command/$dep\";\\\n";
+ "$command/$dep\"$logcmd;\\\n";
$depstring.="\t\ttest -e $source || test -e $target || echo ".
"'**** ERROR **** neither source=$source nor target=".
- "$target exist and they cannot be built';\\\n";
+ "$target exist and they cannot be built'$logcmd;\\\n";
$depstring.="\t\tmake -f Makefile.build ${source}___DEPS;\\\n";
if ($olddep) {
$depstring2.="\t\tECODE=0;\\\n";
$depstring2.="\t\t! test -e $source && test -r $command/$olddep &&".
- " { perl filecompare.pl -B $command/$olddep $target || ECODE=\$\$?; } && { [ \$\$ECODE != \"2\" ] || echo \"**** WARNING **** dependency $command/$olddep is newer than target file $target; SOMETHING MAY BE WRONG\"; };\\\n";
+ " { perl filecompare.pl -b2 $command/$olddep $target || ECODE=\$\$?; } && { [ \$\$ECODE != \"2\" ] || echo \"**** WARNING **** dependency $command/$olddep is newer than target file $target; SOMETHING MAY BE WRONG\"$logcmd; };\\\n";
}
$olddep=$dep;
}
$binfo.="$source: $tword\n".
"\t\@if !(echo \"\");\\\n\t\tthen echo ".
"\"**** WARNING **** Strange shell. ".
- "Check your path settings.\";\\\n".
+ "Check your path settings.\"$logcmd;\\\n".
$depstring.
"\telse \\\n\t\t$command2\n\tfi\n\n";
$binfo.="${source}___DEPS:\n".$depstring2."\t\tECODE=0;\n\n";
@@ -770,17 +772,17 @@ sub format_file {
foreach my $dep (@deps) {
$depstring.=<