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>

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

--IMjqdzrDRly81ofr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 th=
at
> > > is in .PATH?  All I could come up with was ${.ALLSRC:M*${MY_FILE}} wh=
ich
> > > 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.
>=20
> What I am trying to do is parse a list of "filename:shortname"-objects.  =
This=20
> is to support easy building of firmware modules.  If things work as I wan=
t=20
> them to you can build a firmware module with a two line Makefile:
>=20
> | KMOD=3Dsomefirmware
> | FIRMWS=3Dfirmfile1.fw:somename1 firmfile2.fw:somename2
>=20
> and it works if the firmfiles are in the same directory, but if they are=
=20
> in .PATH it fails.  I was looking at .IMPSRC initially as well, but faile=
d to=20
> understand the concept :-\ ... any help greatly appreciated.  Thanks.
>=20
: $ cat makefile
: .PATH: /tmp
:=20
: FIRMWS=3Dfirmfile1.fw:somename1 firmfile2.fw:somename2
:=20
: 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,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--IMjqdzrDRly81ofr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

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

--IMjqdzrDRly81ofr--



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