Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2024 12:31:46 +0200
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Max Brazhnikov <makc@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:  <davu5htys26yyf442qtsw5xpbanx57vvrodiituwqj4jbf2q2f@3eet3tcmdzzj>
In-Reply-To: <CAJie3ypkRa2%2B_oF72WfjnxdRV8hxNCCV4aTexBP83XAhtdqPFA@mail.gmail.com>
References:  <202404120607.43C674EB042318@gitrepo.freebsd.org> <CAJie3ypkRa2%2B_oF72WfjnxdRV8hxNCCV4aTexBP83XAhtdqPFA@mail.gmail.com>

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

Best regards,
Bapt



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