Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2008 00:48:47 +0200
From:      "Ivan \"Rambius\" Ivanov" <rambiusparkisanius@gmail.com>
To:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   Slightly OT: Invoking a shell command from a Makeile
Message-ID:  <89ce7f740801271448x27371cf7lfe5255256fb498ec@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I am developing a FreeBSD port and I would like to invoke a shell
command from it and assign its output to a variable. The command in
question is

# make -f /usr/ports/lang/fpc/Makefile -V PORTVERSION

and I have verified that it works on the command line.

I try to use it in my port's Makefile in the following way:

FPCVERSION=             `make -f /usr/ports/lang/fpc/Makefile -V PORTVERSION`

but it fails with the following error

Syntax error: EOF in backquote substitution

I also tried

FPCVERSION=             `make -f /usr/ports/lang/fpc/Makefile -V PORTVERSION`

but it fails on the same error. Can you please advise me how to call
this command?

Thank you in advance.

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com



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