Hi again :)
in a different project, I have a number of files that have the same filename, but live in different directories, for example project/module1/hooks.c project/module1/m1.c project/module2/hooks.c project/module2/m2.c etc. project/Makefile.am I'd really like to avoid using make recursion (and all the reasons are described in the automake info page nicely). The flat Makefile.am I have come up so far is lib_LTLIBRARIES = module1.la module2.la module1_la_SOURCES = module1/hooks.c module1/m1.c module2_la_SOURCES = module2/hooks.c module2/m2.c etc. Unfortunately, it does not seem like the directory is encoded into the object file, hence automake will fail on me since it wants to use hooks.o for both hooks.c files. Is it currently possible to make the directory part of the object name, e.g. module1__hooks.o and module2__hooks.o for example? If not, I'm going to cook up a patch (*), but I'd wanted to go sure such a feature is not already available. I also take suggestions on how to best encode the directory into the filename. Above I used ${D}__${F}.o, but of course other schemes are possible, for example ${D}-${F}.o, like with source files that get compiled with different cflags (see other thread from today ;-) In fact, ${P}-${F}.o for _*FLAGS-style targets is likely to clash with ${D}-${F}.o, so I would avoid it, and instead go for %__%.o for now. thanks, Jan --