summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2022-09-13 11:08:59 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2022-09-22 17:20:23 +0200
commit0dabc5a09715b7ec1e77544e620d0499e27c6254 (patch)
tree9172950831c0a7bc5c6fb970ebdf2b02c1f660ce
parentc04ce8074ac3adfa2003d9b7bd73a7229b5221c0 (diff)
downloadptxdist-0dabc5a09715b7ec1e77544e620d0499e27c6254.tar.gz
ptxdist-0dabc5a09715b7ec1e77544e620d0499e27c6254.tar.xz
psmisc: more finegrained tool instalation control
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Message-Id: <YyHu/412LT8uQTy1@lenoch> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/psmisc.in42
-rw-r--r--rules/psmisc.make20
2 files changed, 49 insertions, 13 deletions
diff --git a/rules/psmisc.in b/rules/psmisc.in
index 1c3a61414..3d3c7a802 100644
--- a/rules/psmisc.in
+++ b/rules/psmisc.in
@@ -1,18 +1,48 @@
## SECTION=shell_and_console
-config PSMISC
+menuconfig PSMISC
tristate
- depends on ( !BUSYBOX_FUSER && !BUSYBOX_KILLALL && !BUSYBOX_PSTREE ) || ALLYES
select NCURSES
- prompt "psmisc"
+ prompt "psmisc "
help
utilities that use the proc file system
-comment "BusyBox' fuser is selected! (psmisc)"
+if PSMISC
+
+config PSMISC_FUSER
+ bool
+ prompt "fuser"
+ depends on !BUSYBOX_FUSER || ALLYES
+
+comment "BusyBox' fuser is selected!"
depends on BUSYBOX_FUSER
-comment "BusyBox' killall is selected! (psmisc)"
+config PSMISC_KILLALL
+ bool
+ prompt "killall"
+ depends on !BUSYBOX_KILLALL || ALLYES
+
+comment "BusyBox' killall is selected!"
depends on BUSYBOX_KILLALL
-comment "BusyBox' pstree is selected! (psmisc)"
+config PSMISC_PEEKFD
+ bool
+ prompt "peekfd"
+
+config PSMISC_PRTSTAT
+ bool
+ prompt "prtstat"
+
+config PSMISC_PSLOG
+ bool
+ prompt "pslog"
+
+config PSMISC_PSTREE
+ bool
+ prompt "pstree"
+ depends on !BUSYBOX_PSTREE || ALLYES
+
+comment "BusyBox' pstree is selected!"
depends on BUSYBOX_PSTREE
+
+endif
diff --git a/rules/psmisc.make b/rules/psmisc.make
index 66541c615..fdb479877 100644
--- a/rules/psmisc.make
+++ b/rules/psmisc.make
@@ -44,6 +44,16 @@ PSMISC_CONF_OPT := \
# Target-Install
# ----------------------------------------------------------------------------
+PSMISC_BIN-y :=
+PSMISC_BIN-$(PTXCONF_PSMISC_FUSER) += fuser
+PSMISC_BIN-$(PTXCONF_PSMISC_KILLALL) += killall
+ifndef PTXCONF_ARCH_ARM64
+PSMISC_BIN-$(PTXCONF_PSMISC_PEEKFD) += peekfd
+endif
+PSMISC_BIN-$(PTXCONF_PSMISC_PRTSTAT) += prtstat
+PSMISC_BIN-$(PTXCONF_PSMISC_PSLOG) += pslog
+PSMISC_BIN-$(PTXCONF_PSMISC_PSTREE) += pstree
+
$(STATEDIR)/psmisc.targetinstall:
@$(call targetinfo)
@@ -53,13 +63,9 @@ $(STATEDIR)/psmisc.targetinstall:
@$(call install_fixup, psmisc,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
@$(call install_fixup, psmisc,DESCRIPTION,missing)
- @$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/fuser)
- @$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/killall)
-ifndef PTXCONF_ARCH_ARM64
- @$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/peekfd)
-endif
- @$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/prtstat)
- @$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/pstree)
+ @$(foreach tool, $(PSMISC_BIN-y), \
+ $(call install_copy, psmisc, 0, 0, 0755, -, \
+ /usr/bin/$(tool));)
@$(call install_finish, psmisc)