Subject: Re: New make modifiers: :C///W, :tW, and :[]
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 08/02/2003 11:40:05
On Fri, 01 Aug 2003, David Laight wrote:
> Do we support ${OBJS}: $${@F:.o=.c} for instance?
> (Suffix translation on dynamic dependency, @F being filename part.
> Useful for putting objects onto a subdirectory and making the .o
> depend on its own .c)

(I think you accidentally put an extra '$' in your example.)

There's code that treats ${@F} just like ${@:T} (:T is the "basename"
modifier).  Similarly, ${@D} is treated like ${@:H} (:H is the "dirname"
modifier).  So, I expect that ${@F:.o=.c} should work just like
${.TARGET:T:S/.o$/.c$/}, but I haven't tried it.

The man page doesn't explain what ${@D} means, but does say that it and
a few others are "permitted for compatibility with AT&T System V UNIX
makefiles and are not recommended".

--apb (Alan Barrett)