help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to define a variable with {} expansion


From: Blake McBride
Subject: Re: How to define a variable with {} expansion
Date: Wed, 27 Jan 2021 13:29:50 -0600

Thanks!  (It's in DMAKE)

On Wed, Jan 27, 2021 at 1:16 PM Paul Smith <psmith@gnu.org> wrote:

> 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.
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]