[Top][All Lists]

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

Re: Portable $addprefix

From: Mathieu Lirzin
Subject: Re: Portable $addprefix
Date: Sun, 27 Aug 2017 19:44:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)


Kip Warner <address@hidden> writes:

> Hey list,
> I'd like to transform the following variable in my from...
>     files_only = ...
> Into...
>     files_with_path = dir/ dir/ dir/ dir/ ...
> I'm aware of GNU Make's $addprefix magic. I'm also aware it's naughty
> to use where portability is a concern and a different implementation of
> make may be used behind Automake. I was wondering if anyone has come up
> with a recipe for scenarios like this?

Would something like this work for you?

  files_with_path = `for f in $(files_only); do echo "dir/$$f"; done`

Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

reply via email to

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