mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
	"John B. Wyatt IV" <jwyatt@redhat.com>,
	John Kacur <jkacur@redhat.com>,
	David Howells <dhowells@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Sasha Levin <sashal@kernel.org>,
	stable@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] cpupower: keep O= builds inside the cpupower output directory
Date: Sun, 11 Oct 2026 18:33:29 -0400	[thread overview]
Message-ID: <20261011223358.2327625-1-sashal@kernel.org> (raw)

tools/Makefile builds cpupower with O= set to the top of the output
tree and subdir= set to tools/power/cpupower, like the other tools it
descends into. cpupower ignores subdir and puts its objects straight
into $(O). Through the kernel's "make O=<dir> tools/cpupower" that is
the kernel object tree, and "make O=<dir> tools/cpupower_clean" (also
part of "make tools/clean") then runs

  find $(O) -name '*.[oas]' | xargs rm -f

over the whole kernel object tree, deleting every kernel object file.

Append subdir to the output directory, as tools/scripts/Makefile.include
does for the other tools. Builds that pass O= without subdir, including
"make -C tools/power/cpupower O=<dir>", are unchanged.

Fixes: bf35182ffcd00 ("tools: Honour the O= flag when tool build called from a higher Makefile")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/power/cpupower/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index ab428e336d878..206de09252a57 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -10,7 +10,7 @@
 #
 OUTPUT=./
 ifeq ("$(origin O)", "command line")
-	OUTPUT := $(O)/
+	OUTPUT := $(O)/$(if $(subdir),$(subdir)/)
 endif
 
 ifneq ($(OUTPUT),)
-- 
2.53.0


                 reply	other threads:[~2026-10-11 22:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261011223358.2327625-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acme@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=jwyatt@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=trenn@suse.com \
    /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

all inboxes | Powered by JetHome®