So I decided to ask (specially because, in the GNU guidelines for Summer of
Code projects[3], they say that that list of ideas is not the only one):
isn't there anything that you think I could do to improve Make?
Yes!
A patch was proposed to GNU Make a while ago for GNU Make to immediately
stop and abort after N failures:
http://lists.gnu.org/archive/html/bug-make/2009-01/msg00035.html
If you read that message in the archives, you will see that it also
mentions one outstanding problem, but Paul D. Smith explained the
problem and I was able to solve it using a different approach (see
below). However what is still not solved to me is the inclusion of that
patch in GNU Make.
So this patch has not made it into GNU Make as far as I know, and I
would be really useful to me if it did. I will attempt to explain why.
The way GNU Make works is that it attempts to build as much of the
desired targets as possible. When using parallel make (-j N) and when
GNU Make encounters a prerequisite that fails to build (e.g. due to a
syntax error), it cancels that part of the build, but instead of killing
the other parallel jobs, it lets them come to their own completion. This
could take hours in a large build. So you see the problem: one part of
the build could fail after 2 minutes but you may not notice for hours!
And I am not sitting at my terminal all the time to watch over builds: I
use a continuous integration server. So everything must be automated.
I debated whether the CI server (jenkins) should jump in and kill the
build, but this is not really how it works: the CI server relies on the
exit status of the programs it runs to abort the build process: so GNU
Make has to abort, and it has to abort after the first error. In the
context of the CI server, incrementally building on a previously failed
build is a no-go: it could compromise subsequent builds. So there is no
point it letting GNU Make "build as much as it can".
I wrote up a demonstration of a simplified version of this patch,
including the solution to the aforementioned outstanding problem. You
can see it here:
http://ninjaverification.wordpress.com/2009/02/03/continous-integration-system-using-parallel-make/
So here is the idea: get that patch integrated with GNU Make, with all
the quality that GNU Make developers are to expect, so it becomes part
of the official GNU Make releases forever.
I am not a GNU Make developer, I am simply a mostly happy user which
could be made even happier!
Thanks,
Martin d'Anjou
_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make