Masahiro Yamada | bbda5ec | 2018-11-30 10:05:26 +0900 | [diff] [blame] | 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):" |