mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Storozhenko <romeusmeister@gmail.com>
To: Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
	 Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Roman Storozhenko <romeusmeister@gmail.com>
Subject: [PATCH] cpupower: Disable direct build of the 'bench' subproject
Date: Wed, 26 Jun 2024 18:45:17 +0200	[thread overview]
Message-ID: <20240626-fix_bench_compilation-v1-1-d039bd5fa551@gmail.com> (raw)

Execution of the 'make' command in the 'bench' subfolder causes the
following error:

$ make O=cpupower/build/ DESTDIR=cpupower/install/ -j8
"  CC      " cpupower/build//main.o
"  CC      " cpupower/build//parse.o
/bin/sh: 1: "  CC      "cpupower/build//system.o
  CC      : not found
  make: *** [Makefile:21: cpupower/build//main.o] Error 127
  make: *** Waiting for unfinished jobs....
  /bin/sh: 1:   CC      : not found
  /bin/sh: 1:   CC      : not found
  make: *** [Makefile:21: cpupower/build//parse.o] Error 127
  make: *** [Makefile:21: cpupower/build//system.o] Error 127

The makefile uses variables defined in the main project makefile and it
is not intended to run standalone. The reason is that 'bench' subproject
depends on the 'libcpupower' library, see the 'compile-bench' target in
the main makefile.
Add a check that prevents standalone execution of the 'bench' makefile.

Signed-off-by: Roman Storozhenko <romeusmeister@gmail.com>
---
 tools/power/cpupower/bench/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile
index a4b902f9e1c4..34e5894476eb 100644
--- a/tools/power/cpupower/bench/Makefile
+++ b/tools/power/cpupower/bench/Makefile
@@ -1,4 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
+ifeq ($(MAKELEVEL),0)
+$(error This Makefile is not intended to be run standalone, but only as a part \
+of the  main one in the parent dir)
+endif
+
 OUTPUT := ./
 ifeq ("$(origin O)", "command line")
 ifneq ($(O),)

---
base-commit: 0fc4bfab2cd45f9acb86c4f04b5191e114e901ed
change-id: 20240626-fix_bench_compilation-a2e892938c34

Best regards,
-- 
Roman Storozhenko <romeusmeister@gmail.com>


             reply	other threads:[~2024-06-26 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 16:45 Roman Storozhenko [this message]
2024-06-28 22:05 ` Shuah Khan

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=20240626-fix_bench_compilation-v1-1-d039bd5fa551@gmail.com \
    --to=romeusmeister@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shuah@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®