From: Roman Storozhenko Date: Wed, 26 Jun 2024 16:45:17 +0000 (+0200) Subject: cpupower: Disable direct build of the 'bench' subproject X-Git-Tag: v6.11-rc1~173^2^3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdaed24abf835d9e94322b5298120a104b2775bb;p=thirdparty%2Flinux.git cpupower: Disable direct build of the 'bench' subproject 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 Signed-off-by: Shuah Khan --- diff --git a/tools/power/cpupower/bench/Makefile b/tools/power/cpupower/bench/Makefile index a4b902f9e1c48..34e5894476eba 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),)