diff options
author | Andy Boyett <agb@agb.io> | 2018-05-16 22:09:57 -0700 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-18 21:27:01 +0200 |
commit | 591780615b304fb4624e363135942e9ee8f6caa3 (patch) | |
tree | 68cf2c444e7dd882f6beb9f4564939fdef8421cc /include/subdir.mk | |
parent | b1a173d7c396c0a9e6bb0078a1a061eb9fdd0316 (diff) | |
download | upstream-591780615b304fb4624e363135942e9ee8f6caa3.tar.gz upstream-591780615b304fb4624e363135942e9ee8f6caa3.tar.bz2 upstream-591780615b304fb4624e363135942e9ee8f6caa3.zip |
build: add busybox support to `time` prereq-check
Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in ff6e62b288c, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.
As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.
Signed-off-by: Andy Boyett <agb@agb.io>
Diffstat (limited to 'include/subdir.mk')
-rw-r--r-- | include/subdir.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/subdir.mk b/include/subdir.mk index ed4f7537d5..dde3e50b0b 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -43,7 +43,7 @@ log_make = \ $(if $(BUILD_LOG), \ set -o pipefail; \ mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ - gtime -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \ + env time -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \ $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2).txt) |