[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Metaprogramming Make (was: Static pattern rules with more than one '%')
From: |
Alejandro Colomar |
Subject: |
Metaprogramming Make (was: Static pattern rules with more than one '%') |
Date: |
Thu, 31 Aug 2023 12:36:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 |
Hi Paul,
On 2023-08-31 02:42, Paul Smith wrote:
> On Thu, 2023-08-31 at 00:08 +0200, Alejandro Colomar wrote:
>> I ended up using $(foreach ... $(eval ...)). I didn't know about
>> $(eval) before reading Paul's troubleshooting guide, and it was mind
>> opening. It solves a limitation I thought GNU Make had but really
>> hadn't. :)
>
> You might want to read this set of blog posts; start with the bottom
> one as it was posted first.
>
> https://make.mad-scientist.net/category/metaprogramming/
Sure :)
I found a bug there. In chapter V, there's this code:
ifeq (,$(filter clean clean-%,$(MAKECMDGOALS)))
-include rules.mk
endif
I believe you meant to use $(filter-out ...).
BTW, I found Paul's First Rule (which I had been trying to quote a few times
but didn't find where I had read that in the past) thanks to this. :-)
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature