Hello Alphons,

On Jan 28, 2008 1:07 AM, Alphons Fonz van Werven
<[EMAIL PROTECTED]> wrote:
> Ivan "Rambius" Ivanov wrote:
>
> > I am developing a FreeBSD port and I would like to invoke a shell
> > command from it and assign its output to a variable.
>
> If you're using GNU make (called gmake on BSD systems), you can do
> VAR := $(shell command)
> or, as a concrete example,
> CFILES := $(shell ls *.c)
> Not that I recommend using that example, it just goes to illustrate.
>
> If you're using BSD make, I wouldn't know though. I'm just not familiar
> with that. And if you wish to do it in a portable way such that it works
> with BSD make, GNU make or whatever, then all I can say is good luck...
I do use BSD make and not GNU make, but your examples gave me a hint
what I should search on google and I found the exact syntax:

FPCVERSION!=            make -f ${PORTSDIR}/lang/fpc/Makefile -V PORTVERSION

The assignment is done by the bang equals sign "!=" and I found it
explained here http://www.khmere.com/freebsd_book/html/ch01.html

Thank you for your quick response.

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to