From fb3d959c6625cf17ba8f968c4a6e2caba39cf5ae Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 29 Oct 2017 01:20:53 +0000 Subject: [PATCH] Move FAST_DEPEND cleanup hack into its own target and call from _cleanobj. The _worldtmp target is for setting up WORLDTMP. Nothing between _worldtmp and _cleanobj will read these files. Move to its own target since it is so large. Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 67 ++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4d58d7c7e635..f1ccb5751d95 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -768,41 +768,10 @@ _sanity_check: .PHONY .MAKE @false .endif -_worldtmp: .PHONY - @echo - @echo "--------------------------------------------------------------" - @echo ">>> Rebuilding the temporary build tree" - @echo "--------------------------------------------------------------" -.if !defined(NO_CLEAN) - rm -rf ${WORLDTMP} -.if defined(LIBCOMPAT) - rm -rf ${LIBCOMPATTMP} -.endif -.else -.if exists(${WORLDTMP}) - @echo ">>> Deleting stale files in build tree..." - ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ - delete-old delete-old-libs >/dev/null -.endif -.if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP}) - ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ - DESTDIR=${LIBCOMPATTMP} \ - delete-old delete-old-libs >/dev/null -.endif - rm -rf ${WORLDTMP}/legacy/usr/include -.if ${USING_SYSTEM_COMPILER} == "yes" -.for cc in cc c++ - if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \ - inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \ - find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \ - fi -.endfor -.endif # ${USING_SYSTEM_COMPILER} == "yes" - # Our current approach to dependency tracking cannot cope with certain source # tree changes, particularly with respect to removing source files and # replacing generated files. Handle these cases here in an ad-hoc fashion. -# +_cleanobj_fast_depend_hack: .PHONY # Syscall stubs rewritten in C # Date SVN Rev Syscalls # 20160829 r305012 ptrace @@ -841,6 +810,36 @@ _worldtmp: .PHONY .endif .endfor +_worldtmp: .PHONY + @echo + @echo "--------------------------------------------------------------" + @echo ">>> Rebuilding the temporary build tree" + @echo "--------------------------------------------------------------" +.if !defined(NO_CLEAN) + rm -rf ${WORLDTMP} +.if defined(LIBCOMPAT) + rm -rf ${LIBCOMPATTMP} +.endif +.else +.if exists(${WORLDTMP}) + @echo ">>> Deleting stale files in build tree..." + ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ + delete-old delete-old-libs >/dev/null +.endif +.if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP}) + ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ + DESTDIR=${LIBCOMPATTMP} \ + delete-old delete-old-libs >/dev/null +.endif + rm -rf ${WORLDTMP}/legacy/usr/include +.if ${USING_SYSTEM_COMPILER} == "yes" +.for cc in cc c++ + if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \ + inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \ + find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \ + fi +.endfor +.endif # ${USING_SYSTEM_COMPILER} == "yes" .endif # !defined(NO_CLEAN) .for _dir in \ @@ -898,7 +897,9 @@ _cleanobj: .if defined(LIBCOMPAT) ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR} .endif -.endif +.else + ${_+_}cd ${.CURDIR}; ${WMAKE} _cleanobj_fast_depend_hack +.endif # !defined(NO_CLEAN) _obj: @echo @echo "--------------------------------------------------------------"