On 11/4/07, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > > > On Nov 4, 2007, at 7:47 PM, NightStrike wrote: > > > > AM_CONDITIONAL(WITH32, test x$WITH_32 != x) > > > > > > > > And I put this in Makefile.am: > > > > > > > > if WITH32 > > > > crtdir=$(prefix)/lib32 > > > > uuidsrc = lib32/uuid.c > > > > else > > > > crtdir=$(prefix)/$(target)/lib > > > > uuidsrc = lib/uuid.c > > > > endif > > > > > > > > crtlibs_LIBRARIES += libuuid.a > > > > libuuid_a_SOURCES = $(uuidsrc) > > > > > > > > > > > > When I run autoreconf, I get this: > > > > > > > > Makefile.am: object `uuid.$(OBJEXT)' created by `lib32/uuid.c' and > > > > `lib/uuid.c' > [...] > > You can adapt the hint from > info Automake 'Libtool Issues' > > to your example. You'll have to live with a rewritten object file name > in that case though. > > info Automake 'Conditional Sources' > > has more useful information.
I was following those sections almost. I missed that part about having to add in a bogus _CFLAGS variable. That seems somewhat kludgey, doesn't it? Automake should be able to detect the name collisions in the conditional and rename the object files accordingly. Either that, or can't automake just put the object files in separate directories, given my setup? What I mean is, I have lib/uuid.c and lib32/uuid.c. If the object files were placed in the respective directories, lib/uuid.o and lib32/uuid.o, then there would be no collision and no need for a bogus _CFLAGS variable, yes?