Date: Thu, 22 Feb 2024 12:31:17 +0000 From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 277204] *: ports misusing WITH_CCACHE_BUILD and NO_CCACHE Message-ID: <bug-277204-8522-zPSPixlI0a@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-277204-8522@https.bugs.freebsd.org/bugzilla/> References: <bug-277204-8522@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277204 --- Comment #5 from Gleb Popov <arrowd@FreeBSD.org> --- (In reply to Benjamin Takacs from comment #4) There are several concepts interleaved here, let me explain. * Feature is a sort of OPTION but general enough to be applied to **any** p= ort. DEBUG is an example of a Feature, because almost every port can be build in= the "debug" mode. In Ports Framework Features are implemented as .mk files placed in Mk/Featu= res/ subdir, just like Uses are placed into Mk/Uses/. The Mk/bsd.ccache.mk file probably predates introduction of Mk/Features, but serves the same purpose. So, moving just bsd.ccache.mk to Features/ would solve all the issues you outlined, but it is still a step in right direction, as it makes the framew= ork more consistent. * Mk/Features/ also provide a unified interface for both users and port developers. If a Feature is called FOO an user can put WITH_FOO=3Dyes or WITHOUT_FOO=3D= yes into the make.conf or make command line to enable or disable the Feature globall= y. WITH_FOO_PORTS and WITHOUT_FOO_PORTS allows for enabling/disabling a Feature for a given set of ports. With https://reviews.freebsd.org/D43949 landed it will become possible for WITH_FOO_PORTS to cancel WITHOUT_FOO and vice versa. * Features are not expected to be self-contained. Take a look at Mk/Features/lto.mk - it only sets some variables that are later gets consum= ed by Uses and the rest of Framework. In the same way, a Uses may be taught to look for some variables that might be set by an enabled feature. So to fix the "order" problem we first should clearlt understand how enable ccache machinery for Autotools, CMake, Meson, etc. and finally if it is possible to do in a general way. Then just extend corresponding Uses to sup= port a new feature. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277204-8522-zPSPixlI0a>