Commit 313312c8 authored by Min-Hua Chen's avatar Min-Hua Chen Committed by Shuah Khan

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.htmlReviewed-by: default avatarJohn B. Wyatt IV <jwyatt@redhat.com>
Reviewed-by: default avatarJohn B. Wyatt IV <sageofredondo@gmail.com>
Tested-by: default avatarJohn B. Wyatt IV <jwyatt@redhat.com>
Tested-by: default avatarJohn B. Wyatt IV <sageofredondo@gmail.com>
Signed-off-by: default avatarMin-Hua Chen <minhuadotchen@gmail.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 80e67f18
......@@ -20,13 +20,13 @@ _raw_pylibcpupower.so: raw_pylibcpupower_wrap.o
raw_pylibcpupower_wrap.o: raw_pylibcpupower_wrap.c
$(CC) -fPIC -c raw_pylibcpupower_wrap.c $(PY_INCLUDE)
raw_pylibcpupower_wrap.c: raw_pylibcpupower.i
raw_pylibcpupower_wrap.c: raw_pylibcpupower.swg
ifeq ($(HAVE_SWIG),0)
$(error "swig was not found. Make sure you have it installed and in the PATH to generate the bindings.")
else ifeq ($(HAVE_PYCONFIG),0)
$(error "python-config was not found. Make sure you have it installed and in the PATH to generate the bindings.")
endif
swig -python raw_pylibcpupower.i
swig -python raw_pylibcpupower.swg
# Will only clean the bindings folder; will not clean the actual cpupower folder
clean:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment