diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-02 20:45:04 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-02 20:45:04 +0000 |
commit | 89bd07e927051c2d806de8e735aa1de750fdecd5 (patch) | |
tree | 3eba2165b84afafe8ebc0a4a832366be60126a65 /share/mk/local.dirdeps.mk | |
parent | e22fef7dc1daad9b476ecdba180445fd1af6ca1c (diff) | |
download | src-89bd07e927051c2d806de8e735aa1de750fdecd5.tar.gz src-89bd07e927051c2d806de8e735aa1de750fdecd5.zip |
Notes
Diffstat (limited to 'share/mk/local.dirdeps.mk')
-rw-r--r-- | share/mk/local.dirdeps.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index 45581da7c0a7..85f7bbf052c0 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -49,6 +49,20 @@ DIRDEPS_FILTER.host = \ DIRDEPS_FILTER+= \ Nbin/cat.host \ ${DIRDEPS_FILTER.xtras:U} + +# Cleanup a buildworld's WORLDTMP so that any files generated from it +# or using it will rebuild with the DIRDEPS SYSROOT. Otherwise existing +# object .meta files may still reference those directories and not be +# rebuilt and lead to incorrect Makefile.depend files due to lack of +# .dirdep files. +.if !defined(NO_CLEANUP_WORLDTMP) && exists(${OBJTOP}/tmp/_worldtmp) +cleanup_worldtmp: .PHONY .NOMETA + @echo "Cleaning leftover WORLDTMP from buildworld." + -rm -rf ${OBJTOP}/tmp/* + -chflags -R 0 ${OBJTOP}/tmp/* + rm -rf ${OBJTOP}/tmp +beforedirdeps: cleanup_worldtmp +.endif .endif # reset this each time |