On Fri, 2017-08-25 at 11:33 -0400, Nick Bowler wrote:
> I'm not aware of any truly portable way to do this directly in make.

Hey Nick. Thanks for getting back to me. 

Something that I guess I'm still confused about is why after more than
a decade does Automake not have a portable way to do these kinds of
routine things?

I realize that GNU Make's extensions aren't found in all (or even most)
implementations of make(1), but you'd think the most common extensions
in it would have some way for Automake to detect where they are
available in the underlying implementation, and if not GNU Make or
another supported implementation, to emit kind of Perl logic / shell
magic as you suggest below.

> 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
> Makefile.in).

Agreed. The list is definitely static. Do you have a perl recipe? I'm
not really familiar with the language or how to integrate it with
Automake.

> Finally, while not portable to all make implementations, expansions
> like this:
> 
>   $(files_only:%:dir/%)
> 
> do work in multiple implementations other than GNU make.

I like this, but unfortunately I need to target for portability.

-- 
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
http://www.thevertigo.com

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to