Skip to content

Commit 065a9f2

Browse files
committed
GNUmakefile: fix installation logic for libstdbuf
It is better to check whether we're actually compiling libstdbuf, rather than to check whether we're on windows, in order to decide whether libstdbuf should get installed. Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
1 parent 3dcfe6c commit 065a9f2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/CICD.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ jobs:
393393
set -x
394394
# Regression-test for https://github.com/uutils/coreutils/issues/8701
395395
make UTILS="rm chmod chown chgrp mv du"
396+
# Verifies that
397+
# 1. there is no "error: none of the selected packages contains this
398+
# feature: feat_external_libstdbuf"
399+
# 2. the makefile doesn't try to install libstdbuf even though stdbuf is skipped
400+
DESTDIR=/tmp/ make SKIP_UTILS="stdbuf" install
396401
397402
build_rust_stable:
398403
name: Build/stable

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ endif
475475

476476
install: build install-manpages install-completions install-locales
477477
mkdir -p $(INSTALLDIR_BIN)
478-
ifneq ($(OS),Windows_NT)
478+
ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS))))
479479
mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR)
480480
$(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf* $(DESTDIR)$(LIBSTDBUF_DIR)/
481481
endif

0 commit comments

Comments
 (0)