tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: asynchronous make(1), anyone?



On Thu, Apr 12, 2012 at 08:54:28AM +0100, David Laight wrote:
> On Wed, Apr 11, 2012 at 07:32:11PM -0400, Matthew Mondor wrote:
> > On Wed, 11 Apr 2012 17:01:34 -0500
> > David Young <dyoung%pobox.com@localhost> wrote:
> > 
> > > You can save a programmer who is in an edit-compile-test loop some
> > > effort at the keyboard if, as soon as they write a new version of some
> > > source file, the computer automatically recompiles their program.
> 
> I'm not actually that is a significant saving.
> Saving either :!! or <move mouse><up arrow><enter> doesn't actually
> seem worth the effort.

It saves the programmer rote repetition, and it saves the programmer time
if the computer can start compiling before they've typed the first '!'
or put their hand on the mouse.  Both of these advantages you have to
multiply by millions of repetitions before dividing by the effort.

> > As for make watching files for change, I see a few possible
> > challenges:  kevent currently requires a file descriptor per file
> > being watched (possibly an issue with large projects), the alternative
> > being running through the files checking timestamps, like make does.
> 
> Not sure that'll work, an editor probably ought to do a 'safe write'
> sequence involving temporary file and rename to avoid file lossage.
> If they do, then checking the directory timestamp would be needed
> instead.
> I suspect most editors reopen the output file with O_TRUNC | O_CREAT
> - that is certainly useful when editing on layered fs.

I think that you'll get a NOTE_UNLINK on the old file when the safe
write occurs.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index