%% Yair Lenga <[EMAIL PROTECTED]> writes: yl> First, the target might be modified by other processes.
As long as you don't mean at exactly the same time as make is running, this is not a problem for make. It keeps no state, so has nothing to be out of sync later. yl> The other problem is that the "make" is being executed on yl> different machines, which may have "time drift" - making yl> timestamps fail sometimes. My best solution is: Actually, your _best_ solution is to install NTP or some other time sync protocol to ensure that your systems do _not_ have time drift. yl> .PHONY: FORCE yl> target: FORCE yl> cmp -s source target || cp source $@ yl> This approach takes a lot of CPU, and network bandwidth (I'm using yl> NFS). Does anyone has better solution ? Some packages offer MD5 yl> instead/in addition to timestamping. Can this appraoch be applied yl> with gnu-make ? No. There is an item on the TODO list to allow more complex "out of date" determination algorithms. However, anything more complex than what make does now requires that make keep some state between invocations, so it can compare the previous state with the current state. This is a significant change to make's behavior and requires some thought on how to do it reliably, in the face of recursive make, parallel make, etc. etc. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
