Skip to content

Commit ee61b8b

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 786206f commit ee61b8b

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
@@ -379,6 +379,11 @@ jobs:
379379
set -x
380380
# Regression-test for https://github.com/uutils/coreutils/issues/8701
381381
make UTILS="rm chmod chown chgrp mv du"
382+
# Verifies that
383+
# 1. there is no "error: none of the selected packages contains this
384+
# feature: feat_external_libstdbuf"
385+
# 2. the makefile doesn't try to install libstdbuf even though stdbuf is skipped
386+
DESTDIR=/tmp/ make SKIP_UTILS="stdbuf" install
382387
383388
build_rust_stable:
384389
name: Build/stable

GNUmakefile

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

483483
install: build install-manpages install-completions install-locales
484484
mkdir -p $(INSTALLDIR_BIN)
485-
ifneq ($(OS),Windows_NT)
485+
ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS))))
486486
mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR)
487487
$(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf* $(DESTDIR)$(LIBSTDBUF_DIR)/
488488
endif

0 commit comments

Comments
 (0)