I have often used the shell && operator in commands run from make:
foo:
sed ... > /tmp/x && mv /tmp/x y
but I am now questioning the value of this. Obviously, the above mv
is executed only if sed returns success so it "protects" y from
accidental clobbering. However, isn't that exactly what this does:
foo:
sed ... > /tmp/x
mv /tmp/x y
If sed's exit status is non-zero make will not perform the mv -- even
with the -k flag. Of course, it will perform the mv with the -i
flag, but that is virtually never used.
Assuming the -i flag isn't used (or .SILENT: etc.), is one form
preferred over the other? Right now I prefer the second form.
Comments?
--
Robert
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make