If you're sticking with a recursive directory structure, you can control the order of descent with the SUBDIRS
variable. This is fine for things like separate library and test directories; the "Recursive Make Considered Harmful" catch-all overstates the case. In this case, though, it's sound advice. You obviously realise this - so can it be done?
Top level Makefile.am
use:
SUBDIRS = libs/lib2 lib3 libs/lib1
This 'works' - but it means no libs/Makefile.am
. So if you were linking them all together as a convenience (noinst_LTLIBRARIES
) library or installed library, you would need to handle this at the top level.
In theory, I suppose you could add libs
as the last directory. But I have my doubts that this would work, e.g., make dist
- and it would be madness anyway. It's best just to pretend this paragraph was never written.