mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <oss-lists@triops.cz>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] psmisc: more finegrained tool instalation control
Date: Wed, 14 Sep 2022 17:10:55 +0200	[thread overview]
Message-ID: <YyHu/412LT8uQTy1@lenoch> (raw)

From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 13 Sep 2022 11:08:59 +0200

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 rules/psmisc.in   | 42 ++++++++++++++++++++++++++++++++++++------
 rules/psmisc.make | 20 +++++++++++++-------
 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)
 
-- 
2.32.0




             reply	other threads:[~2022-09-19 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 15:10 Ladislav Michl [this message]
2022-09-28 14:29 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YyHu/412LT8uQTy1@lenoch \
    --to=oss-lists@triops.cz \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox