* Ralf Wildenhues wrote on Wed, Nov 10, 2004 at 10:09:08AM CET: > * Alexandre Duret-Lutz wrote on Wed, Nov 10, 2004 at 09:53:37AM CET: > [ library dependencies and `make install' ] > > > > Not only that, but also supporting a arbitrary installation > > order of libraries in multi-Makefile projects. > > Just to throw in random ideas: > Let libtool output Makefile snippets in .libs/Makefile.libdep at link > time, providing dependency information based on what it knows then. > `make' is the canonical program to deal with topological sorting. > > Let make use these at install time, maybe through a generated script or > some other mechanism (so that the Automake-generated Makefiles do not > have to depend on .libs/Makefile.libdep to exist).
More specific: Let config.status create Makefile snippets .deps/lib.Po (take another name that does not conflict; I'm not sure about .deps or .libs yet) per LTLIBRARY, just as it does for compile dependency generation. Each `libtool --mode=link' fills in the dependencies as a side-effect, just like depcomp does. All paths in there are relative to $top_builddir. We could add an option `-MT .deps/lib.Po -MD -MP -MF' to libtool for outputting this information. :-) Now two (at least) options for Automake: - Put all actual installation rules (one per LTLIBRARY, maybe this can be improved) in $top_builddir/Makefile.in, include all snippets from there. This unfortunately breaks executing `make install' in a subdir (because the rules are only in the top_builddir (but `make install' from a subdir was most likely broken in this package anyway because of the ltlibrary dependencies). For non-recursive Makefiles this is the right way. I think this can be made almost as fast as the current process (without dependency information). - Put each rule in its dir's Makefile.in, let libtool add rules like cd $builddir && $(MAKE) inst-ltlibLIBNAME to the snippet in .deps. This will be *slow*. What's the expected number of libraries per package? About programs: You just install them all after installing all the libraries. Can we expect users of the Automake subpackage feature to separate their library dependencies by hand? As in: subpkg1 needs to be installed before subpkg2, both before main? Seems reasonable to me. I have more time next week, maybe I can put something together then. Ralf _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/libtool