[Top][All Lists]

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

[bug #51338] Support for construction patterns by make functions

From: Paul D. Smith
Subject: [bug #51338] Support for construction patterns by make functions
Date: Sun, 2 Jul 2017 13:49:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51338 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                 


Follow-up Comment #3:

Secondary expansion is a shorthand that allows you to use some automatic
variables in the prerequisites list (most commonly $@) so that you can modify
the prerequisites based on the target name.  It is a simplified method to
generate make rules in a limited way, without resorting to full-fledged eval
which provides a superset of secondary expansion's capabilities.  You might
consider reading (starting from the oldest and going to the newest) the set of
blog posts here: http://make.mad-scientist.net/category/metaprogramming/ which
describe ways to define make rules that have some amount of variability.

You don't need to use secondary expansion inside the recipe, because you
already have access to the automatic variables like $@ there.

In your situation you are creating entire rules using a defined template with
eval, so you have no need of secondary expansion there either: you can access
any value that was used in the target list directly (this is what Martin is
telling you).

I don't understand what you mean by "such approaches would be directly
distributed with the make software", but I don't want to use the bug tracker
to design a new feature from scratch.  If you have a specific design in mind
please post it here with explicit examples and discussion of exactly how it
would work and I'll reopen this enhancement request.  If you're asking for
someone else to design a new feature based on an abstract description of your
needs please use the mailing lists to discuss it.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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