NetBSD-Bugs archive

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

Re: bin/43534: make does not set $* for PHONY targets

The following reply was made to PR bin/43534; it has been noted by GNATS.

From: David Holland <>
Subject: Re: bin/43534: make does not set $* for PHONY targets
Date: Sun, 27 Jun 2010 20:49:31 +0000

 On Sun, Jun 27, 2010 at 08:35:02AM +0000, David Laight wrote:
  >  > $* a.k.a. $(.PREFIX) is not set for targets marked .PHONY.
  >  Some of the make variables are only defined for 'inference rules'
  >  (IIRC the name correctly) which include the suffix rules.
  >  In other cases the actual value is known to the makefile writer.
  >  It is likely that $* is one of these.
 I thought this at first (see what I committed to make.1 last night...)
 but it's not.
 It works for everything that isn't declared .PHONY, and it's because
 of the logic I pointed to that returns early out of suff.c for phony
 Anyway, do you have an opinion on whether $* for a phony target (given
 that it isn't going to match any suffix rules) should or should not
 have suffixes pruned from it?
 After sleeping on it I'm inclined to think it shouldn't.
 David A. Holland

Home | Main Index | Thread Index | Old Index