[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

directory prefix on .o

From: Jan Engelhardt
Subject: directory prefix on .o
Date: Fri, 10 Aug 2007 01:00:46 +0200 (CEST)

Hi again :)

in a different project, I have a number of files that have the same 
filename, but live in different directories, for example


I'd really like to avoid using make recursion (and all the reasons are 
described in the automake info page nicely). The flat I have 
come up so far is

        lib_LTLIBRARIES =
        module1_la_SOURCES = module1/hooks.c module1/m1.c
        module2_la_SOURCES = module2/hooks.c module2/m2.c

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]