Date: Mon, 25 Jun 2018 18:53:06 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335643 - stable/11/share/mk Message-ID: <201806251853.w5PIr6dp054840@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Mon Jun 25 18:53:06 2018 New Revision: 335643 URL: https://svnweb.freebsd.org/changeset/base/335643 Log: MFC r321427,r321445: r321427: PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS. r321445: cleandir: Fix ESTALE errors from parallel removals. Modified: stable/11/share/mk/bsd.obj.mk stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.obj.mk ============================================================================== --- stable/11/share/mk/bsd.obj.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.obj.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -157,6 +157,7 @@ whereobj: @echo ${.OBJDIR} .endif +# Same check in bsd.progs.mk .if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) cleanobj: -rm -rf ${CANONICALOBJDIR} @@ -182,9 +183,9 @@ clean: .endif .ORDER: clean all -cleandir: cleanobj - .include <bsd.subdir.mk> + +cleandir: .WAIT cleanobj .if make(destroy*) && defined(OBJROOT) # this (rm -rf objdir) is much faster and more reliable than cleaning. Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.progs.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -116,7 +116,16 @@ ${_PROGS_COMMON_OBJS}: .NOMETA .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install +PROGS_TARGETS+= checkdpadd clean depend install +# Only handle removing depend files from the main process. +_PROG_MK.cleandir= CLEANDEPENDFILES= CLEANDEPENDDIRS= +_PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS= +# Only recurse on these if there is no objdir, meaning a normal +# 'clean' gets ran via the target defined in bsd.obj.mk. +# Same check from cleanobj: in bsd.obj.mk +.if ${CANONICALOBJDIR} == ${.CURDIR} || !exists(${CANONICALOBJDIR}/) +PROGS_TARGETS+= cleandir cleanobj +.endif # Ensure common objects are built before recursing. .if !empty(_PROGS_COMMON_OBJS) @@ -142,7 +151,7 @@ $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ - PROG=$p ${x.$p} ${@:E}) + ${_PROG_MK.${t}} PROG=$p ${x.$p} ${@:E}) .endfor .endfor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806251853.w5PIr6dp054840>