Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2000 16:17:19 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        "Joseph Scott" <joseph@randomnetworks.com>
Cc:        <freebsd-ports@FreeBSD.ORG>
Subject:   Re: Using HAS_CONFIGURE to enforce PREFIX
Message-ID:  <001f01c066dc$687b1930$1200a8c0@gsicomp.on.ca>
References:  <Pine.BSF.4.21.0012151412280.58776-100000@mothra.ecs.csus.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001f01c066dc$687b1930$1200a8c0>