Page MenuHomeFreeBSD

Makefile: Remove `make world` and `make kernel`
AcceptedPublic

Authored by emaste on May 9 2025, 8:42 PM.
Tags
None
Referenced Files
F119900879: D50276.diff
Fri, Jun 13, 6:26 AM
Unknown Object (File)
Tue, Jun 10, 1:11 AM
Unknown Object (File)
Wed, Jun 4, 11:40 PM
Unknown Object (File)
Wed, Jun 4, 12:22 PM
Unknown Object (File)
Mon, Jun 2, 5:03 AM
Unknown Object (File)
Sat, May 31, 11:28 PM
Unknown Object (File)
Sat, May 31, 5:31 PM
Unknown Object (File)
Fri, May 30, 5:29 AM
Subscribers

Details

Reviewers
imp
Summary

make world was deprecated more than two decades ago and is a bad and dangerous approach. Belatedly remove it.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste requested review of this revision.May 9 2025, 8:42 PM
emaste created this revision.

Sir when you merge this please note that I disapproved. This code is not causing any problems.

There are a few handbook references to make world. Some of them are bad - e.g.

it is possible to compile the entire operating system just by typing make world in the appropriate directory!

When I was a kid, I was in awe by the unbelievable simplicity and elegance of that statement.

But that statement is not correct, it is missing "and overwrite the running system" after "compile"

emaste retitled this revision from Makefile: Remove `make world` logic to Makefile: Remove `make world` and `make kernel`.

Also make kernel

If you want to remove them from build(7) so the commit is atomic for our downstream, I have no problem resolving the conflict in my build(7) draft.

This also needs to be in UPDATING and Relnotes, I think, since it is a breaking change of decades of behavior.

imp requested changes to this revision.Thu, May 22, 1:44 PM
imp added a subscriber: imp.

I think this is a bad idea

This revision now requires changes to proceed.Thu, May 22, 1:44 PM

I think this is a bad idea

Can you expand on why? Builds should not be run as root, in general, and this approach (build and immediately install) is inconsistent with the build system implemented for just about every other piece of software.

There are cases were building and installing as root may be fine (ephemeral test machines and CI environments, say), but this can be easily achieved in one make invocation with two targets listed.

Doc updates to remove make world: D50471

I think this is a bad idea

Can you expand on why? Builds should not be run as root, in general, and this approach (build and immediately install) is inconsistent with the build system implemented for just about every other piece of software.

There are cases were building and installing as root may be fine (ephemeral test machines and CI environments, say), but this can be easily achieved in one make invocation with two targets listed.

So tools not rules does come to mind... It's fine on my laptop, for example.. It's totally fine if you do it single user as well... But I don't actually use it...

We don't support pre-world and post-world otherwise. We added these in 1996... And generally, this has been here a really long time, and it still works so history suggests that it's still in use somewhere, wise or not...

So unless it's actually broken, we likely should do a more robust deprecation process to see who is still using it.

I'm cool removing it from the docs, but we don't have data to know whether or not it's in use and its removal would cause hardship... I kinda doubt it, but this is the sort of weird corner case that people have kept using since it works. So it's unwise as a drive by...

So having thought about that, I kinda stand by the 'we should ask' but I also think we should definitely kill world for sure. But we should talk about it since one can do 'make world -DNO_ROOT DESTDIR=/blah/blah/blah' But that's unlikely to be in use, but it could be done safely-ish and stranger things have happened... But yea, I think I'm more supportive of the removal in 15 than I originally was. It would need more framing in the release notes, I think.

This revision is now accepted and ready to land.Mon, May 26, 3:14 AM