mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 17:53:07 +00:00
d40526d85d
Signed-off-by: Omar Sandoval <osandov@osandov.com>
16 lines
546 B
Bash
Executable File
16 lines
546 B
Bash
Executable File
#!/bin/bash
|
|
|
|
: ${PYTHON:=python3}
|
|
cscope_args=(-bq -i-)
|
|
|
|
python_include="$("$PYTHON" -c 'import sysconfig; print(sysconfig.get_path("include"))' 2>/dev/null)"
|
|
if [[ -n $python_include ]] ; then
|
|
cscope_args+=("-I$python_include")
|
|
fi
|
|
python_platinclude="$("$PYTHON" -c 'import sysconfig; print(sysconfig.get_path("platinclude"))' 2>/dev/null)"
|
|
if [[ -n $python_platinclude && $python_platinclude != $python_include ]] ; then
|
|
cscope_args+=("-I$python_platinclude")
|
|
fi
|
|
|
|
find libdrgn -name '*.[ch]' -o -name '*.[ch].in' | cscope "${cscope_args[@]}"
|