ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT
[linux-block.git] / scripts / gen_ksymdeps.sh
CommitLineData
bbda5ec6
MY
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4set -e
5
6# List of exported symbols
52d83df6
MY
7#
8# If the object has no symbol, $NM warns 'no symbols'.
9# Suppress the stderr.
10# TODO:
11# Use -q instead of 2>/dev/null when we upgrade the minimum version of
12# binutils to 2.37, llvm to 13.0.0.
bc7cd2dd 13ksyms=$($NM $1 2>/dev/null | sed -n 's/.*__ksym_marker_\(.*\)/\1/p')
bbda5ec6
MY
14
15if [ -z "$ksyms" ]; then
16 exit 0
17fi
18
19echo
20echo "ksymdeps_$1 := \\"
21
22for s in $ksyms
23do
bc7cd2dd 24 printf ' $(wildcard include/ksym/%s) \\\n' "$s"
bbda5ec6
MY
25done
26
27echo
28echo "$1: \$(ksymdeps_$1)"
29echo
30echo "\$(ksymdeps_$1):"