From 350d8cd4388361f6554091db2dee6652a1a62e81 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sun, 15 Mar 2026 01:28:00 +0900 Subject: [PATCH] GNUmakefile: Do not depend on tr --- Cargo.toml | 7 ++++++- GNUmakefile | 13 +++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a65caa1fbca..7938859de63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -295,7 +295,12 @@ feat_require_unix_core = [ ] # "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support # * ref: -feat_require_unix_utmpx = ["pinky", "uptime", "users", "who"] +feat_require_unix_utmpx = [ + "users", + "uptime", + "who", + "pinky" +] # "feat_require_unix_hostid" == set of utilities requiring gethostid in libc (only some unixes provide) feat_require_unix_hostid = ["hostid"] # "feat_require_selinux" == set of utilities depending on SELinux. diff --git a/GNUmakefile b/GNUmakefile index ae266b6c277..db3acc481a3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -79,17 +79,14 @@ LN ?= ln -sf # Possible programs PROGS := \ - $(shell sed -n '/feat_Tier1 = \[/,/\]/p' Cargo.toml | sed '1d;2d' |tr -d '],"\n')\ - $(shell sed -n '/feat_common_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n') + $(sed -n '/feat_Tier1 = \[/,/\]/{s/[,"]//g;/common_core/d;/^ /p}' Cargo.toml)\ + $(shell sed -n '/feat_common_core = \[/,/\]/{s/[,"]//g;/^ /p}' Cargo.toml) UNIX_PROGS := \ - $(shell sed -n '/feat_require_unix_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n') \ + $(shell sed -n '/feat_require_unix_core = \[/,/\]/{s/[,"]//g;/^ /p}' Cargo.toml) \ + $(shell sed -n '/feat_require_unix_utmpx = \[/,/\]/{s/[,"]//g;/^ /p}' Cargo.toml) \ hostid \ - pinky \ - stdbuf \ - uptime \ - users \ - who + stdbuf SELINUX_PROGS := \ chcon \