[Top][All Lists]

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

Re: Handling of Makefile variables

From: LCID Fire
Subject: Re: Handling of Makefile variables
Date: Wed, 05 Nov 2008 10:36:30 +0100
User-agent: Thunderbird (X11/20080925)

Ralf Wildenhues wrote:
> * Bob Friesenhahn wrote on Wed, Nov 05, 2008 at 01:13:05AM CET:
>> On Tue, 4 Nov 2008, LCID Fire wrote:
>>>> Correct.  To set variables globally, AC_SUBST them from
>>> The thing I tried to achieve is to collect all the sourcefiles through
>>> the SUBDIRS structure downwards and then in some subdirectory build the
>>> SOURCES variable - and using AC_SUBST it complains that subst is not
>>> allowed to be used in SOURCES. What's the "correct" way to do this?
> Put
>   AC_SUBST([variable], [value])
> or
>   variable=value
>   AC_SUBST([variable])
> in  Enjoy using $(variable) in all files.
To be more clear:

I have a root directory with a recursing by:
SUBDIRS = . ui

The corresponding contains:
AC_SUBST(CORE_SRC, test_call.c test4u.c blubz.c)


In the "ui" directory there is also a containing solely:
CORE_SRC += ui.c uie.c
SUBDIRS = sdl gtk


And finally in the "gtk" subdirectory there again is a
bin_PROGRAMS = gtkapp
gtkapp_SOURCES = gtk_app.c gtk_interface.c $(CORE_SRC)


Having it this way it complains: `CORE_SRC' includes configure substitution address@hidden@' and is referred to from `gtkapp_SOURCES'; configure substitutions are not allowed in _SOURCES

Before someone asks why I'm not doing this "pragmatically" (AKA ugly) -
using the CORE_SRC variable this way would be the most elegant solution
because every layer just has to handle it's own mess.
But it seems like for some arbitrary reason autotools does not support
this, does it!?

reply via email to

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