From owner-freebsd-ports Sat Jun 3 18: 0: 9 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 00F5B37C793 for ; Sat, 3 Jun 2000 18:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA18450; Sat, 3 Jun 2000 18:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sat, 3 Jun 2000 18:00:02 -0700 (PDT) Message-Id: <200006040100.SAA18450@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Tim Vanderhoek Subject: Re: ports/18960 - Add USE_APACHE to bsd.port.mk for Apache module ports Reply-To: Tim Vanderhoek 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: Tim Vanderhoek To: "Scot W. Hetzel" Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/18960 - Add USE_APACHE to bsd.port.mk for Apache module ports Date: Sat, 3 Jun 2000 20:53:11 -0400 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. I hope you know what you're doing... Commandline variables are entered into the environment. That is how they are passed to successive invocations of make(1). A commandline variable (generally?) can't be overridden from within make. However, an environment variable can be overridden from within make. When bsd.port.mk calls itself recursively, the AP_PORT variable will be over-rideable. When it is on the non-recursive call, AP_PORT will not be over-rideable. I can't entirely remember why the softMAKEFLAGS use '+=' instead of '=', but I think this was one of the reasons I did it that way. And then there was some reason they needed to be normal rather than environment variables. I blame Satoshi Asami for not forcing me to write comments surrounding that stuff. ;-) 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). > > How is PKGBASE different from ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}? > > > > I have a feeling it isn't different. :-) > > According to bsd.port.mk: The correct answer was "No, there is no difference." :-) Just to make sure, I'm running a quick check-pkg_base-equals-portname: target on all the ports right now, but I expect no surprises. -- Signature withheld by request of author. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message