support parallel clean
$ make p-clean PR: 222322
This commit is contained in:
parent
83637d5620
commit
1e39127174
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50887
1 changed files with 5 additions and 3 deletions
|
@ -105,8 +105,10 @@ DOC_LOCAL_MK= ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk
|
|||
# Subdirectory glue.
|
||||
.include "doc.subdir.mk"
|
||||
|
||||
# parallel build for target "all"
|
||||
# parallel build for target "all" and "clean"
|
||||
NCPU?= 8
|
||||
p-all:
|
||||
make -V SUBDIR | sed -E 's/[ ]+$$//' | tr " " "\n" | sed -E 's/^/make -C /' | tr '\n' '\0' | xargs -0 -n1 -P${NCPU} /bin/sh -c
|
||||
p-all p-clean:
|
||||
make -V SUBDIR | sed -E 's/[ ]+$$//' | tr " " "\n" | \
|
||||
sed -E 's/^/make -C /; s/$$/ ${.TARGET:S/^p-//}/' | \
|
||||
tr '\n' '\0' | xargs -0 -n1 -P${NCPU} /bin/sh -c
|
||||
|
||||
|
|
Loading…
Reference in a new issue