summaryrefslogtreecommitdiffstats
path: root/util/make-sym-extractor
blob: 6dfcfad28e0f8bb71a43d0f90acc5395c5a17c35 (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
26
#!/bin/sh
# See LICENSE file for copyright and license details.

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