Re: [PATCH v3 for-next] pm: cpupower: rename raw_pylibcpupower.i

From: Shuah Khan
Date: Fri Sep 13 2024 - 16:33:21 EST


On 9/13/24 14:17, Min-Hua Chen wrote:
The raw_pylibcpupower.i is removed unexpectedly after 'make mrproper'

We can reproduce the error by performing the following steps:
cd linux-next
make mrproper
cd tools/power/cpupower/bindings/python
make

We will get an error message:
make: *** No rule to make target 'raw_pylibcpupower.i', needed by 'raw_pylibcpupower_wrap.c'. Stop.

The root cause:

The *.i files are already used for pre-processor output files and
the kernel removes all the *.i files by 'make mrproper'.

That explains why the raw_pylibcpupower.i is removed by 'make mrproper'.

To fix it, Follow John's suggestion to rename raw_pylibcpupower.i to
raw_pylibcpupower.swg.

See:
https://www.swig.org/Doc4.2/SWIG.html

Reviewed-by: John B. Wyatt IV <jwyatt@xxxxxxxxxx>
Reviewed-by: John B. Wyatt IV <sageofredondo@xxxxxxxxx>
Tested-by: John B. Wyatt IV <jwyatt@xxxxxxxxxx>
Tested-by: John B. Wyatt IV <sageofredondo@xxxxxxxxx>
Signed-off-by: Min-Hua Chen <minhuadotchen@xxxxxxxxx>

---

change since v1:
build a non-frc patch
change since v2:
follow the document to rename *.if to *.swg


Thank you Min for finding the problem and working with us
to fix it.

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower

Please note that this will be sent to PM maintainer in my next pull
request. This might be after the merge window.

thanks,
-- Shuah