Re: git: 0660187ad07f - main - cleanup: remove occurrences of WITH_DEBUG
Date: Fri, 12 Apr 2024 10:31:46 UTC
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