[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to define a variable with {} expansion
From: |
Paul Smith |
Subject: |
Re: How to define a variable with {} expansion |
Date: |
Wed, 27 Jan 2021 14:16:42 -0500 |
User-agent: |
Evolution 3.36.4-0ubuntu1 |
On Wed, 2021-01-27 at 12:10 -0600, Blake McBride wrote:
> If I want a variable set to: abc/def/ghi.a abc/def/klm.a
> abc/def/opq.a
>
> On other make systems, I would do: abc/def/{ghi kln opq}.a
I don't know of any make systems that support that syntax; definitely
it's not anything defined in the POSIX standard for make.
In GNU make you can do something like:
ROOTS = jhi klm opq
OUT = $(patsubst %,abc/def/%.a,$(ROOTS))
See https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
for some other possibilities.