Skip to content

Commit 313312c

Browse files
Min-Huashuahkh
authored andcommitted
pm: cpupower: rename raw_pylibcpupower.i
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@redhat.com> Reviewed-by: John B. Wyatt IV <sageofredondo@gmail.com> Tested-by: John B. Wyatt IV <jwyatt@redhat.com> Tested-by: John B. Wyatt IV <sageofredondo@gmail.com> Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 80e67f1 commit 313312c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/power/cpupower/bindings/python/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ _raw_pylibcpupower.so: raw_pylibcpupower_wrap.o
2020
raw_pylibcpupower_wrap.o: raw_pylibcpupower_wrap.c
2121
$(CC) -fPIC -c raw_pylibcpupower_wrap.c $(PY_INCLUDE)
2222

23-
raw_pylibcpupower_wrap.c: raw_pylibcpupower.i
23+
raw_pylibcpupower_wrap.c: raw_pylibcpupower.swg
2424
ifeq ($(HAVE_SWIG),0)
2525
$(error "swig was not found. Make sure you have it installed and in the PATH to generate the bindings.")
2626
else ifeq ($(HAVE_PYCONFIG),0)
2727
$(error "python-config was not found. Make sure you have it installed and in the PATH to generate the bindings.")
2828
endif
29-
swig -python raw_pylibcpupower.i
29+
swig -python raw_pylibcpupower.swg
3030

3131
# Will only clean the bindings folder; will not clean the actual cpupower folder
3232
clean:

0 commit comments

Comments
 (0)