summaryrefslogtreecommitdiffstats
path: root/util/make-sym-extractor
blob: 7fec6b8201064406abb7ae974388d23c91bc0cc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

test $# = 2

symbols="$1"
how=""
deps=""
set $(printf '%s\n' "$2" | tr ',|' '  ')

for dep; do
	if test "$dep" = mask || test "$dep" = enum; then
		test -z "$how"
		how="$dep"
	else
		deps="$deps $dep"
	fi
done

test -n "$how"

dir="$(dirname -- "$0")"

$dir/make-$how "$symbols" $deps