Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: Fix several issues with bmake upgrade
Firstly, if NEED_MAKE_UPGRADE isn't set, we shouldn't use whatever bootstrapped bmake happens to be lying around. We're not going to re-run the bmake target, so won't make sure it's up-to-date, and thus it could be some ancient unsupported version. We can still, however, optimise setting SUB_MAKE when the file exists, so long as it's guarded by NEED_MAKE_UPGRADE. Secondly, make kernel-toolchain should also bootstrap bmake if needed, since it's supposed to be the subset of buildworld needed for building a kernel. Finally, if there is a stale bootstrapped bmake lying around that isn't needed, delete it, since it will only cause confusion, and as far as I can tell nothing else will clean it up, not even cleandir twice. So as to ensure nobody's doing anything crazy with MYMAKE that would cause us to delete something unexpected, or that would change behaviour by no longer checking exists(${MYMAKE}) and using that regardless of version checks, emit an error if the definition in use is not our own. Reviewed by: emaste, sjg, imp Differential Revision: https://reviews.freebsd.org/D48708
- Loading branch information