Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2006 22:36:31 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Max Laier <max@love2party.net>
Cc:        Hartmut Brandt <hartmut.brandt@dlr.de>, freebsd-current@freebsd.org
Subject:   Re: .PATH-problem [was Re: make or kmod.mk broken]
Message-ID:  <20060114203631.GD4687@ip.net.ua>
In-Reply-To: <200601142103.39181.max@love2party.net>
References:  <200601140758.02019.max@love2party.net> <43C93017.3080305@dlr.de> <200601142103.39181.max@love2party.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, Jan 14, 2006 at 09:03:32PM +0100, Max Laier wrote:
> On Saturday 14 January 2006 18:08, Hartmut Brandt wrote:
> > Max Laier wrote:
> > >On a related question:  How can I get the actual location of a file that
> > > is in .PATH?  All I could come up with was ${.ALLSRC:M*${MY_FILE}} which
> > > doesn't work as I am explaining here.
> >
> > M*$(MY_FILE) would also match 'foobar'  if MY_FILE is 'bar' which is
> > probably not what you want.
> > .IMPSRC might be what you want if you talk about an implicite rule.
> 
> What I am trying to do is parse a list of "filename:shortname"-objects.  This 
> is to support easy building of firmware modules.  If things work as I want 
> them to you can build a firmware module with a two line Makefile:
> 
> | KMOD=somefirmware
> | FIRMWS=firmfile1.fw:somename1 firmfile2.fw:somename2
> 
> and it works if the firmfiles are in the same directory, but if they are 
> in .PATH it fails.  I was looking at .IMPSRC initially as well, but failed to 
> understand the concept :-\ ... any help greatly appreciated.  Thanks.
> 
: $ cat makefile
: .PATH: /tmp
: 
: FIRMWS=firmfile1.fw:somename1 firmfile2.fw:somename2
: 
: all:
: .for _firmw in ${FIRMWS}
: all: ${_firmw:C/^.*://}
: ${_firmw:C/^.*://}: ${_firmw:C/:.*$//}
: 	@echo building ${.TARGET} from ${.ALLSRC}
: .endfor
: $ make
: building somename1 from firmfile1.fw
: building somename2 from /tmp/firmfile2.fw


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDyWDPqRfpzJluFF4RArskAJwLeroJK7UEcXk+qYZlhHkC+k9ujwCfcuJe
nmveHhPW0O1HqEPWV741IYM=
=OlNE
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060114203631.GD4687>