Re: svn commit: r289778 - head/share/mk
On Thu, 2015-10-22 at 17:21 -0700, Bryan Drewery wrote: > > On Oct 22, 2015, at 17:18, Bryan Drewery> > wrote: > > > > > > > > > > On Oct 22, 2015, at 16:59, Ian Lepore wrote: > > > > > > > > On Thu, 2015-10-22 at 23:41 +, Bryan Drewery wrote: > > > > Author: bdrewery > > > > Date: Thu Oct 22 23:41:56 2015 > > > > New Revision: 289778 > > > > URL: https://svnweb.freebsd.org/changeset/base/289778 > > > > > > > > Log: > > > > For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' > > > > there > > > > is no need to > > > > respect SUBDIR_DEPEND_* or .WAIT. > > > > > > > > MFC after:2 weeks > > > > Sponsored by:EMC / Isilon Storage Division > > > > > > This doesn't feel so safe. People override these targets and do > > > who > > > -knows-what with them. The clean* seems especially risky since > > > it will > > > match targets in end-user makefiles that you don't even know > > > about. > > I can also not apply to SUBDIR_TARGETS which is the user-defined > targets list. (Misspelled and should be LOCAL_SUBDIR_TARGETS) > That might be a good idea. When I grepped our devel/mk directory, SUBDIR_TARGETS was where I saw a number of things that would match clean* (I didn't look into exactly what they do). -- Ian > > > > > > -- Ian > > > > I can limit it to src tree builds if you want. > > > > I cannot imagine any situation where "clean" depends on > > another directory going first. > > > > Similarly it makes sense to always build subdirs in parallel with > > 'obj' and I would argue 'clean*' too, regardless of > > SUBDIR_PARALLEL. I only just realized that. Yes there are mkdir -p > > and rm -f races, but we have not added any dependencies because of > > these as is. > > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r289778 - head/share/mk
On Thu, 2015-10-22 at 23:41 +, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 22 23:41:56 2015 > New Revision: 289778 > URL: https://svnweb.freebsd.org/changeset/base/289778 > > Log: > For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there > is no need to > respect SUBDIR_DEPEND_* or .WAIT. > > MFC after: 2 weeks > Sponsored by: EMC / Isilon Storage Division This doesn't feel so safe. People override these targets and do who -knows-what with them. The clean* seems especially risky since it will match targets in end-user makefiles that you don't even know about. -- Ian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r289778 - head/share/mk
Author: bdrewery Date: Thu Oct 22 23:41:56 2015 New Revision: 289778 URL: https://svnweb.freebsd.org/changeset/base/289778 Log: For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to respect SUBDIR_DEPEND_* or .WAIT. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Thu Oct 22 23:08:08 2015(r289777) +++ head/share/mk/bsd.subdir.mk Thu Oct 22 23:41:56 2015(r289778) @@ -83,6 +83,15 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; +# .WAIT and dependencies can be skipped for some targets. +.if defined(SUBDIR_PARALLEL) +.if make(obj) || make(clean*) +_skip_subdir_ordering= 1 +SUBDIR:= ${SUBDIR:N.WAIT} +.else +_skip_subdir_ordering= 0 +.endif +.endif # defined(SUBDIR_PARALLEL) # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} @@ -94,9 +103,11 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} __deps= +.if ${_skip_subdir_ordering} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor +.endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}target=${__target:realinstall=install}; \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r289778 - head/share/mk
> On Oct 22, 2015, at 16:59, Ian Leporewrote: > >> On Thu, 2015-10-22 at 23:41 +, Bryan Drewery wrote: >> Author: bdrewery >> Date: Thu Oct 22 23:41:56 2015 >> New Revision: 289778 >> URL: https://svnweb.freebsd.org/changeset/base/289778 >> >> Log: >> For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there >> is no need to >> respect SUBDIR_DEPEND_* or .WAIT. >> >> MFC after:2 weeks >> Sponsored by:EMC / Isilon Storage Division > > This doesn't feel so safe. People override these targets and do who > -knows-what with them. The clean* seems especially risky since it will > match targets in end-user makefiles that you don't even know about. > > -- Ian > > I can limit it to src tree builds if you want. I cannot imagine any situation where "clean" depends on another directory going first. Similarly it makes sense to always build subdirs in parallel with 'obj' and I would argue 'clean*' too, regardless of SUBDIR_PARALLEL. I only just realized that. Yes there are mkdir -p and rm -f races, but we have not added any dependencies because of these as is. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r289778 - head/share/mk
> On Oct 22, 2015, at 17:18, Bryan Drewerywrote: > > > >>> On Oct 22, 2015, at 16:59, Ian Lepore wrote: >>> >>> On Thu, 2015-10-22 at 23:41 +, Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Thu Oct 22 23:41:56 2015 >>> New Revision: 289778 >>> URL: https://svnweb.freebsd.org/changeset/base/289778 >>> >>> Log: >>> For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there >>> is no need to >>> respect SUBDIR_DEPEND_* or .WAIT. >>> >>> MFC after:2 weeks >>> Sponsored by:EMC / Isilon Storage Division >> >> This doesn't feel so safe. People override these targets and do who >> -knows-what with them. The clean* seems especially risky since it will >> match targets in end-user makefiles that you don't even know about. I can also not apply to SUBDIR_TARGETS which is the user-defined targets list. (Misspelled and should be LOCAL_SUBDIR_TARGETS) >> >> -- Ian > > I can limit it to src tree builds if you want. > > I cannot imagine any situation where "clean" depends on another > directory going first. > > Similarly it makes sense to always build subdirs in parallel with 'obj' and I > would argue 'clean*' too, regardless of SUBDIR_PARALLEL. I only just realized > that. Yes there are mkdir -p and rm -f races, but we have not added any > dependencies because of these as is. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"