Fixed an issue with spurious appearances of '&& \' in the produced Makefile

This commit is contained in:
Jeremy Huntwork 2005-09-12 01:25:17 +00:00
parent f8de15651e
commit e2caf6fa3b

3
jhalfs
View file

@ -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