From e2caf6fa3b61d48ee448614abeee3b78d4932c4a Mon Sep 17 00:00:00 2001 From: Jeremy Huntwork Date: Mon, 12 Sep 2005 01:25:17 +0000 Subject: [PATCH] Fixed an issue with spurious appearances of '&& \' in the produced Makefile --- jhalfs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jhalfs b/jhalfs index 56b486d..eed79ed 100755 --- a/jhalfs +++ b/jhalfs @@ -281,7 +281,8 @@ build_Makefile() { 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