Subject: Re: Setting a make variable based on sh variable
To: Luke Mewburn <lukem@NetBSD.org>
From: Alistair Crooks <firstname.lastname@example.org>
Date: 06/18/2004 09:52:28
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)
> | into a make variable?
> NetBSD make:
> SOME_VAR!= . /usr/pkg/lib/tclConfig.sh && echo $$TCL_LIBS
For completeness, GNU make:
SOME_VAR= $(shell . /usr/pkg/lib/tclConfig.sh && echo $$TCL_LIBS)