mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
26 lines
399 B
Bash
26 lines
399 B
Bash
![]() |
#!/bin/sh
|
||
|
# SPDX-License-Identifier: GPL-2.0
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# List of exported symbols
|
||
|
ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z)
|
||
|
|
||
|
if [ -z "$ksyms" ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
echo
|
||
|
echo "ksymdeps_$1 := \\"
|
||
|
|
||
|
for s in $ksyms
|
||
|
do
|
||
|
echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \
|
||
|
-e 's:__*:/:g' -e 's/$/.h) \\/'
|
||
|
done
|
||
|
|
||
|
echo
|
||
|
echo "$1: \$(ksymdeps_$1)"
|
||
|
echo
|
||
|
echo "\$(ksymdeps_$1):"
|