On 12-01-06 11:19 AM, Colin Walters wrote:
> On Fri, 2012-01-06 at 10:52 -0500, Gaetan Nadon wrote:
>
>> +sr.cpp : sr.g4a
>> +    $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a > $@
> I recommend writing custom build commands to be atomic.  Which means:
>
> $(srcdir)/pre_cpp.py $(srcdir)/sr.g4a > $@.tmp && mv $@.tmp $@
>
> This way if the developer uses Control-C to send SIGINT to the process
> group which kills the command in the middle of a write (or the command
> crashes), you don't spend any time debugging the later program which is
> consuming a half-written input file.  In some cases this can cause very
> subtle corruption or errors.
This is news to me. Makes sense. For the gcc command, would it not take
care of removing output before exiting?
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to