makefile: fix build with overriden UTILS

The make build was failing when the list of UTILS didn't contain stdbuf.
This fixes this issue by adding feat_externa_libstdbuf only when stdbuf is being compiled.

Fixes https://github.com/uutils/coreutils/issues/8701

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
This commit is contained in:
Etienne Cordonnier
2025-09-25 22:29:45 +02:00
parent ea5c8158d4
commit 873c37691d
2 changed files with 12 additions and 2 deletions
+7
View File
@@ -387,6 +387,13 @@ jobs:
test -h /tmp/usr/local/bin/sha512sum
test -h /tmp/usr/local/bin/shake128sum
test -h /tmp/usr/local/bin/shake256sum
- name: "`make UTILS=XXX`"
shell: bash
run: |
set -x
# Regression-test for https://github.com/uutils/coreutils/issues/8701
make UTILS="rm chmod chown chgrp mv du"
build_rust_stable:
name: Build/stable
needs: [ min_version, deps ]
+5 -2
View File
@@ -219,12 +219,15 @@ ifneq ($(OS),Windows_NT)
PROGS := $(PROGS) $(UNIX_PROGS)
# Build the selinux command even if not on the system
PROGS := $(PROGS) $(SELINUX_PROGS)
# Always use external libstdbuf when building with make (Unix only)
CARGOFLAGS += --features feat_external_libstdbuf
endif
UTILS ?= $(PROGS)
ifneq ($(findstring stdbuf,$(UTILS)),)
# Use external libstdbuf per default. It is more robust than embedding libstdbuf.
CARGOFLAGS += --features feat_external_libstdbuf
endif
# Programs with usable tests
TEST_PROGS := \
base32 \