diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-12-03 16:03:14 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-03-21 15:25:02 +0100 |
commit | 17b11d59be05bfde602f99c1bdafe4b97db9ff53 (patch) | |
tree | 27b1b840c2ae7b111924a4f2ca389ee2baab5bd2 /backport/scripts/make | |
parent | 368e8c51a59629ea7d681f5b96d4f5a9f89ad1a6 (diff) |
backports: significantly speed up build
Upstream commit a17ed9f1fcd12d56757bc33a275d5dfa98d7e75e
When building with /bin/sh -> bash, things are SUPER slow (at least
for me), because bash takes a LOOONG time to look at the environment
variables (and we typically have around 6k), adding over a second to
each bash invocation for me.
The reason we export them is that we need them in all of the sub-
makes, and those only read auto.conf, which we can't change.
Work around this by overriding 'make' itself, and using --eval to
read *our* .config file into each make that gets called. This way,
the variables are present in all make invocations in the same way
as they would be through the environment, but don't get passed to
shell invocations.
If --eval is not supported, keep doing what we did before.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/scripts/make')
-rwxr-xr-x | backport/scripts/make | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backport/scripts/make b/backport/scripts/make new file mode 100755 index 00000000..cff7d003 --- /dev/null +++ b/backport/scripts/make @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +exec make --eval '-include $(BACKPORT_DIR)/.config' "$@" |