A question about /etc/make.conf configuration reddit / freebsd ---------------------------------------------------------------------- przemio_1978 · 2023-07-21 05:52 Hello, I've been considering recompiling the whole system from source to fine-tune it to my hardware and needs* and I have a question about configuring the /etc/make.conf file. What "literature" should I consult to find out about the possible options worth considering and including in the make.conf? Thank you in advance for any pointers. (*for entertainment and educational purposes mainly) ---------------------------------------------------------------------- TuxPowered · 2023-07-21 06:10 man make.conf FreeBSD is known having built-in documentation for things included in the base system. ---------------------------------------------------------------------- grahamperrin · 2023-07-21 06:19 First and foremost: 1. see [make.conf\(5\)](https://man.freebsd.org/cgi/man.cgi?query=make .conf&sektion=5&manpath=freebsd-release) 2. linked from there, see [src.conf\(5\)](https://man.freebsd.org/cgi/ man.cgi?query=src.conf&sektion=5&manpath=freebsd-release). The BUGS section of the former concludes: > Please check the `/usr/share/examples/etc/make.conf` file for the latest options which are available. The `NO_INSTALLEXTRAKERNELS` option is not there; not in the manual page that draws attention to the file; nowhere in the FreeBSD Project and Documentation Portal sites; so: - generally, expect the unexpected. For entertainment. > (*for entertainment and educational purposes mainly) ---------------------------------------------------------------------- grahamperrin · 2023-07-21 06:33 > … pointers. … # ripgrep – [textproc/ripgrep](https://www.freshports.org/textproc/ripgrep/) Pointing, because it's so fast. Thanks again to whoever it was, in Reddit, brought ripgrep (and more) to people's attention. [rg\(1\)](https://man.freebsd.org/cgi/man.cgi?query=rg&sektion=1&manpa th=freebsd-ports) ## A relevant example For the `NO_INSTALLEXTRAKERNELS` option, which ([above](https://old.re ddit.com/r/freebsd/comments/155exei/a_question_about_etcmakeconf_confi guration/jsu1d28/)) seems to be not documented in documentation- oriented areas: % rg --count NO_INSTALLEXTRAKERNELS /usr/src /usr/src/Makefile.inc1:8 % time rg NO_INSTALLEXTRAKERNELS /usr/src /usr/src/Makefile.inc1 1756:NO_INSTALLEXTRAKERNELS?= yes 1762:NO_INSTALLEXTRAKERNELS?= no 1787:.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" 1821:.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" 1854:.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" 1879:.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" 1941: NO_INSTALLEXTRAKERNELS=${NO_INSTALLEXTRAKERNELS} 2090:.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" 3.034u 10.076s 0:06.60 198.4% 2892+170k 7242+0io 0pf+0w % Pinpointed by GitHub: - https://github.com/freebsd/freebsd- src/blob/774ab87cf27beb3669693f14b9c89ebaf542eaf3/Makefile.inc1#L1756 – note the `YES`. Related, seven years ago, chronological order: 1. [Provide knob NO_INSTALLEXTRAKERNELS . If defined, extra kernels in KERNCONF won't be installed, only the first one would.](https://github.com/freebsd/freebsd- src/commit/b46e917554ee224fb1035c66bf4f7bbfccb3a922) 2. [Make it possible to override NO_INSTALLEXTRAKERNELS .](https://github.com/freebsd/freebsd- src/commit/f4ae78bd4e5aa89ee749f2a483fe24a8f175abee) 3. [Default NO_INSTALLEXTRAKERNELS to " no " to unbreak the build](https://github.com/freebsd/freebsd- src/commit/c0fd4255265ed177ed05b0e439ef67449d3974e3) 4. [Default NO_INSTALLEXTRAKERNELS to yes, not no](https://github.com/freebsd/freebsd- src/commit/79ccc589d20c568e1357f49c20a28fc0e4fd2de1). ---------------------------------------------------------------------- grahamperrin · 2023-07-21 06:54 +1 > FreeBSD is known having built-in documentation for things included in the base system. Largely true. > man make.conf The BUGS section of this page is bugged, in that for the latest information it directs us to a page that lacks the latest information; it's not authoritative. In this situation, the authoritative point of reference might be `Makefile.inc1`. In alphabetical order: - https://cgit.freebsd.org/src/tree/Makefile.inc1 - https://codeberg.org/FreeBSD/freebsd- src/src/branch/main/Makefile.inc1 - https://github.com/freebsd/freebsd-src/blob/main/Makefile.inc1 - https://gitlab.com/FreeBSD/freebsd-src/-/blob/main/Makefile.inc1 ---- >> … educational purposes … I tend to avoid cgit, because so much of what's presented lacks a meaningful title. People **do need meaning**: - when bookmarking - when viewing automatically-presented titles in media such as Matrix, Discord and IRC - and so on. ---------------------------------------------------------------------- njunkie · 2023-07-21 10:39 You can find well documented example of make.conf in /usr/share/etc/examples. Its well commented, so feel free to check it. In addition check src.conf. make.conf is used for tunes of ports build process tunes but for system itself is /etc/src.conf available. For src.conf only man is available ---------------------------------------------------------------------- jrtc27 · 2023-07-21 12:06 Makefile.inc1 will give you options that govern solely the build of the src tree, and such options belong in src.conf as a result. make.conf is for options that you want to apply to any use of make on the system (e.g. CPUTYPE to choose what specific processor to build for). The manpage does mention this but it’s perhaps not as strongly worded as it should be. ---------------------------------------------------------------------- grahamperrin · 2023-07-21 18:24 Ah! Thanks for correction. Until now I've been adding `NO_INSTALLEXTRAKERNELS=no` at the command line when running `make installkernel`. So, I can add it to src.conf instead? ---------------------------------------------------------------------- jrtc27 · 2023-07-21 18:28 Yes. It should work in make.conf too, it’ll just apply to other make invocations and leak out of src builds (and risk colliding with an unrelated variable in another project’s Makefiles, though for that name it seems extremely unlikely). ---------------------------------------------------------------------- MichaelHMich · 2023-07-23 08:01 unless you have very special needs you don't need to change/add something to make.conf same for src.conf, the most useful parameter is an array of models you don't need, what can speed up your compile time significantly