[Top][All Lists]

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

Re: Portable $addprefix

From: Nick Bowler
Subject: Re: Portable $addprefix
Date: Fri, 25 Aug 2017 11:33:19 -0400


On 8/24/17, Kip Warner <address@hidden> wrote:
> I'd like to transform the following variable in my from...
>     files_only = ...
> Into...
>     files_with_path = dir/ dir/ dir/ dir/ ...

I'm not aware of any truly portable way to do this directly in make.

But your example looks like a pretty static list (i.e., this list won't
be changed by the user after the package is generated), so the portable
way is to just generate both lists in advance, at the same time you run
automake (perhaps with a perl script that postprocesses

If the list depends on configure results then another possibility is
to have configure generate both lists.

Finally, while not portable to all make implementations, expansions
like this:


do work in multiple implementations other than GNU make.


reply via email to

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