From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 29 Sep 2022 19:54:22 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1odxjq-000mTr-LC for lore@lore.pengutronix.de; Thu, 29 Sep 2022 19:54:22 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1odxjp-0007ib-WF; Thu, 29 Sep 2022 19:54:22 +0200 Received: from h1.cmg2.smtp.forpsi.com ([81.2.195.188]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odxjX-0007iJ-N4 for ptxdist@pengutronix.de; Thu, 29 Sep 2022 19:54:04 +0200 Received: from lenoch ([176.102.154.174]) by cmgsmtp with ESMTPSA id dxjVoMbxXnYWydxjWoCRJF; Thu, 29 Sep 2022 19:54:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triops.cz; s=f2019; t=1664474043; bh=c2xMWluAca/2O6LkNY+G0gZ3tuzWF9l/XWMt0Y1OtgQ=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=oifQj166Ed2YxhWTsYiSoPS9M18d8AfsubLEgrNlqF7KM6V8GuGYZnw6+HHLHMzB3 XW76lWdYxiqGKzkUelBAH0LsA0XdmABs+KRgXQsNjT9XIL2l5gZ+yUyUGX5mQfcDFT MZg0WDSv+omLj69rDyFLP/pjVuUOxi0+5amqKzScvHhOSJUqMwtArzKn/wtF4vjY0D 101fsKqKQzEMPc2y7F/QGHTpZDrm7G42AbXeXQ12F4UK79Bpo4TLQdqiRhh4yjOH2N HiUh+9jlXdB942BIiSFORdqztpgAfforpg81wo0z4GqkQNKI7Nsj2CShHZs3Jcqf9N oleikraq5Ua2w== Date: Thu, 29 Sep 2022 19:54:01 +0200 From: Ladislav Michl To: ptxdist@pengutronix.de Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CMAE-Envelope: MS4wfL+x/aqJV8l6j+WvEQqMXX+17vSTDZrxkwFVXjXTsXT7Mdejg0rIrtm27OAo5HwPj577rI3x6/m9hCs/UrZhzuZwGG1iAqtK9LJzo326Az3FD9EZKGLS aimKpdRgbZSbwuHxDy37vdo01w3HglBNiP4oXt40UmrjdCEE7KDWRbuE X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH 2/3] util-linux-ng: Use for loop to install libs and tools X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false From: Ladislav Michl Options are sorted alphabetically inside each group. Please keep it that way. Signed-off-by: Ladislav Michl --- CHANGES: - v2: $(ptx/nl) instead of ; rules/util-linux-ng.make | 240 ++++++++++++--------------------------- 1 file changed, 74 insertions(+), 166 deletions(-) diff --git a/rules/util-linux-ng.make b/rules/util-linux-ng.make index 5421ab50a..74aaaaea0 100644 --- a/rules/util-linux-ng.make +++ b/rules/util-linux-ng.make @@ -182,6 +182,74 @@ UTIL_LINUX_NG_CONF_OPT := \ # Target-Install # ---------------------------------------------------------------------------- +UTIL_LINUX_LIB-y := +UTIL_LINUX_BIN-y := + +# libraries +UTIL_LINUX_LIB-$(PTXCONF_UTIL_LINUX_NG_LIBBLKID) += blkid +UTIL_LINUX_LIB-$(PTXCONF_UTIL_LINUX_NG_LIBUUID) += uuid +UTIL_LINUX_LIB-$(PTXCONF_UTIL_LINUX_NG_LIBMOUNT) += mount +UTIL_LINUX_LIB-$(PTXCONF_UTIL_LINUX_NG_LIBSMARTCOLS) += smartcols +UTIL_LINUX_LIB-$(PTXCONF_UTIL_LINUX_NG_LIBFDISK) += fdisk + +# disk-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_ADDPART) += sbin/addpart +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_CFDISK) += sbin/cfdisk +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_DELPART) += sbin/delpart +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FDISK) += sbin/fdisk +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FSCK) += sbin/fsck +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_MKFS) += sbin/mkfs +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_MKSWAP) += sbin/mkswap +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_PARTX) += sbin/partx +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_SFDISK) += sbin/sfdisk +# login-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LOGIN) += bin/login +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_SULOGIN) += sbin/sulogin +# misc-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_BLKID) += sbin/blkid +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FINDFS) += sbin/findfs +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_GETOPT) += bin/getopt +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LSBLK) += bin/lsblk +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_MCOOKIE) += bin/mcookie +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_UUIDD) += sbin/uuidd +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_UUIDGEN) += bin/uuidgen +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_WIPEFS) += sbin/wipefs +# schedutils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_CHRT) += bin/chrt +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_IONICE) += bin/ionice +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_TASKSET) += bin/taskset +# sys-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_CHMEM) += bin/chmem +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_DMESG) += bin/dmesg +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FLOCK) += bin/flock +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FSFREEZE) += sbin/fsfreeze +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_FSTRIM) += sbin/fstrim +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_HWCLOCK) += sbin/hwclock +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_IPCRM) += bin/ipcrm +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_IPCS) += bin/ipcs +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_IRQTOP) += bin/irqtop +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LDATTACH) += sbin/ldattach +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LOSETUP) += sbin/losetup +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LSCPU) += bin/lscpu +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LSIRQ) += bin/lsirq +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LSMEM) += bin/lsmem +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_MOUNT) += bin/mount +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_MOUNTPOINT) += bin/mountpoint +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_NSENTER) += bin/nsenter +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_PIVOT_ROOT) += sbin/pivot_root +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_READPROFILE) += sbin/readprofile +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_SWAPON) += sbin/swapoff sbin/swapon +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_SWITCH_ROOT) += sbin/switch_root +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_UMOUNT) += bin/umount +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_WDCTL) += bin/wdctl +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_ZRAMCTL) += sbin/zramctl +# term-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_AGETTY) += sbin/agetty +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_SETTERM) += bin/setterm +# text-utils +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_COLUMN) += bin/column +UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_NG_LINE) += bin/line + $(STATEDIR)/util-linux-ng.targetinstall: @$(call targetinfo) @@ -191,173 +259,13 @@ $(STATEDIR)/util-linux-ng.targetinstall: @$(call install_fixup, util-linux-ng,AUTHOR,"Robert Schwebel ") @$(call install_fixup, util-linux-ng,DESCRIPTION,missing) -ifdef PTXCONF_UTIL_LINUX_NG_LIBUUID - @$(call install_lib, util-linux-ng, 0, 0, 0644, libuuid) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LIBBLKID - @$(call install_lib, util-linux-ng, 0, 0, 0644, libblkid) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LIBMOUNT - @$(call install_lib, util-linux-ng, 0, 0, 0644, libmount) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LIBSMARTCOLS - @$(call install_lib, util-linux-ng, 0, 0, 0644, libsmartcols) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LIBFDISK - @$(call install_lib, util-linux-ng, 0, 0, 0644, libfdisk) -endif + @$(foreach lib, $(UTIL_LINUX_LIB-y), \ + $(call install_lib, util-linux-ng, 0, 0, 0644, \ + lib$(lib))$(ptx/nl)) -ifdef PTXCONF_UTIL_LINUX_NG_LSMEM - @$(call install_copy, util-linux-ng, root, root, 0755, -, /usr/bin/lsmem) -endif -ifdef PTXCONF_UTIL_LINUX_NG_CHMEM - @$(call install_copy, util-linux-ng, root, root, 0755, -, /usr/bin/chmem) -endif -ifdef PTXCONF_UTIL_LINUX_NG_COLUMN - @$(call install_copy, util-linux-ng, root, root, 0755, -, /usr/bin/column) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LINE - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/line) -endif -ifdef PTXCONF_UTIL_LINUX_NG_GETOPT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/getopt) -endif -ifdef PTXCONF_UTIL_LINUX_NG_DMESG - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/dmesg) -endif -ifdef PTXCONF_UTIL_LINUX_NG_MOUNTPOINT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/mountpoint) -endif -ifdef PTXCONF_UTIL_LINUX_NG_NSENTER - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/nsenter) -endif -ifdef PTXCONF_UTIL_LINUX_NG_ADDPART - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/addpart) -endif -ifdef PTXCONF_UTIL_LINUX_NG_DELPART - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/delpart) -endif -ifdef PTXCONF_UTIL_LINUX_NG_PARTX - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/partx) -endif -ifdef PTXCONF_UTIL_LINUX_NG_AGETTY - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/agetty) -endif -ifdef PTXCONF_UTIL_LINUX_NG_MKSWAP - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/mkswap) -endif -ifdef PTXCONF_UTIL_LINUX_NG_SWAPON - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/swapon) - @$(call install_link, util-linux-ng, swapon, /usr/sbin/swapoff) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LOSETUP - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/losetup) -endif -ifdef PTXCONF_UTIL_LINUX_NG_MOUNT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/mount) -endif -ifdef PTXCONF_UTIL_LINUX_NG_UMOUNT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/umount) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FLOCK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/flock) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FSCK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/fsck) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FSFREEZE - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/fsfreeze) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FSTRIM - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/fstrim) -endif -ifdef PTXCONF_UTIL_LINUX_NG_IPCS - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/ipcs) -endif -ifdef PTXCONF_UTIL_LINUX_NG_IRQTOP - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/irqtop) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LSIRQ - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/lsirq) -endif -ifdef PTXCONF_UTIL_LINUX_NG_IPCRM - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/ipcrm) -endif -ifdef PTXCONF_UTIL_LINUX_NG_READPROFILE - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/readprofile) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FDISK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/fdisk) -endif -ifdef PTXCONF_UTIL_LINUX_NG_SFDISK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/sfdisk) -endif -ifdef PTXCONF_UTIL_LINUX_NG_CFDISK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/cfdisk) -endif -ifdef PTXCONF_UTIL_LINUX_NG_SETTERM - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/setterm) -endif -ifdef PTXCONF_UTIL_LINUX_NG_CHRT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/chrt) -endif -ifdef PTXCONF_UTIL_LINUX_NG_HWCLOCK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/hwclock) -endif -ifdef PTXCONF_UTIL_LINUX_NG_WDCTL - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/wdctl) -endif -ifdef PTXCONF_UTIL_LINUX_NG_IONICE - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/ionice) -endif -ifdef PTXCONF_UTIL_LINUX_NG_TASKSET - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/taskset) -endif -ifdef PTXCONF_UTIL_LINUX_NG_MCOOKIE - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/mcookie) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LDATTACH - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/ldattach) -endif -ifdef PTXCONF_UTIL_LINUX_NG_BLKID - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/blkid) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LSBLK - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/lsblk) -endif -ifdef PTXCONF_UTIL_LINUX_NG_UUIDD - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/uuidd) -endif -ifdef PTXCONF_UTIL_LINUX_NG_UUIDGEN - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/uuidgen) -endif -ifdef PTXCONF_UTIL_LINUX_NG_FINDFS - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/findfs) -endif -ifdef PTXCONF_UTIL_LINUX_NG_WIPEFS - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/wipefs) -endif -ifdef PTXCONF_UTIL_LINUX_NG_ZRAMCTL - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/zramctl) -endif -ifdef PTXCONF_UTIL_LINUX_NG_MKFS - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/mkfs) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LSCPU - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/lscpu) -endif -ifdef PTXCONF_UTIL_LINUX_NG_LOGIN - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/bin/login) -endif -ifdef PTXCONF_UTIL_LINUX_NG_SULOGIN - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/sulogin) -endif -ifdef PTXCONF_UTIL_LINUX_NG_SWITCH_ROOT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/switch_root) -endif -ifdef PTXCONF_UTIL_LINUX_NG_PIVOT_ROOT - @$(call install_copy, util-linux-ng, 0, 0, 0755, -, /usr/sbin/pivot_root) -endif + @$(foreach tool, $(UTIL_LINUX_BIN-y), \ + $(call install_copy, util-linux-ng, 0, 0, 0755, -, \ + /usr/$(tool))$(ptx/nl)) @$(call install_finish, util-linux-ng) -- 2.32.0