From owner-freebsd-ports Fri Dec 15 13:20:59 2000 From owner-freebsd-ports@FreeBSD.ORG Fri Dec 15 13:20:57 2000 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mothra.ecs.csus.edu (unknown [130.86.76.220]) by hub.freebsd.org (Postfix) with ESMTP id 43C5F37B400 for ; Fri, 15 Dec 2000 13:20:57 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mothra.ecs.csus.edu (8.11.1/8.11.1) with ESMTP id eBFMlHX59286; Fri, 15 Dec 2000 14:47:18 -0800 (PST) (envelope-from joseph@randomnetworks.com) Date: Fri, 15 Dec 2000 14:47:17 -0800 (PST) From: Joseph Scott X-Sender: scottj@mothra.ecs.csus.edu To: Matthew Emmerton Cc: freebsd-ports@FreeBSD.ORG Subject: Re: Using HAS_CONFIGURE to enforce PREFIX In-Reply-To: <002901c066db$1e5ce7d0$1200a8c0@gsicomp.on.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 15 Dec 2000, Matthew Emmerton wrote: # > Joseph Scott wrote: # > # > > I've been updating a couple of ports and noticed something. # Both # > > of these ports use configure, but weren't honoring PREFIX. After # looking # > > through bsd.port.mk I came across HAS_CONFIGURE, who as a default of # > > adding --prefix=${PREFIX} to the configure args. This made both of the # > > ports in question correctly install into PREFIX instead of /usr/local. # > > # > > Is this the right way to enforce PREFIX with configure'd ports? # # In general, if a port uses GNU configure, then adding 'GNU_CONFIGURE=yes' to # the Makefile is all that is neccessary. bsd.port.mk will look after passing # the proper arguments to GNU configure to ensure that PREFIX is honored when # the makefiles are built. # # Looking at security/stunnel, it defines USE_AUTOCONF, which implies # GNU_CONFIGURE, which implies HAS_CONFIGURE, so this port should be honoring # PREFIX in any case. # # As for ftp/cftp, it defines GNU_CONFIGURE which implies HAS_CONFIGURE and # should honor PREFIX as well. # # Both of these ports built and installed properly for me using alternate # values for PREFIX. Hummmm, I tried a `make install PREFIX=/tmp/port` and in some cases all of the port would still go to /usr/local, in others only part would go to PREFIX, the rest to /usr/local. # One thing that you may be getting caught by is that you need to do a 'make # clean' before trying to change the value of PREFIX for a port. This is # because configure hard-codes the paths into the makefiles it builds during a # 'make configure', and won't be updated if you do something like 'make # install PREFIX=/some/other/dir' when you go to install. Yes, I got caught by that a few times when working on other ports. I usually do a make after updating the obvious stuff, see if it breaks. If it survives I do a make clean and then a make install PREFIX=xxxxx vodoo. *********************************************************** * Joseph Scott The Office Of Water Programs * * joseph@randomnetworks.com joseph.scott@owp.csus.edu * *********************************************************** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message