From owner-freebsd-ports Fri Dec 15 13:15:38 2000 From owner-freebsd-ports@FreeBSD.ORG Fri Dec 15 13:15:36 2000 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from xena.gsicomp.on.ca (cr677933-a.ktchnr1.on.wave.home.com [24.43.230.149]) by hub.freebsd.org (Postfix) with ESMTP id 4940E37B400 for ; Fri, 15 Dec 2000 13:15:35 -0800 (PST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by xena.gsicomp.on.ca (8.9.3/8.9.3) with SMTP id QAA86764; Fri, 15 Dec 2000 16:15:33 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <001f01c066dc$687b1930$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Joseph Scott" Cc: References: Subject: Re: Using HAS_CONFIGURE to enforce PREFIX Date: Fri, 15 Dec 2000 16:17:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > On Fri, 15 Dec 2000, Maxim Sobolev 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? > # > # No, you are wrong. Unlike GNU_CONFIGURE, which assumes certain semantics of > # configure scripts and therefore provides certain default command line arguments > # for it, HAS_CONFIGURE is just plain hack to call a ${WRKSRC}/configure (it can > # be anything from pre-compiled executable to the weird shell script) w/o any > # additional arguments. Hovewer, you can add necessary flags into the appropriate > # ports using CONFIGURE_ARGS make(1) variable. > > Ahhh, HAS_CONFIGURE is much more generic then. I'm trying the > follow all of the implies in bsd.port.mk in hopes that --prefix=${PREFIX} > ends up in there. That doesn't seem to be the case. > > This begs the question, why doesn't GNU_CONFIGURE have a default > arg of --prefix=${PREFIX} for gnu configure scripts? I guess this assumes > that it will always understand --prefix use. Otherwise all ports that > have GNU_CONFIGURE will also need CONFIGURE_ARGS+= --prefix=${PREFIX} yes? Follow the implies chain a bit further, and you'll see this (around line 1250 on 4.1-R): .if define(GNU_CONFIGURE) CONFIGURE_ARGS+= --prefix=${PREFIX} ${CONFIGURE_TARGET} HAS_CONFIGURE= yes .endif So when GNU_CONFIGURE is defined, the appropriate default arguments are set. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message