Follow-up Comment #2, bug #43757 (project make):

I must say I cannot agree with the analysis of the previous comment.

A target listed in a target-specific variable assignment is, at best,
*syntactically* a target, not semantically.  Obviously, it cannot be
semantically because the variable assignment isn't a prerequisite, and doesn't
declare a rule. "Target" is the name for a semantic role of an object with
respect to an update rule, and possibly some prerequisites.

A target-specific variable assignment only scopes some variables around a
target, if that target happens to be updated.

It is buggy behavior to have some targets be considered permanent, just
because I want to customize their update recipe with some target-specific
variables.

The "mention" concept should depend on semantics, not syntax.

Of course, I read that line in the manual, but I wouldn't guess that an
assignment means "mentioned as a target".

Lastly, here is something else. Suppose I take a Makefile whose default target
is "all", and add this line at the very top:

   foo: BAR := xyzzy

If I run "make" now with no arguments, it still says "nothing to be done for
`all'".

Clearly, Make is not considering foo to be "mentioned as a target", otherwise
it would have to consider foo to be the first target in the Makefile, and
hence the default target.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43757>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to