From 98edb545c90175d7a9a799d90c6015b5d26cb500 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 2 Feb 2018 17:17:59 +0100 Subject: [PATCH] [xharness] Store a computed make variable in a temporary variable to avoid computing it many times. (#3382) This makes `make` in (with nothing to do) run 18x faster in tests/ (from 1.3s to 0.07s). --- tests/xharness/MakefileGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xharness/MakefileGenerator.cs b/tests/xharness/MakefileGenerator.cs index acc8f1196b..d2e9a492c2 100644 --- a/tests/xharness/MakefileGenerator.cs +++ b/tests/xharness/MakefileGenerator.cs @@ -179,10 +179,11 @@ namespace xharness } writer.WriteLine ("# Env Variables to use local not system XM"); writer.WriteLine (); + writer.WriteLine ("MD_APPLE_SDK_ROOT_EVALUATED:=$(shell dirname `dirname $(XCODE_DEVELOPER_ROOT)`)"); var enviromentalVariables = new Dictionary () { { "XBUILD_FRAMEWORK_FOLDERS_PATH", "$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks"}, { "MSBuildExtensionsPath", "$(MAC_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild"}, - { "MD_APPLE_SDK_ROOT", "$(shell dirname `dirname $(XCODE_DEVELOPER_ROOT)`)"} + { "MD_APPLE_SDK_ROOT", "$(MD_APPLE_SDK_ROOT_EVALUATED)"} }; foreach (var key in enviromentalVariables) {