Subject: Re: Setting a make variable based on sh variable
To: None <tech-pkg@NetBSD.org>
From: Jonathan Perkin <jonathan@perkin.org.uk>
List: tech-pkg
Date: 06/18/2004 11:20:55
--l76fUT7nc3MelDdI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* On 2004-06-18 at 10:44 BST, Alistair Crooks wrote:

> On Fri, Jun 18, 2004 at 04:34:20PM +1000, Luke Mewburn wrote:
>
> > On Fri, Jun 18, 2004 at 04:08:12PM +1200, Mark Davies wrote:
> >
> > In either Berkeley make or GNU make how can I set a make
> > variable to the value of a particular shell variable after
> > having sourced a particular shell script?  That is to say
> > how do I get the result of:
> >
> >   sh -c (.  /usr/pkg/lib/tclConfig.sh; echo $TCL_LIBS)
> >=20
> > into a make variable?
> >=20
> > NetBSD make:
> >=20
> > 	SOME_VAR!=3D	. /usr/pkg/lib/tclConfig.sh && echo $$TCL_LIBS
>=20
> For completeness, GNU make:
>=20
> 	SOME_VAR=3D $(shell . /usr/pkg/lib/tclConfig.sh && echo $$TCL_LIBS)

Aahhh, go on then - SunOS make:

	SOME_VAR:sh=3D (. /usr/pkg/lib/tclConfig.sh && echo ${TCL_LIBS})

Any more? :-)

--=20
Jonathan Perkin                         <jonathan@perkin.org.uk>
BBC Internet Services         http://www.perkin.org.uk/jonathan/

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUBQNLCByFee6/VMqV4AQJDoQf/edThynxrRW/NEueAdYB2PZrBszBnN8k7
Y7E+tsLoqwjj6HxhzR+c8e8eFCxYfoiySCByFlFugDnH7qQNhDKm03RCt8kfo8Fj
Q0QGnaespBwlOVpzM2CCXVQLEB4ZFztq8wQlb8zOpCC2S933Lf3sENhMH2crqmmD
ZNv/urqFGqiObK73t/NvfzJobJah1wOqSYzuFz+K2WlMXxLE4NFT4JN26JVWZn8k
Dwk1azXx++G4CPUUtZW7+iHw1z/uSkbXFsVkLbvYN00z3fut2EVNEF4tcvEOi6QP
MznM9NiK5PP5MjrF/KRL22T8nXIttXV+INeCSy07rNPAxYPzCXC23g==
=ng37
-----END PGP SIGNATURE-----

--l76fUT7nc3MelDdI--