Re: Side-effects during variable assignments?

Paul Smith <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Organization GNU's Not UNIX!
Message-ID <[email protected]>
On Thu, 2023-06-08 at 14:42 +0200, Sébastien Hinderer wrote:
> Is there a way to achieve this by somehow extending the macros so
> that they modifiy the LEXERS & co varialbes each time they are called
> before returning the string they currently return?

Sure.  Just use an $(eval ...) inside your variable assignment.  The
eval function expands to the empty string after parsing its arguments
as makefile code, and so it can be put pretty much anywhere.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.