mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
common.mak: Fix slow build
The relative subdirectory path of a build target is determined via a separate shell command that issues 'cd' and 'pwd'. Spawning a separate shell is very costly and can lead to extremely slow builds in some circumstances. Replace the shell command with the make built-in command 'realpath' to accomplish the same result more efficiently. Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
2c7e61a6c7
commit
908067bdf9
@@ -22,8 +22,7 @@ DISTRELEASE = build-$(shell date +%Y%m%d)
|
||||
S390_TOOLS_RELEASE = $(VERSION).$(RELEASE).$(PATCHLEVEL)-$(DISTRELEASE)
|
||||
export S390_TOOLS_RELEASE
|
||||
|
||||
reldir = $(subst $(shell cd -P $(dir $(filter %common.mak,$(MAKEFILE_LIST))); \
|
||||
pwd)/,,$(CURDIR))
|
||||
reldir = $(subst $(realpath $(dir $(filter %common.mak,$(MAKEFILE_LIST))))/,,$(CURDIR))
|
||||
rootdir= $(dir $(filter %common.mak,$(MAKEFILE_LIST)))
|
||||
export S390_TEST_LIB_PATH=$(rootdir)/s390-tools-testsuite/lib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user