From patchwork Thu Feb 1 23:46:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 1894239 X-Patchwork-Delegate: mschiffer@universe-factory.net 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=sGv89JDT; 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 4TQwbn484kz1yhq for ; Fri, 2 Feb 2024 10:49:07 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wxJlbaq1UjCewMP7WHovCWaSzcIuCr7EJdZRj364Ldw=; b=sGv89JDTyRaBmW yPVHe9Hdff9PPkRoCNxs2gGnLjHM2A9QoJyTHJBUyoeKYMDlwkeZtv5E0ly2oo+eaNN8kllKK8WSR qFTu0Dm8X/glA10PlWQL4B4h+CQyCh4SKJQGgeSyH/kzlJFXRhX9ECxsoWYHrHbsXLxKQGEk3+uSM g8naQsduxHibQ3kZpNyXkWsyqRgwfbPcBQ/NkRjnlICQR2nT31wwAj8zAs1ocaeOjSiFfYsPju7pn Y7h4Q0Tp64u8u7zAK70u6w/0LX7J3+ugql5xybnNJxrVsDXKt9+VbRSfHqFLPJW2FxesIrbsNk/qS WiLlxFtga/o1y6Ex4iiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVgmH-00000009gOC-3szd; Thu, 01 Feb 2024 23:47:29 +0000 Received: from orthanc.universe-factory.net ([104.238.176.138]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVgmE-00000009gNj-3CBU for openwrt-devel@lists.openwrt.org; Thu, 01 Feb 2024 23:47:28 +0000 Received: from avalon.fritz.box (unknown [IPv6:2001:19f0:6c01:100::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by orthanc.universe-factory.net (Postfix) with ESMTPSA id 563F61FBBB; Fri, 2 Feb 2024 00:47:20 +0100 (CET) From: Matthias Schiffer To: Felix Fietkau Cc: Yousong Zhou , openwrt-devel@lists.openwrt.org, Matthias Schiffer Subject: [PATCH] build: add $(STAGING_DIR) and $(BIN_DIR) preparation to target and package subdir compile dependencies Date: Fri, 2 Feb 2024 00:46:58 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240201_154726_970304_59CFEF18 X-CRM114-Status: UNSURE ( 8.49 ) 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: In a pristine build, these directories are created as dependencies of the tools subdir compile, however this step never runs when the tools compile stamp already exists. Since commit ed6ba2801c0a ("to [...] 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 -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org In a pristine build, these directories are created as dependencies of the tools subdir compile, however this step never runs when the tools compile stamp already exists. Since commit ed6ba2801c0a ("tools: keep stamp file in $(STAGING_DIR_HOST)"), this will happen after `make clean`: $(STAGING_DIR) has been deleted, but the tools stamp still exists, so the next build will fail because $(STAGING_DIR) has not been set up correctly. Fix builds after `make clean` by adding the preparation as dependencies for the target and package directories as well. Fixes: ed6ba2801c0a ("tools: keep stamp file in $(STAGING_DIR_HOST)") Signed-off-by: Matthias Schiffer --- package/Makefile | 2 ++ target/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package/Makefile b/package/Makefile index 8e72d4ec726d..4663b41de4ae 100644 --- a/package/Makefile +++ b/package/Makefile @@ -117,6 +117,8 @@ endif $(curdir)/flags-install:= -j1 +$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR) + $(eval $(call stampfile,$(curdir),package,prereq,.config)) $(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build)) $(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build)) diff --git a/target/Makefile b/target/Makefile index 83f9c4b0934a..3bbb9f413133 100644 --- a/target/Makefile +++ b/target/Makefile @@ -19,6 +19,8 @@ $(curdir)/builddirs-install:=\ $(curdir)/sdk/install:=$(curdir)/linux/install $(curdir)/imagebuilder/install:=$(curdir)/linux/install +$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR) + $(eval $(call stampfile,$(curdir),target,prereq,.config)) $(eval $(call stampfile,$(curdir),target,compile,$(TMP_DIR)/.build)) $(eval $(call stampfile,$(curdir),target,install,$(TMP_DIR)/.build))