automake
[Top][All Lists]
Advanced

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

Re: nested includes


From: Ralf Wildenhues
Subject: Re: nested includes
Date: Sun, 26 Sep 2010 06:48:16 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello David,

* David Byron wrote on Sat, Sep 25, 2010 at 10:59:56PM CEST:
> I'm looking for a structure like this to work:
> 
> src/Makefile.am
> ---------------
> include foo/frag1.mk
> 
> src/foo/frag1.mk
> ----------------
> include frag2.mk
> 
> src/foo/frag2.mk
> ----------------
> some stuff
> 
> But at the moment (automake 1.11.1) the notion of current directory when
> processing foo/frag2.mk isn't foo.  I believe it's src.

Right.  If you look closely, the current manual (info Automake Include)
only documents the forms

`include $(srcdir)/file'
`include $(top_srcdir)/file'

which are tied to the directory of the outermost including Makefile.am,
or the toplevel package Makefile.am, respectively.

So for now, you need to use 'include $(srcdir)/foo/frag2.mk' in
frag1.mk.

>  I came across this:
> 
> http://thread.gmane.org/gmane.comp.sysutils.automake.patches/3230
> 
> Was anything like this ever committed?

Not yet, no.  It sure would be good to have something like it.

> Can I help if not?

That patch you refer to wasn't working correctly, but also, the approach
wasn't very nice, because it still led to quite ugly things you needed
to write into your fragment files.

There have been some more discussions on the lists since, with alternate
ideas or approaches, for example
<http://thread.gmane.org/gmane.comp.sysutils.automake.general/11894>,
but as of now, nothing has been finalized yet.

I'd like an approach that doesn't turn the resulting Makefile.am
unreadable, is intuitive as much as possible, but also is clear in the
semantics as to which file names are converted.

Cheers,
Ralf



reply via email to

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