automake
[Top][All Lists]
Advanced

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

Re: specifying target directories in non-recursive automake


From: Gary V. Vaughan
Subject: Re: specifying target directories in non-recursive automake
Date: Thu, 23 Feb 2006 10:16:14 +0000
User-agent: Thunderbird 1.5 (X11/20051201)

John Darrington wrote:
> I've been trying to convert a rather largish automake controlled
> project from a recursive style build system, to a non-recursive one.
> I was rather suprised to see that automake decides to put all the
> object files in the root directory; not only ugly, but destroys the
> namespaces afforded by each directory.
> 
> Consequently, things are falling down when in the cases where there
> are identically names source files in different directories. For
> example, this simple Makefile.am complains about main.o being created
> twice, when the two main.c files are clearly separate.
> 
> bin_PROGRAMS = prog1/foo prog2/bar
> 
> prog1_foo_SOURCES = prog1/main.c
> 
> prog2_bar_SOURCES = prog2/main.c
> 
> 
> Reading the manual suggests that I should be able to prefix the
> SOURCES variables with nobase_ but it doesn't seem to work.
> 
> Can anyone tell me the correct way to create a non-recursive automake
> system, which might have identically named source files?

In your configure.ac, make sure AM_INIT_AUTOMAKE is given the
subdir-objects option (you'll also need a recent automake):

  AM_INIT_AUTOMAKE([1.9 subdir-objects])

HTH,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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