Subject: Re: make(1) feature request: $<
To: Johnny C. Lam <lamj@stat.cmu.edu>
From: Geoff Wing <gcw@pobox.com>
List: current-users
Date: 01/03/1999 12:26:09
Johnny C. Lam wrote about Re: make(1) feature request: $<:
:mason@primenet.com.au (Geoff Wing) typed:
:> Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de> typed:
:> :It seems our make doesn't support $< as synonym for ${.ALLSRC}. 
:> :There is a number of (free) software out there that utilizes this feature,
:> :which is provided by GNU make. Having this also in our make(1) would help
:> :a bit. Thanks!
:> Huh?  Sure it supports $< but it's not a synonym for ${.ALLSRC} and it's
:> not supposed to be.  RTFM make(1):
:>     Local variables
:>     [....]
:> 	.ALLSRC   The list of all sources for this target; also known as
:> 	          `>'.
:>     [....]
:> 	.IMPSRC   The name/path of the source from which the target is to
:> 	          be transformed (the ``implied'' source); also known as 
:> 		  `<'.
:> Can you give an example of it failing to work?
:I think in GNU make, $< is indeed a synonym for ${.ALLSRC}. 

>From GNU make info:
   `$<'
	The name of the first dependency.  If the target got its commands
	from an implicit rule, this will be the first dependency added by
	the implicit rule (*note Implicit Rules::.).


No, $< is not a synonym for ${.ALLSRC} in GNU make - but it has a
different meaning to our (mainly pmake based with some extensions,
e.g. VPATH) make. 

:When I made the math/R package, I had to make a lot of identical changes
:to makefiles that looked like (pseudo-diff format):

That's just people's shortsightedness (or lack of platform testing capability)
and overdependence on GNU make.  You can probably find a stack of programs
written by Linux users (who've never used another platform) suffering from
this.

Regards,
-- 
Geoff Wing   <gcw@pobox.com>            Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/