]> git.ipfire.org Git - thirdparty/kernel/linux.git/blob - scripts/gen_ksymdeps.sh
Merge tag 'for-linus-6.9a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[thirdparty/kernel/linux.git] / scripts / gen_ksymdeps.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3
4 set -e
5
6 # List of exported symbols
7 ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z)
8
9 if [ -z "$ksyms" ]; then
10 exit 0
11 fi
12
13 echo
14 echo "ksymdeps_$1 := \\"
15
16 for s in $ksyms
17 do
18 echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \
19 -e 's:__*:/:g' -e 's/$/.h) \\/'
20 done
21
22 echo
23 echo "$1: \$(ksymdeps_$1)"
24 echo
25 echo "\$(ksymdeps_$1):"