This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Computed _SOURCES
- To: John Levon <moz at compsoc dot man dot ac dot uk>
- Subject: Re: Computed _SOURCES
- From: Richard Boulton <richard at tartarus dot org>
- Date: Mon, 20 Aug 2001 13:37:41 +0100
- Cc: automake at gnu dot org
- List-Id: Discussion list for automake <automake.gnu.org>
- References: <20010819011250.A84278@compsoc.man.ac.uk>
On Sun, Aug 19, 2001 at 01:12:50AM +0100, John Levon wrote:
> Is it at all possible to have a libblah_la_SOURCES that is partly
> composed of variables computed ?
It's possible to do simple substitutions, such as $(foo:a=b). These will
work correctly if used in _SOURCES, computing the _OBJECTS appropriately.
Unfortunately, this will only allow you to perform substitutions on the end
of variable values.
It actually wouldn't be that hard to implement $(patsubst...) in automake,
and while doing that make it usable portable too. Do people think this
would be worthwhile: if so, I'll throw together a patch sometime.
> Is this possible or must I repeat myself in the four Makefile.am's that
> could have _SOURCES computed from the canonical list ?
For now, rather than repeating yourself, consider writing the computed
values in a single file, and including it from each of the four
Makefile.am's.
--
Richard