Non-recursive build system

Guillaume Quintard guillaume.quintard at
Fri Jan 10 14:58:03 CET 2014

Good friday all,

I took a few couple hour to toy with Poul-Henning build framework and
see if I could make it non-recursive (yes, I do have strange
obsessions). I attached the result as a git patch in order to get some
feedback and see if it may be an interesting direction.

A non-recursive solution allows for very efficient parallel builds and
clean dependency handling. The first point may not be very important as
varnish is rather small and builds are fast, but the second one is
essential regarding consistency. However, if you want to do it without
generating makefiles (like autools do), while still being able to run
from subdirs, and having readable makefiles, well, it gets a bit

And I'm wondering if the gain is worth the complexity. And since we are
considering a new framework, I think it's the right time to look at this

A few words about the patch attached:
- run "sh config.phk" once first, then "make -f"
- only supports all, clean, varnishd, varnishtest,... for goals (no
check, doc, install yet)
- dependencies are correctly handled (touching a vgz header will rebuild
.o depending on it as well as ar'ing the lib, and varnishd link, for
example), and no need to order the subdirs to compile in the right order.
- only runs from the top directory, but the plan is to be able to run
from subdirectories as well
- for those interested, the main part of the code is in and (GNUMake rookies, beware)
- I had to touch Makefile.phks and config.phk a wee bit, but not that much

As said, feedback is more than welcome.

Guillaume Quintard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-first-commit.patch
Type: text/x-patch
Size: 17503 bytes
Desc: not available
URL: <>

More information about the varnish-dev mailing list