Skip to content

Commit

Permalink
Merge tag 'linux-cpupower-6.12-rc1-fixes' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/scm/linux/kernel/git/shuah/linux

Pull cpupower updates from Shuah Khan
 "The 'raw_pylibcpupower.i' file was being removed by "make mrproper".

  That was because '*.i', '.s' and '*.o' files are generated during
  kernel compile and removed when the repo is cleaned by mrproper.

  Rename it to use .swg extension instead to avoid the problem.

  A second patch removes references to it from .gitignore"

* tag 'linux-cpupower-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux:
  pm: cpupower: Clean up bindings gitignore
  pm: cpupower: rename raw_pylibcpupower.i
  • Loading branch information
torvalds committed Sep 24, 2024
2 parents cd3d647 + 6c56fb4 commit 7f8de2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tools/power/cpupower/bindings/python/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
__pycache__/
raw_pylibcpupower_wrap.c
*.o
*.so
*.py
!test_raw_pylibcpupower.py
# git keeps ignoring this file, use git add -f raw_libcpupower.i
!raw_pylibcpupower.i
4 changes: 2 additions & 2 deletions tools/power/cpupower/bindings/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7f8de2b

Please sign in to comment.