[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unexpected failure in tricky use of eval
From: |
Stefano Lattarini |
Subject: |
Unexpected failure in tricky use of eval |
Date: |
Sat, 12 May 2012 16:34:50 +0200 |
Hello.
While trying to implement a kind of memoization of lazy macros in GNU make
(needed for my work on Automake-NG), I've been encountering some strange
failure in GNU make (present in all of 3.80, 3.81, 3.82). Here is the
minimal reproducer I've been able to find:
mufoofoo = \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
xxxxxxxxxxxx
var = $(eval var := $$(mufoofoo))$(var)
dummy:
: $(firstword $(var))
Running the above, make dies with the following message:
Makefile:13: *** unterminated variable reference. Stop.
And any of the following minimal and *apparently irrelevant* changes to the
Makefile above that cause the error to disappear:
- changing 'var' with 'va' everywhere
- changing 'mufoofoo' with 'mfoofoo'
- removing *just one 'x'* from the value of mufoofoo
Any idea of what's going on here?
Regards,
Stefano
- Unexpected failure in tricky use of eval,
Stefano Lattarini <=
- Re: Unexpected failure in tricky use of eval, Eldar Abusalimov, 2012/05/12
- Re: Unexpected failure in tricky use of eval, Stefano Lattarini, 2012/05/12
- Re: Unexpected failure in tricky use of eval, Stefano Lattarini, 2012/05/12
- "Lazy" variables in GNU make (was: Re: Unexpected failure in tricky use of eval), Stefano Lattarini, 2012/05/13
- Re: Unexpected failure in tricky use of eval, Paul Smith, 2012/05/13
- Re: Unexpected failure in tricky use of eval, Stefano Lattarini, 2012/05/13
- Re: Unexpected failure in tricky use of eval, Paul Smith, 2012/05/14
- Re: Unexpected failure in tricky use of eval, Stefano Lattarini, 2012/05/14