Subject: Re: New make modifiers: :C///W, :tW, and :[]
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 08/03/2003 16:05:16
On Sat, Aug 02, 2003 at 11:40:05AM +0200, Alan Barrett wrote:
> 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.)

Nope: RTFM (although, IIRC it isn't very clear on this issue and I had to
	fix the make.y (or was it make.l) on one version in order for make
	not to barf at the second ':').

In SVSY make, with:

O	= objdir
OBJS	= $O/file1.o $O/file2.o

${OBJS}: $${F:.o=.c}
	rules

is equivalent to:

$O/file1.o: file1.c
	rules

$O/file2.o: file2.c
	rules

and is useful for multi-architecture makefiles.
(I would usually add dependency against all the local .h files, but
not the system ones.)

	David

-- 
David Laight: david@l8s.co.uk