[Top][All Lists]

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

Re: build system rules & algorithms

From: Tom Tromey
Subject: Re: build system rules & algorithms
Date: Thu, 18 Jun 2009 12:43:41 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

>>>>> "Stephan" == Stephan Beal <address@hidden> writes:

Replying to a semi-old thread...

Stephan> Also my opinion. On a related note, my major gripe with Alpha builds:
Stephan> i come from the school of thought which (strongly) believes that a
Stephan> change to a Makefile requires a rebuild of all targets controlled by
Stephan> the Makefile, for the simple reason that the Makefile controls all
Stephan> options sent to the compiler. If the Makefile changes, compile
Stephan> flags/options might have changed, and not doing a full rebuild can
Stephan> lead to difficult-to-find bugs which mysteriously disappear when "make
Stephan> clean; make all" is run (because a -DFOO=3 was changed to -DFOO=4). In
Stephan> an Alpha build this school of thought suffers considerably unless the
Stephan> whole project builds in a trivial amount of time (say, less than 10
Stephan> seconds).

I don't think this is really an alpha/beta distinction, but instead
another axis, which is what is considered a dependency.

Checking dependencies on command text is possible, as is checking
dependencies using file contents (as opposed to timestamps).  I think
there is a patch for GNU make to implement this.  Also, I think these
can be done currently using GNU make, though this requires weird code
and is not pleasant.

As for turning make into a beta system: it seems like it could be done
with a small inotify-based daemon.  An initial 'make' could run it and
have it track relevant directories (perhaps telling it to add
directories in subsequent runs).  Then, make would use it as an
oracle: ask it about file status and get back answers.  Finally, if
inotify fails, the daemon could fall back to invoking stat, meaning
that make would continue working as it does now.

Is there a flaw with this plan?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]