META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.
authorbdrewery <bdrewery@FreeBSD.org>
Wed, 23 Sep 2015 22:36:01 +0000 (22:36 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Wed, 23 Sep 2015 22:36:01 +0000 (22:36 +0000)
commit1eb7424b9f59da4a884cce74fa22934f33e10f53
tree76019a0734c2bf26636128f2f7be5b4ca4daa9ef
parent4b8d331ef402171d061ca74f78d61d7fe540d731
META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.

In the first build the TOOLSDIR does not exit yet which causes CC to default
to the sys.mk version.  Once a TOOLSDIR is created during the build though,
this logic was changing CC to ${TOOLSDIR}/usr/bin/cc even though that file
did not exist.  Thus CC went from 'cc' to '/usr/bin/cc' which forced a
rebuild of everything while using the same compiler.  Check that TOOLSDIR is
not empty to avoid this.  If there is actually a TOOLSDIR cc then it will be
used and properly rebuild.

Sponsored by: EMC / Isilon Storage Division
share/mk/local.meta.sys.mk