bug-make
[Top][All Lists]
Advanced

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

[bug #60165] Multiple pattern rules with single rule


From: Paul D. Smith
Subject: [bug #60165] Multiple pattern rules with single rule
Date: Tue, 19 Jul 2022 14:00:59 -0400 (EDT)

Follow-up Comment #1, bug #60165 (project make):

The attached patch (if I understand it correctly) will break the large
majority of makefiles that use pattern rules today, including even some
built-in rules in GNU make.  It's clearly a non-starter from a
backward-compatibility standpoint.

We implemented "&:" for explicit rules, to allow them to declare grouped
targets: multiple targets generated by a single invocation of the recipe (this
is how pattern rules ":") work.

We need to finish this by allowing a single definition of a pattern rule to
create "exploded" rules: multiple pattern rules (the way explicit rules with
":" work).  But as above, we definitely can't do that by just changing the way
pattern rules with ":" work.

Back when "&:" was suggested I had proposed using "|:" as a separator that
means that one rule is created for each target.  That is, if you use "&:"
(with any type of rule) you get grouped behavior.  If you use "|:" (with any
type of rule) you get exploded behavior.  And if you use ":" without a
specifier you get the "historical" behavior (exploded with explicit rules and
grouped with pattern rules).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60165>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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