From owner-freebsd-ports Sat Jun 3 19: 0:10 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 85EDB37C62F for ; Sat, 3 Jun 2000 19:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id TAA22623; Sat, 3 Jun 2000 19:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sat, 3 Jun 2000 19:00:01 -0700 (PDT) Message-Id: <200006040200.TAA22623@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: "Scot W. Hetzel" Subject: Re: ports/18960 - Add USE_APACHE to bsd.port.mk for Apache module ports Reply-To: "Scot W. Hetzel" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/18960; it has been noted by GNATS. From: "Scot W. Hetzel" To: "Tim Vanderhoek" Cc: Subject: Re: ports/18960 - Add USE_APACHE to bsd.port.mk for Apache module ports Date: Sat, 3 Jun 2000 20:51:21 -0500 From: "Tim Vanderhoek" > On Sat, Jun 03, 2000 at 08:50:03AM -0700, Scot W. Hetzel wrote: > > > > I'm not sure if it can be used as a precious variable, as AP_PORT can also > > be used on the make command line to specify which apache13* port to build > > the module for. AP_PORT needs to be overriden when ${APXS} exist on the > > system, as a patched ${APXS} will know which apache13* port is installed. > > Hmm... > > Ugh. Conditional over-riding of a commandline variable. > > > Anyways, other than the potential problems with overriding a > commandline variable, I don't think there's any reason that such a > variable can't also be a precious make variable. Just change the line > > AP_PORT!= ... > > to > > _AP_PORT!= ... > > and make _AP_PORT the precious variable. Then conditionally set > AP_PORT to _AP_PORT. > > I can look more closely at how to do that later if the patch is > approved in concept (and if overriding a commandline variable is > really what you want to do). > I just thought of another ideal, that would make this more appealing. We turn AP_PORT in to a precious variable as you suggested. Then we return an error if AP_PORT is defined and doesn't match _AP_PORT. .if defined(AP_PORT) && ${AP_PORT} != ${_AP_PORT} .BEGIN echo "${_AP_PORT} previously installed" false .END .elif !defined(AP_PORT) AP_PORT= ${_AP_PORT} .endif Scot To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message