]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
META_MODE: Fix build-tools still sometimes rebuilding during target build.
authorbdrewery <bdrewery@FreeBSD.org>
Thu, 6 Apr 2017 18:21:59 +0000 (18:21 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Thu, 6 Apr 2017 18:21:59 +0000 (18:21 +0000)
commit184595ed9f64a53ebc55792ee8a4a7a8716f2f3a
tree452fdfe4f12c7fa89308396b46f4563f1db53a18
parent07ea80133fc79cbff49ca6c12185cc7c48927110
META_MODE: Fix build-tools still sometimes rebuilding during target build.

In a cross-build, the build-tools are native host binaries.  We do not
want to rebuild them when building for the target.  Bmake previously
did not support checking .NOMETA on an existing target, so .NOMETA_CMP
was used here.  However, .NOMETA_CMP still triggers meta mode conditions
if the number of commands or the command changes.  In r312467 the paths
to build ncurses files were modified and thus triggered meta mode to
rebuild the build tools (make_keys, make_hash) in ncurses during the
target build.  Bmake 20160604 committed in r301462 changed .NOMETA to
also skip meta mode logic for an existing .meta file as well, thus it
is now the proper fix here.

I explored moving the build-tools output to WORLDTMP/tools with
relatively good success, but have concerns that doing so would be
problematic for downstream vendors who use LOCAL_TOOL_DIRS and
expect the tools to be in current OBJDIR for the target.  It also
adds more complexity into finding the tools during target build
and handling of where they are for rescue/rescue and
mkcsmapper_static/mkesdb_static which should really not be connected in
build-tools anyway.

MFC after: 2 weeks
Reported by: many
Sponsored by: Dell EMC Isilon
Makefile.inc1
Makefile.libcompat
share/mk/bsd.crunchgen.mk