diff options
author | rillig <rillig@pkgsrc.org> | 2020-03-30 22:49:30 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-03-30 22:49:30 +0000 |
commit | a503fa2dd9a8f5037a193aa468fa445a3380b771 (patch) | |
tree | 4c92db8aa598890e0d828f9a28fff6b1832306c9 /mk | |
parent | dddf8a629b269c74d223185cea127d4a9d5ca50f (diff) | |
download | pkgsrc-a503fa2dd9a8f5037a193aa468fa445a3380b771.tar.gz |
mk/misc/show.mk: prevent unnecessary .for loop expansion
The .for loops are expanded by bmake as soon as they are parsed. Since
there are many variable groups, and since each of these groups has
several variables, this takes quite a bit of time.
The time for running "bmake clean" in pkgtools/pkglint went down from 1.0
second to 0.7 seconds. This may not seem much, but when multiplied with
23088 times 9, this little change may speed up a full bulk build by 62000
seconds, which is about 18 hours.
The side-effect is that the show-all-* targets can only be run from the
command line, not as a dependency of other targets. This restriction will
probably go unnoticed.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/misc/show.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/misc/show.mk b/mk/misc/show.mk index 89e3f5e291d..0c8f2ff0a59 100644 --- a/mk/misc/show.mk +++ b/mk/misc/show.mk @@ -1,4 +1,4 @@ -# $NetBSD: show.mk,v 1.19 2020/03/20 16:39:03 rillig Exp $ +# $NetBSD: show.mk,v 1.20 2020/03/30 22:49:30 rillig Exp $ # # This file contains some targets that print information gathered from # variables. They do not modify any variables. @@ -153,7 +153,7 @@ _LABEL._USE_VARS= use _LABEL._DEF_VARS= def show-all: .PHONY -.for g in ${_VARGROUPS:O:u} +.for g in ${"${.TARGETS:Mshow-all*}":?${_VARGROUPS:O:u}:} show-all: show-all-${g} |