From patchwork Fri Dec 1 21:33:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1871818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GPzwRiFs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkmMT1brWz1ySd for ; Tue, 5 Dec 2023 14:33:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Date:From: References:In-Reply-To:Message-Id:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3abg+PioIfSXr8n8pjvxQWZO2Ghi8AuKikYg2nrB3hI=; b=GPzwRiFsIvS764 2YD0kSzopsa2bvTbcmaWAQ5gHp9XYbH56kPrM9KkOUZ/V40aHTyA0Z9hKcOesCT/eE3XZmdoWNsbG 8dkcRfiPtOO5DWTMSEzCm0mBrgfy/JhLh5jFcb0W9VZVd7XrkIZGGOhe2vaRxnSfoUtOgBgM+5ZIo 95UoeooqDVXgwY4qaat5LeY1OAEDq2fSSsjvw5X5gcjqtovv8DqQBsSE2nDOR/sCL+3WALXD90UiN VNqkIRLdrr0UO4pAebZNDF5Y7gBPAG25fRYqzOddl3O+GaM5sUpOg2Ee1Cdm8IUsxlMMaudTOiPz5 K2yrUTmmsx/Kt3WPSqug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAM9b-0068Fl-25; Tue, 05 Dec 2023 03:31:23 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAM9W-0068Dj-2w for openwrt-devel@lists.openwrt.org; Tue, 05 Dec 2023 03:31:20 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 3B53VBSX001555 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 4 Dec 2023 22:31:16 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 3B53VBdm001554; Mon, 4 Dec 2023 19:31:11 -0800 (PST) (envelope-from ehem) Message-Id: In-Reply-To: References: From: Elliott Mitchell Date: Fri, 1 Dec 2023 13:33:39 -0800 Subject: [PATCH 5/5] build: remove shell.sh To: openwrt-devel@lists.openwrt.org, nbd@nbd.name X-Spam-Status: No, score=0.0 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=unavailable autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231204_193119_272298_B0988412 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Handling common shell usage may have been valuable in the past. Yet now this is almost unused, so inline the single remaining use. Then delete the old file. Signed-off-by: Elliott Mitchell --- I've tried to test the removal. I'm unsure I actually achieved coverage, so a careful look at package/kernel/mac80211/Makefile by someone els [...] Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Handling common shell usage may have been valuable in the past. Yet now this is almost unused, so inline the single remaining use. Then delete the old file. Signed-off-by: Elliott Mitchell --- I've tried to test the removal. I'm unsure I actually achieved coverage, so a careful look at package/kernel/mac80211/Makefile by someone else would be good. --- include/shell.sh | 15 --------------- include/unpack.mk | 4 ++-- package/kernel/mac80211/Makefile | 2 +- rules.mk | 1 - 4 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 include/shell.sh diff --git a/include/shell.sh b/include/shell.sh deleted file mode 100644 index 6ee0cf6030..0000000000 --- a/include/shell.sh +++ /dev/null @@ -1,15 +0,0 @@ -getvar() { - eval "echo \"\${$1}\"" -} - -var2file() { - local var - eval "var=\"\${$1}\"" - if [ -n "$var" ]; then echo "$var" > "$2"; fi -} - -isset() { - local var - eval "var=\"\${$1}\"" - [ -n "$var" ] -} diff --git a/include/unpack.mk b/include/unpack.mk index 5959d55f4b..a120a6093d 100644 --- a/include/unpack.mk +++ b/include/unpack.mk @@ -62,10 +62,10 @@ ifeq ($(strip $(UNPACK_CMD)),) endif ifdef PKG_BUILD_DIR - PKG_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(PKG_BUILD_DIR)) + PKG_UNPACK ?= $(call UNPACK_CMD,$(PKG_BUILD_DIR)) endif ifdef HOST_BUILD_DIR - HOST_UNPACK ?= $(SH_FUNC) $(call UNPACK_CMD,$(HOST_BUILD_DIR)) + HOST_UNPACK ?= $(call UNPACK_CMD,$(HOST_BUILD_DIR)) endif endif # PKG_SOURCE diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 9016e2a525..8aef63d868 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -365,7 +365,7 @@ define Quilt/Refresh/Package endef define Build/Compile - $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config + [ -z "$$$${$(call shvar,mac80211_config)}" ] || echo "$$$${$(call shvar,mac80211_config)}" > "$(PKG_BUILD_DIR)/.config" $(MAKE) $(MAKE_OPTS) allnoconfig $(call Build/Compile/kmod) endef diff --git a/rules.mk b/rules.mk index 6f05047f26..f09ea1ecc4 100644 --- a/rules.mk +++ b/rules.mk @@ -234,7 +234,6 @@ endif export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH)) export PATH:=$(TARGET_PATH) export STAGING_DIR STAGING_DIR_HOST STAGING_DIR_HOSTPKG -export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh; PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config