Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 1999 13:52:20 +0200
From:      Palle Girgensohn <girgen@partitur.se>
To:        Satoshi - Ports Wraith - Asami <asami@freebsd.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: setting makevars to output from program, HOW?
Message-ID:  <371DBBF4.582EC700@partitur.se>
References:  <371DAEE1.DE743872@partitur.se> <199904211105.EAA94009@silvia.hip.berkeley.edu>

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

I realize that make describe will probably fail, but what if I use a ?=
to set some defaults? If the prog (apxs in this case) isn't found the
defaults will used, I guess? Will this be OK? :

BUILD_DEPENDS=  ${APXS_SBIN}/apxs:${PORTSDIR}/${APACHE_PORT}
RUN_DEPENDS=    ${APXS_HTTPD}:${PORTSDIR}/${APACHE_PORT}

...

userpath=       "${PREFIX}/sbin ${PATH:S^:^ ^g}"
.for DIR in ${userpath}
.if exists (${DIR}/apxs)
__APXS_SBIN!=    ${DIR}/apxs -q SBINDIR
__APXS_HTTPD!=   ${DIR}/apxs -q TARGET
__APXS_LIBEXEC!= ${DIR}/apxs -q LIBEXECDIR
.endif
.endfor

APXS_SBIN?=     ${PREFIX}/sbin
APXS_HTTPD?=    ${APXS_SBIN}/sbin/httpd
APACHE_PORT?=   www/apache13
PLIST_SUB?=     APXS_LIBEXEC=libexec/apache
APACHE_PORT?=   www/apache13  # keeps make clean from going berzerk

...

/Palle

Satoshi - Ports Wraith - Asami wrote:
> 
>  * From: Palle Girgensohn <girgen@partitur.se>
> 
>  * 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.
> 
> You need to use the "!=" construct for command substitutions in
> make. :)
> 
>  * APXS_SBIN=      "`${DIR}/apxs -q SBINDIR`"
> 
> APXS_SBIN!=        ${DIR}/apxs -q SBINBIR
> 
>  * 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.
> 
> However, it is generally not a good idea to use a command outside of
> the system since there are lots of stuff that don't check the
> dependencies.  Just think "make index", etc.
> 
> -PW


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?371DBBF4.582EC700>