[Top][All Lists]

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

RE: makefile:71: *** Recursive variable `LIBS' references itself (eventu

From: Dominique DEUFF
Subject: RE: makefile:71: *** Recursive variable `LIBS' references itself (eventually). Stop
Date: Wed, 29 Oct 2003 09:12:37 +0900

There are two types of assignments.

LIBS    = file.a

Result in late evaluation. What is to the right of '=' is evaluated only
when LIBS is referenced. With late evaluation a variable cannot
reference itself - that the problem you see.
Late evaluation is required when for example using the following:
VAR     = $@
What to realise is that the value of $@ differ with the context where the
variable is used - therefore late evaluation is required.
But most often this is not the case, so I generally prefer the second type
of assignment in my makefiles.

LIBS    := file.a

Result in early evaluation. Here LIBS is immediately assigned the value of
file.a. Use this type of assignment and your problem is solved.

        OK, thank you.
        I will try it !


reply via email to

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