[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Surprising pattern matching and .EXTRA_PREREQS behaviours
From: |
Dmitry Goncharov |
Subject: |
Re: Surprising pattern matching and .EXTRA_PREREQS behaviours |
Date: |
Sat, 9 Dec 2023 19:53:43 -0500 |
On Mon, Nov 20, 2023 at 8:37 AM Daniel Gerber <dg@atufi.org> wrote:
> 1. Second expansion is not applied to .EXTRA_PREREQS
Thanks for your report. You can find a patch here
https://savannah.gnu.org/bugs/index.php?65006.
> 2. Setting .EXTRA_PREREQS as pattern-specific variable is not supported
A couple of years ago i implemented pattern-specific .EXTRA_PREREQS.
The impl is here
https://github.com/dgoncharov/make/tree/pattern_specific_extra_prereqs.
i wanted a more efficient impl and this impl is still not merged.
> 1. How to add a prerequisite to all targets matching some pattern - in
particular, their parent directory?
.SECONDEXPANSION:
%.ext:| $$(@D)/;
%/:; mkdir -p $@
Another option
obj/%.ext:| obj;
obj/:; mkdir -p obj
> 2. How to set a variable for all targets matching <dirs>/prefix_<stem>?
dirs/prefix_%: hello=world
regards, Dmitry
- Re: Surprising pattern matching and .EXTRA_PREREQS behaviours,
Dmitry Goncharov <=