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...



VISTA - Viruses Intruders Spyware Trojans Adware

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to