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