pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/misc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Mon Mar 30 22:49:30 UTC 2020

Modified Files:
        pkgsrc/mk/misc: show.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/mk/misc/show.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/misc/show.mk
diff -u pkgsrc/mk/misc/show.mk:1.19 pkgsrc/mk/misc/show.mk:1.20
--- pkgsrc/mk/misc/show.mk:1.19 Fri Mar 20 16:39:03 2020
+++ pkgsrc/mk/misc/show.mk      Mon Mar 30 22:49:30 2020
@@ -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}
 



Home | Main Index | Thread Index | Old Index