Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2011 08:43:42 -0500
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        bf1783@gmail.com
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Ports with CPPFLAGS in CONFIGURE_(ARGS|ENV)
Message-ID:  <20110919084342.1cf4ab56@cox.net>
In-Reply-To: <CAGFTUwMn0-B9WW4XUrhx7ZmPOKKEtxKjn5s6z3zOwFif%2BMUm1Q@mail.gmail.com>
References:  <CAGFTUwMn0-B9WW4XUrhx7ZmPOKKEtxKjn5s6z3zOwFif%2BMUm1Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Sep 2011 08:47:25 -0400
"b. f." <bf1783@googlemail.com> wrote:
> >
> > OK.  Just a few more questions:
> >
> > portlint -A issues no warning in the case of CPPFLAGS being added to
> > CONFIGURE_ARGS.  Should I concern myself only with CONFIGURE_ENV, or
> > would it be best to modify in either case?
> 
> Either case.  There are slight differences in the handling of
> variables passed in the environment (as is done by default for
> CPPFLAGS), and variables passed on the command-line (as is done for
> variables assigned in CONFIGURE_ARGS), but they are usually
> unimportant.  Most occurrences of CPPFLAGS in CONFIGURE_ARGS are
> either mistakes or anachronisms.

Right, OK.

> > Also, is there any possibility of either CONFIGURE_ENV or
> > CONFIGURE_ARGS being used in some non-standard fashion, i.e., with
> > anything other than a GNU configure script, meaning they should
> > just be left alone?
> 
> Of course that is possible, although such a usage would probably be
> rare, if it occurs at all. You should only be concerned about the
> case when:
> 
> --HAS_CONFIGURE is defined (note that HAS_CONFIGURE can be implied by
> other things, like GNU_CONFIGURE, XORG_CAT, USE_AUTOTOOLS, USE_PHPIZE,
> and USE_PHPEXT); and
> --the default "do-configure" target has not been overridden;
> 
> because that is when CPPFLAGS is passed in the environment to the
> configure script.  See bsd.port.mk.
> 
> b.

Thank you, that was very informative.  I'm definitely going to have to
scrutinize bsd.port.mk and friends more closely to better my
understanding of how these variables are actually handled, to avoid any
potential pitfalls.

Final tally (as of this writing) of ports flagged by portlint: 1,521.
That's only for the CONFIGURE_ENV cases.  I think, for now, I'll limit
myself to those.  The "edgier" cases may just bog me down too much
initially.  Once I've succeeded in doing the initial basic cleanup, it
will be a little easier to zoom in on the more specialized cases.

I'm already somewhat daunted by the sheer number of ports needing
attention.  Fortunately, though, many of the occurrences are
identical (or very nearly so) in format, so it should be possible to
devise some automated tools to handle a large number of them.

Luckily for me, I'm retired now, and have *lots* of free time.  Can't
think of a more productive way to spend it than by giving back to the
project I've come to know and love over the last 15 years.  

-- 
Conrad J. Sabatier
conrads@cox.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110919084342.1cf4ab56>