summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pratt2024-10-03 05:06:04 +0000
committerRobert Marko2025-07-26 12:38:08 +0000
commitf7fd8303be53598633426830f31b9818b32d2521 (patch)
treed5dcd79aa874dd84e18cfdc619dade2b8e98ef72
parentf197b5827a2836d87b95c95f9a638b1073a33e61 (diff)
downloadopenwrt-f7fd8303be53598633426830f31b9818b32d2521.tar.gz
tools: build coreutils for development targets
Include the coreutils utilities required for macOS and other non-GNU friendly OSs to products like the SDK. This also allows manually building coreutils on Linux without having to manually edit this Makefile. Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--tools/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/Makefile b/tools/Makefile
index c2b36361a4..81d034f993 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -97,6 +97,7 @@ $(curdir)/bison/compile := $(curdir)/flex/compile
$(curdir)/bzip2/compile := $(curdir)/cmake/compile
$(curdir)/cbootimage/compile += $(curdir)/automake/compile
$(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(curdir)/expat/compile $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/zstd/compile
+$(curdir)/coreutils/compile := $(curdir)/automake/compile $(curdir)/bison/compile $(curdir)/gnulib/compile
$(curdir)/dosfstools/compile := $(curdir)/automake/compile
$(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile $(curdir)/util-linux/compile
$(curdir)/elfutils/compile := $(curdir)/m4/compile $(curdir)/zlib/compile $(curdir)/gnulib/compile $(curdir)/libtool/compile
@@ -136,10 +137,14 @@ $(curdir)/util-linux/compile := $(curdir)/bison/compile $(curdir)/automake/compi
$(curdir)/yafut/compile := $(curdir)/cmake/compile
ifneq ($(HOST_OS),Linux)
- $(curdir)/coreutils/compile += $(curdir)/automake/compile $(curdir)/bison/compile $(curdir)/gnulib/compile
- $(curdir)/squashfs4/compile += $(curdir)/coreutils/compile
tools-y += coreutils
+else
+ tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_SDK),y) += coreutils
endif
+ifneq ($(filter coreutils,$(tools-y)),)
+ $(curdir)/squashfs4/compile += $(curdir)/coreutils/compile
+endif
+
ifeq ($(HOST_OS),Darwin)
tools-y += bash
else