automake
[Top][All Lists]
Advanced

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

Re: converting to subdir-objects


From: Bob Friesenhahn
Subject: Re: converting to subdir-objects
Date: Sun, 8 Mar 2015 16:53:41 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Sun, 8 Mar 2015, Harlan Stenn wrote:

I'm happy to look at that, and each of these Makefiles will need to be
generated by configure (config.status) because they need to be in the
build tree.  I figure that's a project to look at once I get
subdir-objects going.

Turn convenience libraries into Makefile variables since Makefile
variables are vastly more efficient than clunky convenience libraries.

I'm happy to look at that, and it means I'd want a single place to
define these Makefile variables and then I'd have to update all the
places they're used.

Put them in an include file where the definitions should logically emanate from so they can easily be found. The Makefile variable is just a named list of source files that can be linked in place of the similar convenience library.

If with subdir objects this means a single copy of these files will be
built and shared that seems great.

Yes. There would be a single copy of the objects and they would be directly applied when the dependent library/application is linked. The convenience library requires using 'ar' to store all of the objects, and then extracting them later using 'ar' at each point of use.

And there is the benefit that almost everything (except for linking)
can be built simultaneously, using all available CPU cores.

That is great, especially if this approach is no slower for builds folks
have to do on single-core slow boxes, too.

It would be wrong to claim that non-recursive builds are necessarily faster. They are faster if any library code which was formerly in a recursed 'subdir' needs to be rebuilt due to being edited, and faster in that a child make did not need to run to decide there is nothing to do. There is no unnecessary work which gets done. However, the make program does take longer to start since it has more to consider at once, the dependencies are fully known, and the Makefile file is larger.

Builds are no slower for the usual case.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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