Skip to content

Commit 33d698b

Browse files
oech3sylvestre
authored andcommitted
GNUmakefile: Do not depend on system tr for Gentoo
1 parent 6ccfd3a commit 33d698b

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

GNUmakefile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,19 @@ ifneq (,$(findstring windows,$(OS)))
7474
endif
7575
LN ?= ln -sf
7676

77-
# Possible programs
78-
PROGS := \
79-
$(shell sed -n '/feat_Tier1 = \[/,/\]/p' Cargo.toml | sed '1d;2d' |tr -d '],"\n')\
80-
$(shell sed -n '/feat_common_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n')
81-
82-
UNIX_PROGS := \
83-
$(shell sed -n '/feat_require_unix_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n') \
84-
hostid \
85-
pinky \
86-
stdbuf \
87-
uptime \
88-
users \
89-
who
90-
9177
SELINUX_PROGS := \
9278
chcon \
9379
runcon
9480

9581
$(info Detected OS = $(OS))
9682

9783
ifeq (,$(findstring windows,$(OS)))
98-
PROGS += $(UNIX_PROGS)
84+
FEATURE_EXTRACT_UTILS := feat_os_unix
85+
else
86+
FEATURE_EXTRACT_UTILS := feat_Tier1
9987
endif
88+
PROGS := $(shell cargo tree --depth 1 --features $(FEATURE_EXTRACT_UTILS) --format "{p}" --prefix none | sed -E -n 's/^uu_([^ ]+).*/\1/p')
89+
10090
ifeq ($(SELINUX_ENABLED),1)
10191
PROGS += $(SELINUX_PROGS)
10292
endif
@@ -111,7 +101,7 @@ endif
111101
# Programs with usable tests
112102

113103
TESTS := \
114-
$(sort $(filter $(UTILS),$(PROGS) $(UNIX_PROGS) $(SELINUX_PROGS)))
104+
$(sort $(filter $(UTILS),$(PROGS) $(SELINUX_PROGS)))
115105

116106
TEST_NO_FAIL_FAST :=
117107
TEST_SPEC_FEATURE :=

0 commit comments

Comments
 (0)