[Top][All Lists]

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

Re: Substitutions in _SOURCES

From: Richard Boulton
Subject: Re: Substitutions in _SOURCES
Date: 12 Apr 2002 20:39:19 +0100

On Fri, 2002-04-12 at 17:47, Philipp Thomas wrote:
> I have a package that does in
>    GNOME_GEN_H_FILES=`cd $srcdir/src ; ls *.gen_h | xargs echo`
> and then a subdir has
>   gnomemmc = $(
>   libgnomemm_la_SOURCES = $(gnomemmc) [.....]
> And automake complains that this isn't allowed. So far it's behaving as
> documented. But if I change the above to
>   gnomemm_gen_files = $(shell cd $(top_srcdir)/src; ls *.gen_h | xargs echo)
>   gnomemmc = $(
> Automake will accept this, allthough it's in the end the same substitution,
> only this time not via configure.
> Question now is, if this is an acceptable workaround or a case that
> automake should detect and also flag as error.

It's not an acceptable workaround: I'll be surprised if the resulting
Makefile works correctly.  It certainly won't if per-target CFLAGS are
used, and I don't think proper dependency tracking will happen either.

Currently, automake doesn't understand the syntax of GNU make functions,
and just passes them through.  This is a problem with variables like
*_SOURCES, which automake needs to know the exact contents of so that
the corresponding *_OBJECTS can be calculated.

No workaround is going to work here: with current automake, you'll have
to write a script to generate the to get wildcards to work.


reply via email to

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