summaryrefslogtreecommitdiffstats
path: root/dts/scripts/basic/fixdep
blob: cc412bec06c3cdec88a73fa135b0eef854cd138b (plain)
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
27
#!/bin/sh

# Simplfied version of Linux scripts/basic/fixdep. We don't need
# CONFIG tracking etc for this usecase.


# Fixdep's interface is described:

# It is invoked as
#
#   fixdep <depfile> <target> <cmdline>
#
# and will read the dependency file <depfile>
#
# The transformed dependency snipped is written to stdout.
#
# It first generates a line
#
#   cmd_<target> = <cmdline>
#
# and then basically copies the .<target>.d file to stdout, in the
# process filtering out the dependency on autoconf.h and adding
# dependencies on include/config/my/option.h for every
# CONFIG_MY_OPTION encountered in any of the prequisites.

echo cmd_$2 = $3
cat $1