[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evaluation of variables inside make rules' dependencies
From: |
Philip Guenther |
Subject: |
Re: Evaluation of variables inside make rules' dependencies |
Date: |
Wed, 9 Mar 2011 17:59:48 -0800 |
On 3/9/11, Dmitry N. Mikushin <address@hidden> wrote:
...
> %.a: INCLUDES += $($(LIBNAME)_INCLUDES) <--- (1)
> %.a: dirs $$(OBJECTS)
> @echo Packing static library $@ ... $(INCLUDES) <---(2)
> @$(AR) $(ARPARAMS) $@ $(OBJECTS)
>
> $(STORE)/%.c.o: %.c
> @echo Creating object file for $< ...
> $(CCOMP) $(CPARAMS) $(DEFINES) $(INCLUDES) -c $< -o $@ <---
> (3)
>
> Here at (1) INCLUDES is expanded with library-specific values, and
> changes are visible at (2), but not applied at (3). It turns all
> variables defined in %.a are recomputed in %.c.o with respect to new
> $@, and all information I need to pass from %.a to %.c.o via variables
> is lost. Is there a workaround to deliver %.a's values to %.c.o?
Sorry, I personally dislike and do not use variable inheritance, so I
don't have any good ideas on how to force it to continue to take
effect here.
Philip Guenther