[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: private with target-specific variables
From: |
Paul Smith |
Subject: |
Re: private with target-specific variables |
Date: |
Thu, 19 May 2011 08:17:44 -0400 |
On Wed, 2011-05-18 at 15:02 +0200, Mario Schwalbe wrote:
> $ LC_ALL=C make -f Makefile.private-bug
> prereq:
> make: *** No rule to make target `private', needed by `target'. Stop.
>
> $ LC_ALL=C make -v
> GNU Make 3.81
The "private" feature was added in GNU make 3.82. It's not available in
GNU make 3.81.
If you use "make -p" you'll see that your makefile is not being
interpreted at all as you expect.
This line:
> private GLOBAL = global
is creating a variable named "private GLOBAL", which is why your echo of
$(GLOBAL) shows nothing; you never set the variable $(GLOBAL).
Similarly, this line:
> target: private LOCAL = local
is not declaring a target-specific variable at all: it declares a target
"target" with four prerequisites: "private", "LOCAL", "=", and "local".
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist