Page MenuHomeFreeBSD

framework: generalize WITH_ code
ClosedPublic

Authored by bapt on Jul 21 2022, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 4:39 PM
Unknown Object (File)
Mon, Apr 22, 8:08 AM
Unknown Object (File)
Sun, Apr 21, 8:45 AM
Unknown Object (File)
Sun, Apr 21, 8:45 AM
Unknown Object (File)
Sun, Apr 21, 8:45 AM
Unknown Object (File)
Sun, Apr 21, 8:45 AM
Unknown Object (File)
Sun, Apr 21, 8:32 AM
Unknown Object (File)
Sat, Apr 13, 12:33 AM

Details

Summary

Make the definition of WITH_ variable (end user actionable) a define
via a generic code
Move the WITH_DEBUG code into its own file Features/debug.mk
Replace USE_LTO into WITH_LTO and move it into Features/lto.mk
Move WITH_SSP into its own Features/ssp.mk

Add a variable to defined which one are activated by default (here SSP)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 46502
Build 43391: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Jul 21 2022, 10:00 AM
tcberner added inline comments.
Mk/Features/debug.mk
1

^ add documentation on how to use it?

Mk/Features/lto.mk
3

^ this contradicts the warning in bsd.port.mk?

Mk/bsd.port.mk
1319

^why keep the old behavior?
Wouldn't it make more sense to just get rid of the old behavior in one go?

I wonder whether ENABLE_FEATURES=[list] and DISABLE_FEATURES=[list] would not be the better API, instead of WITH_${feature}=yes and WITHOUT_${feature}=yes.

bapt marked 2 inline comments as done.Jul 27 2022, 1:14 PM
bapt added inline comments.
Mk/bsd.port.mk
1319

I think we should keep the old behaviour for a couple of month and then turn it into an error for a couple of more month, then remove everything ;)

This revision is now accepted and ready to land.Jul 27 2022, 1:19 PM
This revision was automatically updated to reflect the committed changes.