Reputation: 6385
As every child in kindergarten knows, recursive make is a very bad thing.
I know very well how to properly handle large non-recursive but nicely distributed GNU Make projects through the use of include statements and directory stacks.
I am new to autotools and now I am trying to use the above knowledge, to do the same thing with autotools and Linux packages.
Automake manual says
"Automake provides sufficient cross-directory support 2 to enable you to write a single Makefile.am for a complex multi-directory package"
Great... but that is pointless isn't it??
I have of course multiple packages, and the very point of doing non-recursive automake setup, would be, to not recurse over those packages. So, like in the case of GNU Make, have one top-level Makefile.am that includes fragments specific to individual packages.
But of course, I still want multiple packages, just like I normally would with a (bad) recursive setup.
Replacing bad recursive setup with a good non-recursive setup, should mean, leave everything else as is, not "replace all packages with one big package".
Is it possible to have non-recursive automake setup, without destroying the previous goals and targets that were found in the previous recursive setup?
Upvotes: 2
Views: 73
Reputation: 3240
I guess you would prefer Karel's approach to non-recursive automake
rather than mine.
In general, to answer your question is to figure out what you mean with the word "package", because make
has no such concept. If you mean what is often also called "module", i.e. a subdirectory in which source code and build files both reside, yeah it's definitely possible to do so with non-recursive automake
done Karel's way.
If you're referring to something that can be redistributed separately and then combined together to build, then the answer is no, there is no such way to do so in automake
, because the whole point of having a single build tree is that you have a single distributed package, to the point that make dist
will create the compressed tarball for you.
Upvotes: 1