[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: foreach with error in loop continues
From: |
Emmanuel Mayssat |
Subject: |
Re: foreach with error in loop continues |
Date: |
Mon, 10 Oct 2016 20:45:03 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 22:19 Mon 10 Oct , Paul Smith wrote:
> Also, I don't know why you're passing the "-e" flag multiple times. �It
> seems like you are under the impression you need to use it before every
> variable assignment on the command line but that's not what -e means.
I read the man page and indeed this is not what -e means!
> Also you don't escape dollar signs with backslashes inside make, you
> escape them by writing two dollar signs "$$".
It turns out I was trying to escape the $(P) and $$(P) did not expend to
anything (but \$(P) did!). After a few attempt, it turns out that the
foreach is executed before the call to eval and therefore $(P) doesn't need
to be escaped!
> � target:
> � � � � � $(foreach P, $(POL), $(MAKE) X=y P=$(P) biz && ) true
>
Neat trick! I was using ';' as a separator and that lead to symptoms I
described. Now it works as expected!
--
Emmanuel
Menlo Security, Inc.
Menlo Park, CA