Subject: Re: bin/9315: variable $< not assigned (/usr/bin/make)
To: None <netbsd-bugs@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: netbsd-bugs
Date: 01/30/2000 08:11:28
makoto@ki.nu <makoto@ki.nu> typed:
:>Description:
:	/usr/bin/make does not assign the value to $<
:        while man make reads,
:+----------------------
:|  .IMPSRC   The name/path of the source from which the target is to
:|            be transformed (the ``implied'' source); also known as
:|            `<'.
:|  .........
:|  .TARGET   The name of the target; also known as `@'.
:+----------------------
:>How-To-Repeat:
:  makoto@harry > cat Makefile 
:  gcnmz: gcnmz.pl
:          sed -e 's!%LIBDIR%!/usr/local/share/namazu/pl!g' $< > $@
:  makoto@harry > cat gcnmz.pl 
:  mknmz: mknmz.pl
:          sed -e 's!%LIBDIR%!/usr/local/share/namazu/pl!g' $< > $@
:  makoto@harry > which make
:  /usr/bin/make
:  makoto@harry > make
:  sed -e 's!%LIBDIR%!/usr/local/share/namazu/pl!g'  > gcnmz

There's no ``implied'' source.  Implied sources exist with transformation
rules (c.f. ``normal'' dependency lines).  See /usr/share/doc/psd/12.make/

% cat Makefile
.SUFFIXES: .pl .q
.pl.q:
	@echo 1: $< 2: ${.IMPSRC} 3: $@
% make gcnmz.q
1: gcnmz.pl 2: gcnmz.pl 3: gcnmz.q
%

Regards,
-- 
Geoff Wing : <gcw@pobox.com>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@zsh.org>       Phone   : (Australia) 0413 431 874