Hi Philip & David,

On 6/14/21 5:42 AM, Philip Guenther wrote:
On Sun, Jun 13, 2021 at 6:29 PM David A. Wheeler <dwhee...@dwheeler.com <mailto:dwhee...@dwheeler.com>> wrote:

     > On Jun 13, 2021, at 5:44 PM, Alejandro Colomar (man-pages)
    <alx.manpa...@gmail.com <mailto:alx.manpa...@gmail.com>> wrote:
     > Let's say there's a project with a submake for each module.

    It’s counter-intuitive, but it is usually *MUCH* faster & more
    accurate to have a single make process
    figure things out in most cases than to use recursive makes.

    For more info, see “Recursive make considered harmful” by Peter Miller:

Thanks for pointing to that article. I had seen it without actually reading it, and this made me read it completely. It's very interesting in some points, but I think it overstates the downsides of recursive make. Or maybe it's my Makefile structure that is not so bad for a recursive make. I don't build anything more than once, don't need to clean to build, nor any other problems. My only "problem" is having to declare some dependencies twice (those vertices that cross the boundaries, from that paper), but it takes only 5 lines or so in the main Makefile. The rest is quite DRY.

But I think I can't make it in a single make session without having to repeat most of the information, or apply very complex filters in the recipes.

I'll keep trying from time to time, if I come up with some better ideas, but I don't think I'll be able to move to a single Makefile (+ includes, of course).

About my original bug report, do you think that is something that could be patched in make? Or would it cause performance loss or a lot of extra complexity?




In October 2001 I applied the logic of that paper to a 1/2 million line work project to cut its build time by a factor of 20 and make it reliably build the Right Stuff.  Took less than a month to win back the entire time I had spent reading the paper and working out the details of the new Makefile setup.

Philip Guenther

Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
Senior SW Engineer; http://www.alejandro-colomar.es/

Reply via email to