Fix bmake version upgrade logic to use the new bmake.

Otherwise it was only used on the next build.

This was a flaw in r295980.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-06-05 23:04:15 +00:00
parent 96306ff24d
commit bd2464674d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301465

View File

@ -170,9 +170,13 @@ HAVE_MAKE= bmake
.else .else
HAVE_MAKE= fmake HAVE_MAKE= fmake
.endif .endif
.if ${HAVE_MAKE} != ${WANT_MAKE} || \
(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
NEED_MAKE_UPGRADE= t
.endif
.if exists(${MYMAKE}) .if exists(${MYMAKE})
SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk
.elif ${WANT_MAKE} != ${HAVE_MAKE} .elif defined(NEED_MAKE_UPGRADE)
# It may not exist yet but we may cause it to. # It may not exist yet but we may cause it to.
# In the case of fmake, upgrade_checks may cause a newer version to be built. # In the case of fmake, upgrade_checks may cause a newer version to be built.
SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \ SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \
@ -313,8 +317,7 @@ kernel: buildkernel installkernel
# for building the world. # for building the world.
# #
upgrade_checks: upgrade_checks:
.if ${HAVE_MAKE} != ${WANT_MAKE} || \ .if defined(NEED_MAKE_UPGRADE)
(defined(WANT_MAKE_VERSION) && ${MAKE_VERSION} < ${WANT_MAKE_VERSION})
@${_+_}(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,}) @${_+_}(cd ${.CURDIR} && ${MAKE} ${WANT_MAKE:S,^f,,})
.endif .endif