From 271aef82bd71e8628c5f1bfd40513777c9bbca50 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 4 Oct 2024 20:07:03 +0100 Subject: [PATCH] defs.mak.in: replace backtick with $(shell ...) Previously the variable resolution was passed to compiler command line when ideally this only needs to be resolved once per build and the entrie build uses the same value. Compiler command line is computed at least once per file (plus Depends pass), so this is forking at least 5 extra times during the build. This improves things somewhat so resolution is performed less. This may have the effect of making the build appear faster when ccache is working. As the command line options maybe seen as a constant. --- scripts/defs.mak.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/defs.mak.in b/scripts/defs.mak.in index 6f93575b..20a6eaf1 100755 --- a/scripts/defs.mak.in +++ b/scripts/defs.mak.in @@ -75,9 +75,9 @@ LIB_SPECS_NOSTUB = @LIB_SPECS_NOSTUB@ LIB_SPECS_GRNULL = @LIB_SPECS_GRNULL@ WISH_EXE = @WISH_EXE@ TCL_LIB_DIR = @TCL_LIB_DIR@ -MAGIC_VERSION = `cat ../VERSION | cut -d. -f1-2` -MAGIC_REVISION = `cat ../VERSION | cut -d. -f3` -MAGIC_COMMIT = `git rev-parse HEAD` +MAGIC_VERSION = $(shell cat ${MAGICDIR}/VERSION | cut -d. -f1-2) +MAGIC_REVISION = $(shell cat ${MAGICDIR}/VERSION | cut -d. -f3) +MAGIC_COMMIT = $(shell git rev-parse HEAD) CC = @CC@ CPP = @CPP@