From owner-freebsd-ports Wed Apr 21 4:55:37 1999 Delivered-To: freebsd-ports@freebsd.org Received: from maile.telia.com (maile.telia.com [194.22.190.16]) by hub.freebsd.org (Postfix) with ESMTP id 0D9C7152F1; Wed, 21 Apr 1999 04:55:20 -0700 (PDT) (envelope-from girgen@partitur.se) Received: from d1o62.telia.com (root@d1o62.telia.com [195.198.198.241]) by maile.telia.com (8.8.5/8.8.8) with ESMTP id NAA23097; Wed, 21 Apr 1999 13:52:49 +0200 (CEST) Received: from stordatan.telia.com (t1o62p5.telia.com [195.198.198.5]) by d1o62.telia.com (8.8.5/8.8.5) with ESMTP id NAA21886; Wed, 21 Apr 1999 13:52:47 +0200 (CEST) Received: from partitur.se (localhost [127.0.0.1]) by stordatan.telia.com (8.9.2/8.9.1) with ESMTP id NAA34608; Wed, 21 Apr 1999 13:52:20 +0200 (CEST) (envelope-from girgen@partitur.se) Message-ID: <371DBBF4.582EC700@partitur.se> Date: Wed, 21 Apr 1999 13:52:20 +0200 From: Palle Girgensohn Organization: Partitur X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 3.1-STABLE i386) X-Accept-Language: sv,en MIME-Version: 1.0 To: Satoshi - Ports Wraith - Asami Cc: freebsd-ports@freebsd.org Subject: Re: setting makevars to output from program, HOW? References: <371DAEE1.DE743872@partitur.se> <199904211105.EAA94009@silvia.hip.berkeley.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 > > * 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