Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2024 15:03:28 +0300
From:      Max Brazhnikov <makc@freebsd.org>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        Mathieu Arnold <mat@freebsd.org>, ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 0660187ad07f - main - cleanup: remove occurrences of WITH_DEBUG
Message-ID:  <CAJie3yoZB4kF=0rwnq=WaT59tC7KO_8djg01J6tonM13-3WhVw@mail.gmail.com>
In-Reply-To: <davu5htys26yyf442qtsw5xpbanx57vvrodiituwqj4jbf2q2f@3eet3tcmdzzj>
References:  <202404120607.43C674EB042318@gitrepo.freebsd.org> <CAJie3ypkRa2%2B_oF72WfjnxdRV8hxNCCV4aTexBP83XAhtdqPFA@mail.gmail.com> <davu5htys26yyf442qtsw5xpbanx57vvrodiituwqj4jbf2q2f@3eet3tcmdzzj>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 12 Apr 2024 at 13:31, Baptiste Daroussin <bapt@freebsd.org> wrote:
>
> On Fri 12 Apr 12:41, Max Brazhnikov wrote:
> > I don't quite understand something about ports options and features.
> >
> > Can we have the same knob as an option and as a feature?
> >
> > For example, graphics/glaxnimate has DEBUG in the OPTIONS_DEFINE and
> > the following lines in the Makefile:
> >
> > .if !${PORT_OPTIONS:MDEBUG}
> > CXXFLAGS:=      ${CXXFLAGS:C/-O([2-9]|[sz]|fast)/-O1/}
> > -fstack-protector-strong -fno-strict-aliasing
> > .endif
> >
> > Now to build this port in the debug mode I have to set WITH_DEBUG and
> > enable DEBUG option at the same time.
> >
> > We should either disallow having DEBUG in the options and check only
> > for WITH_DEBUG everywhere,
> > or WITH_DEBUG feature should set DEBUG option automatically.
> >
> > Max
> all options about DEBUG should be removed and only the feature being used.
>
> The port should test if WITH_DEBUG is defined (after .pre.mk or .options.mk)
> inclusion to add port specific things if needed.

I assume the same applies to all other features. Then we should drop
TEST option in favour of WITH_TESTING, LTO, etc.
Also update to the Porters handbook is needed. It mentions nothing
about Features, furthermore test and debug are used
in some examples for options helpers making the impression that TEST
and DEBUG could be legit options.

Max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJie3yoZB4kF=0rwnq=WaT59tC7KO_8djg01J6tonM13-3WhVw>