diff --git a/support/dependencies/check-host-coreutils.mk b/support/dependencies/check-host-coreutils.mk new file mode 100644 index 0000000000..87a3f446ea --- /dev/null +++ b/support/dependencies/check-host-coreutils.mk @@ -0,0 +1,6 @@ +# Check whether the host's coreutils are up to date enough +# to provide 'ln --relative' and 'realpath'. + +ifeq (,$(call suitable-host-package,coreutils)) +BR2_COREUTILS_HOST_DEPENDENCY = host-coreutils +endif diff --git a/support/dependencies/check-host-coreutils.sh b/support/dependencies/check-host-coreutils.sh new file mode 100755 index 0000000000..4d36d74933 --- /dev/null +++ b/support/dependencies/check-host-coreutils.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Exit on the first error +set -e + +# Does ln supports the --relative/-r option? +ln --relative --help >/dev/null 2>&1 + +# Does realpath exist? +realpath --help >/dev/null 2>&1 + +echo OK