Message ID | 20200812094912.2648-1-martin.kaistra@linutronix.de (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Shuah Khan |
Headers | show |
Series | cpupower: speed up generating git version string | expand |
Am Mittwoch, 12. August 2020, 11:49:12 CEST schrieb Martin Kaistra: > The variable VERSION is expanded for every use of CFLAGS. This causes > "git describe" to get called multiple times on the kernel tree, which > can be quite slow. > > The git revision does not change during build, so we can use simple > variable expansion to set VERSION. Good catch, thanks! Acked-by: Thomas Renninger <trenn@suse.de>
On 8/20/20 4:27 AM, Thomas Renninger wrote: > Am Mittwoch, 12. August 2020, 11:49:12 CEST schrieb Martin Kaistra: >> The variable VERSION is expanded for every use of CFLAGS. This causes >> "git describe" to get called multiple times on the kernel tree, which >> can be quite slow. >> >> The git revision does not change during build, so we can use simple >> variable expansion to set VERSION. > > Good catch, thanks! > > Acked-by: Thomas Renninger <trenn@suse.de> > > Thanks. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower branch for my next pull request to Rafael. thanks, -- Shuah
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index c8622497ef23..c7bcddbd486d 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -51,7 +51,7 @@ DESTDIR ?= # Package-related definitions. Distributions can modify the version # and _should_ modify the PACKAGE_BUGREPORT definition -VERSION= $(shell ./utils/version-gen.sh) +VERSION:= $(shell ./utils/version-gen.sh) LIB_MAJ= 0.0.1 LIB_MIN= 0
The variable VERSION is expanded for every use of CFLAGS. This causes "git describe" to get called multiple times on the kernel tree, which can be quite slow. The git revision does not change during build, so we can use simple variable expansion to set VERSION. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> --- tools/power/cpupower/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)