diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index c5bbf7f11..7c62cc0cb 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -379,6 +379,11 @@ jobs: set -x # Regression-test for https://github.com/uutils/coreutils/issues/8701 make UTILS="rm chmod chown chgrp mv du" + # Verifies that + # 1. there is no "error: none of the selected packages contains this + # feature: feat_external_libstdbuf" + # 2. the makefile doesn't try to install libstdbuf even though stdbuf is skipped + DESTDIR=/tmp/ make SKIP_UTILS="stdbuf" install build_rust_stable: name: Build/stable diff --git a/GNUmakefile b/GNUmakefile index 846bc94f5..04af26315 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -482,7 +482,7 @@ endif install: build install-manpages install-completions install-locales mkdir -p $(INSTALLDIR_BIN) -ifneq ($(OS),Windows_NT) +ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS)))) mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR) $(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf* $(DESTDIR)$(LIBSTDBUF_DIR)/ endif