Hello, some time ago I asked a question on how to specify directory dependencies. At that time I solved the problem by leaving just the top-level Makefile.am and building all targets (binaries, libraries, test programs) from it. In this way, I could specify explicit dependencies between the binaries and libraries, no matter in which directory they were located.
Now I want to integrate several project into the build system. The directory hierarchy looks like this: doc drv drv/d1 drv/d2 lib lib/l1 lib/l2 src1 src2 d1, d2, l1, l2, src1, src2 are existing projects with Makefile or configure.ac / Makefile.am. I want to leave them as they are and write a Makefile that would build them in the necessary order according to the dependencies. So, how can I specify the build dependencies? I could do something like that with a Makefile: src1: l1 mkdir -p src1; \ cd src1; \ $(SRC)/configure; \ make; \ cd .. l1: mkdir -p lib/l1; \ cd lib/l1; \ $(SRC)/configure; \ make; \ cd ../.. But I want to use the advantages of autotools, like not having to specify SRC on the command line, not having to create the directories in the builddir, passing configure arguments to downstream configure scripts (I need, e.g., CFLAGS and --host). I would appreciate any advice! Thanks in advance, Baurzhan.