r1993 - jhalfs/trunk

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Sun Sep 11 18:25:17 PDT 2005


Author: jhuntwork
Date: 2005-09-11 19:25:17 -0600 (Sun, 11 Sep 2005)
New Revision: 1993

Modified:
   jhalfs/trunk/jhalfs
Log:
Fixed an issue with spurious appearances of '&& \' in the produced Makefile

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-09-12 01:01:10 UTC (rev 1992)
+++ jhalfs/trunk/jhalfs	2005-09-12 01:25:17 UTC (rev 1993)
@@ -281,7 +281,8 @@
 	fi
 
 	# Drop in the actual commands that were parsed from the book
-	cat $i | sed -e 's:\$:&&:g' -e 's:^:\t:' -e 's:$: \&\& \\:' >> $MKFILE.tmp
+	cat $i | sed -e 's:\$:&&:g' -e 's:^:\t:' -e 's:[^\\]$:& \&\& \\:' >> $MKFILE.tmp
+	sed -i '$s: \&\& \\::' $MKFILE.tmp
 
 	# Include a touch of the target name so make can check if it's already been made.
 	echo -e "\ttouch \$@" >> $MKFILE.tmp




More information about the alfs-log mailing list