build: add busybox support to `time` prereq-check
authorAndy Boyett <agb@agb.io>
Thu, 17 May 2018 05:09:57 +0000 (22:09 -0700)
committerJohn Crispin <john@phrozen.org>
Mon, 18 Jun 2018 19:27:01 +0000 (21:27 +0200)
commit591780615b304fb4624e363135942e9ee8f6caa3
tree68cf2c444e7dd882f6beb9f4564939fdef8421cc
parentb1a173d7c396c0a9e6bb0078a1a061eb9fdd0316
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>
include/prereq-build.mk
include/subdir.mk