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

harris41 lon-capa-cvs@mail.lon-capa.org
Sun, 19 May 2002 17:46:20 -0000


harris41		Sun May 19 13:46:20 2002 EDT

  Modified files:              
    /loncom/build	lpml_parse.pl 
  Log:
  latest release; beautifies configinstall Makefile syntax output
  
  
Index: loncom/build/lpml_parse.pl
diff -u loncom/build/lpml_parse.pl:1.47 loncom/build/lpml_parse.pl:1.48
--- loncom/build/lpml_parse.pl:1.47	Fri Apr 26 11:53:00 2002
+++ loncom/build/lpml_parse.pl	Sun May 19 13:46:19 2002
@@ -12,7 +12,7 @@
 # The LearningOnline Network with CAPA
 # lpml_parse.pl - Linux Packaging Markup Language parser
 #
-# $Id: lpml_parse.pl,v 1.47 2002/04/26 15:53:00 harris41 Exp $
+# $Id: lpml_parse.pl,v 1.48 2002/05/19 17:46:19 harris41 Exp $
 #
 # Written by Scott Harrison, codeharrison@yahoo.com
 #
@@ -1266,36 +1266,55 @@
 	elsif ($mode eq 'configinstall' && $categoryname eq 'conf') {
 	    push @configall,$targetroot.'/'.$target;
 	    return $targetroot.'/'.$target.': alwaysrun'."\n".
-		"\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 '.
-		$sourceroot.'/'.$source.' '.$targetroot.'/'.$target.
-		' || ECODE=$$?; } && '.
-		'{ [ $$ECODE != "2" ] || (install '.
-                $categoryhash{$categoryname}.' '.
-		$sourceroot.'/'.$source.' '.
-		$targetroot.'/'.$target.'.lpmlnew'.
+		"\t".'@# Compare source with target and intelligently respond'.
+		"\n\t\n\t\n".
+
+
+		"\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 \\'.
+		"\n\t".$sourceroot.'/'.$source." \\\n\t".
+		$targetroot.'/'.$target." \\\n\t".
+		' || ECODE=$$?; } && '."\\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "2" ] || '." \\\n\t".'(install '.
+                $categoryhash{$categoryname}." \\\n\t\t".
+		$sourceroot.'/'.$source." \\\n\t\t".
+		$targetroot.'/'.$target.'.lpmlnew'." \\\n\t\t".
 		' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'.
-		$logcmd.' && echo "'.
-		'You likely need to compare contents of '.
-		''.$targetroot.'/'.$target.' with the new '.
-                ''.$targetroot.'/'.$target.'.lpmlnew"'.
-		"$logcmd); } && ".
-		'{ [ $$ECODE != "3" ] || (install '.
-                $categoryhash{$categoryname}.' '.
-		$sourceroot.'/'.$source.' '.
-		$targetroot.'/'.$target.''.
+		" \\\n\t\t".$logcmd.' && '." \\\n\t\t"."echo -n \"".
+		'You likely need to compare contents of "'."\\\n\t\t\t".
+		'echo -n "'.$targetroot.'/'.$target.'"'."\\\n\t\t".
+		'echo -n "with the new "'."\\\n\t\t\t".
+                'echo "'.$targetroot.'/'.$target.'.lpmlnew"'."\\\n\t\t".
+		"$logcmd); } && "." \\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "3" ] || '."\\\n\t".
+		'(install '.
+                $categoryhash{$categoryname}."\\\n\t\t".
+		$sourceroot.'/'.$source."\\\n\t\t".
+		$targetroot.'/'.$target."\\\n\t\t".
 		' && echo "**** WARNING: NEW CONFIGURATION FILE ADDED ****"'.
-		$logcmd.' && echo "'.
-		'You likely need to review the contents of '.
-		''.$targetroot.'/'.$target.' to make sure its '.
-                'settings are compatible with your overall system"'.
-		"$logcmd); } && ".
-		'{ [ $$ECODE != "1" ] || ('.
-		'echo "**** ERROR ****"'.
-		$logcmd.' && echo "'.
-		'Configuration source file does not exist '.
-		''.$sourceroot.'/'.$source.'"'.
-	      "$logcmd); } && perl verifymodown.pl ${targetroot}/${target} \"".
-		"$categoryhash{$categoryname}\"$logcmd;\n\n";
+		"\\\n\t\t".$logcmd.' && '."\\\n\t\t".
+		'echo -n "'.
+		'You likely need to review the contents of "'."\\\n\t\t\t".
+		'echo -n "'.
+		$targetroot.'/'.$target.'"'."\\\n\t\t\t".
+		'echo -n "'.
+		'to make sure its "'."\\\n\t\t".
+		'echo "'.
+                'settings are compatible with your overall system"'."\\\n\t\t".
+		"$logcmd); } && "."\\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "1" ] || ('."\\\n\t\t".
+		'echo "**** ERROR ****"'.$logcmd.' && '."\\\n\t\t".'echo -n "'.
+		'Configuration source file does not exist "'."\\\n\t\t".
+		'echo -n "'.$sourceroot.'/'.$source.'"'."\\\n\t\t".
+		"$logcmd); } && "."\\\n\t\t".
+		"perl verifymodown.pl ${targetroot}/${target} "."\\\n\t\t\t".
+		"\"$categoryhash{$categoryname}\""."\\\n\t\t\t".
+		"$logcmd;\n\n";
 	}
 	elsif ($mode eq 'build' && $build) {
 	    push @buildall,$sourceroot.'/'.$source;