12.18 sysctl 使用時機

sysctl 除了在 targets 之外,都不鼓勵使用。 這是因為任何 makevar 的評估都有可能會使得程序執行速度變慢。例如在 make index 的過程中就會需要用到 sysctl

若要使用 sysctl(8) 則必須透過 SYSCTL 此一變數才可,因為這樣才會包含完整路徑, 同時也可以隨時因應使用者需求而替換為其他路徑。

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.