[Top][All Lists]

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

Re: non-recursive automake

From: Richard Boulton
Subject: Re: non-recursive automake
Date: Wed, 15 Aug 2001 12:06:37 +0100
User-agent: Mutt/1.2.5i

On Wed, Aug 15, 2001 at 07:59:47AM +1000, Robert Collins wrote:
> Is there any general consensus on nromalisation of the targets for the
> subdirectories?
> ie if directory foo has 
> bin_PROGRAMS = foo
> and directory bar has
> bin_PROGRAMS = foo
> so we end up with two SOURCES target macros:foo_SOURCES and foo_SOURCES
> ?
> do we 
> a) let the user shoot themselves in the foot (as this wouldn't install
> cleanly anyway)
> b) normalise to 
> bin_PROGRAMS = foo/foo bar/foo
> foo_foo_SOURCES = foo/foo.c
> bar_foo_SOURCES = bar/foo.c

I say the latter: the rules given in a subdirectory should only be for
creating targets and objects in that subdirectory (or possibly ones below
Any targets which should be built in the top level directory should be
specified in the top level

> > I'm now off to see if I can hack up an automake option to address #2
> > (add the directory a include file was grabbed from to every path found
> > within it.) I'm thinking something like
> > include-translate $(srcdir)/foo/Automake.rules
> > as the user syntax, and that should see that it's needs to add /foo to
> > $(srcdir) for every target/object encountered within that fragment.
> > If anyone has comments about this approach, please shout up before I
> > waste too much time on it :].

It seems good as an interim step.  Eventually, I would like to be able to
do something like the following, and I'm not sure that the work your
suggestion will help to acheive this.
AUTOMAKE_OPTIONS = non-recursive
SUBDIRS = foo bar

bin_PROGRAMS = foo1 foo2

bin_PROGRAMS = bar1 bar2

which would produce the same targets as without the non-recursive option,
but generate a single at the top level to do so (and stubs in
the subdir as you specified).

Ideally, this would also translate user defined rules in the sub
Makefile.ams so that they work from the top level (ie, run from
the top level directory).


reply via email to

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