This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
RE: make 3.79: core dump expanding target specific variables
- To: Scott Carter <scarter at emware dot com>
- Subject: RE: make 3.79: core dump expanding target specific variables
- From: Robert Bogomip <bob dot bogo at milohedge dot com>
- Date: Wed, 7 Feb 2001 13:24:08 +0000 (GMT Standard Time)
- cc: <cygwin at cygwin dot com>
On Tue, 6 Feb 2001, Scott Carter wrote:
>
> I don't have a explanation/solution for the core dump, but here's a
> explanation of why you get [ 2] rather than [2]
>
> http://sources.redhat.com/ml/cygwin/2000-07/msg00816.html
> (summary: += inserts a space.)
>
No, I don't think so when this is the first time the variable is defined.
If we use the original Makefile without the target specific variables we
have:
t+=2
t:
@echo "[${t}]"
giving:
$ make all
[2]
$
on all versions of make I have (3.77, 3.78, 3.79 on Linux & cygwin). The
docs say
"objects += another.o
This takes the value of the variable objects, and adds the text
`another.o' to it (preceded by a single space)."
and a little further down,
"When the variable in question has not been defined before, `+=' acts
just like normal `=': it defines a recursively-expanded variable."
A little ambiguous, but the tests above confirm that a space is only
inserted if ${t} already exists (even if it is empty).
BTW, the original core dump occurs on Linux make 3.79 too, so I suppose
it's a real make bug.
--
Robert Bogomip /// mailto:bob.bogo@milohedge.com
Milo Hedge Ltd, OCFI, Mill Street, Oxford, OX2 0JX /// tel:+44 1865 799400
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple