Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 1999 12:56:33 +0200
From:      Palle Girgensohn <girgen@partitur.se>
To:        freebsd-ports@freebsd.org
Subject:   setting makevars to output from program, HOW?
Message-ID:  <371DAEE1.DE743872@partitur.se>

next in thread | raw e-mail | index | archive | help
Hi!

I am trying to set make variables to output from programs (using
backticks). It seems that the values are not substituted, but instead
the whole backtick string is inserted. This gives me problem, since I
can't get PLIST_SUB to work if it isn't evalled first. bsd.port.mk
complains that it gets erroneous lines, and it seems they're not enough
quoted.

Anyway, here's an example to make it clearer:

BUILD_DEPENDS=  ${APXS_SBIN}/apxs:${PORTSDIR}/www/apache-13
RUN_DEPENDS=    ${APXS_HTTPD}:${PORTSDIR}/www/apache-13

...

APXS_SBIN=      "`${DIR}/apxs -q SBINDIR`"
APXS_HTTPD=     "`${DIR}/apxs -q TARGET`"
APXS_LIBEXEC=   "`${DIR}/apxs -q LIBEXECDIR`"
PLIST_SUB=      APXS_LIBEXEC=${__APXS_LIBEXEC:S,${PREFIX},,}


Now, what happens is make will puke on PLIST_SUB, since the variable
will be used for something in bsd.port.mk, and it still contains the
backticks etc... It's not evaluated.

It will work until post-install, when PLIST_SUB is used:

 :/usr/ports/www/apache-13: not found
 php-3.0.7: "/usr/local/sbin/apxs" non-existent -- dependency list
incomplete
 php-3.0.7: "-q" non-existent -- dependency list incomplete
 php-3.0.7: "TARGET" non-existent -- dependency list incomplete
 :/usr/ports/www/apache-13: not found


and as I try make clean, the line for BUILD_DEPENDS (APXS_SBIN), also
fails.
 /apxs:/usr/ports/www/apache-13
 :/usr/ports/www/apache-13: not found


So, there must be a way to read and evaluate make variables, right? What
am I missing?

/Palle

PS. As you might see, I'd like to obtain info on where apache is
installed, so I can use this to install shared modules as separate
ports. Do you think this is a good idea? DS.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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