[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug] Sibling submakes: wait for other submakes before failing
From: |
Alejandro Colomar (man-pages) |
Subject: |
Re: [bug] Sibling submakes: wait for other submakes before failing |
Date: |
Wed, 16 Jun 2021 17:10:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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 <dwheeler@dwheeler.com
<mailto:dwheeler@dwheeler.com>> wrote:
> On Jun 13, 2021, at 5:44 PM, Alejandro Colomar (man-pages)
<alx.manpages@gmail.com <mailto:alx.manpages@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:
https://web.archive.org/web/20200209034547/http://aegis.sourceforge.net/auug97.pdf
<https://web.archive.org/web/20200209034547/http://aegis.sourceforge.net/auug97.pdf>
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?
Thanks,
Alex
+1000
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/