From patchwork Mon Oct 12 09:30:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1380761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=I5CvJIa0; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 ozlabs.org (Postfix) with ESMTPS id 4C8tjn0yWFz9sSs for ; Mon, 12 Oct 2020 20:31:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=2Yb+FfiKbrVRAYsvkgQvslFLaXYz9oeA0BSACMURYlc=; b=I5CvJIa0C2JB0NtssWeZ12Hbjn XOvkHqEsUshcSJ9MCkzDdvRKi9XWuMZDAz+ynCtd9HN2082J2UC4GLX4n06qZVuqQO4OEuZ4+WziJ UZd7NIKDyzlsq3BGeEJgfMpIgCJh446hki6Iqi3YektbE5mTrkfihMqFGqI9AS9lRjEyiVua/+OrN 9t/9lFaCW9p6PbBwUfC54Jkhr9nrXGEMBW5q/0g6wDgsEu+KP/JyGgOfMn8VPKnlbViBhP1zUvlR/ O+eBZP6ZYpCZIGJ1cc9TkyoP4/PO0PL79cWfx8GBldPZjOFSUveJYvBxEcCbYWpjUJ7WNNgNDwfsE OrlL+jbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRuAj-00025q-Gv; Mon, 12 Oct 2020 09:31:13 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRuAe-00023h-Bt for hostap@lists.infradead.org; Mon, 12 Oct 2020 09:31:10 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kRuAa-0042xE-Eq; Mon, 12 Oct 2020 11:31:04 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH] build: rebuild libs all the time Date: Mon, 12 Oct 2020 11:30:53 +0200 Message-Id: <1602495053-I2ceef662f483f65ca9e75f3dd5db975a00fc9a91@changeid> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_053108_418448_E54EF998 X-CRM114-Status: GOOD ( 13.26 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg When files change that go into a static library such as libutils.a, then libutils.a doesn't get rebuilt from e.g. wlantest because the top-level Makefile just calls the library make if the library doesn't exist yet. Change that by making the library depend on a phony target (cannot make it itself phony due to the pattern) so that the build will always recurse into the library build, and check there if the library needs to be rebuilt. While at it, remove the (actually unnecessary) mkdir so it doesn't get done each and every time you do 'make'. Signed-off-by: Johannes Berg --- src/build.rules | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/build.rules b/src/build.rules index ec1cd66ce2a6..acda8847284d 100644 --- a/src/build.rules +++ b/src/build.rules @@ -94,8 +94,12 @@ $(BUILDDIR)/$(PROJ)/wpa_supplicant/%.o: $(ROOTDIR)wpa_supplicant/%.c $(CONFIG_FI @$(E) " CC " $< # libraries - they know how to build themselves -$(BUILDDIR)/$(PROJ)/%.a: $(CONFIG_FILE) - $(Q)mkdir -p $(BUILDDIR)/$(PROJ)/$(dir $(@:$(BUILDDIR)/$(PROJ)/%=%)) +# (lib_phony so we recurse all the time) +.PHONY: lib_phony +lib_phony: +# nothing + +$(BUILDDIR)/$(PROJ)/%.a: $(CONFIG_FILE) lib_phony $(Q)$(MAKE) -C $(ROOTDIR)$(dir $(@:$(BUILDDIR)/$(PROJ)/%=%)) OUT=$(abspath $(dir $@))/ BUILDOBJ = $(patsubst %,$(BUILDDIR)/$(PROJ)/%,$(patsubst $(ROOTDIR)%,%,$(1)))