summaryrefslogtreecommitdiff
path: root/srcpos.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-01-12 11:31:00 -0700
committerJon Loeliger <jdl@jdl.com>2012-01-13 07:23:58 -0600
commit69df9f0de25db1c37970850115cdf48335d41802 (patch)
treecc78ac31bd8ec042ce0c34f7a90d1fb4be8d716a /srcpos.c
parent97b909f852039daaae267a66f5df2c90ed05b586 (diff)
downloaddtc-69df9f0de25db1c37970850115cdf48335d41802.tar.gz
dtc: Implement -d option to write out a dependency file
This will allow callers to rebuild .dtb files when any of the /include/d .dtsi files are modified, not just the top-level .dts file. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'srcpos.c')
-rw-r--r--srcpos.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/srcpos.c b/srcpos.c
index 2dbc874..36a38e9 100644
--- a/srcpos.c
+++ b/srcpos.c
@@ -40,6 +40,7 @@ static char *dirname(const char *path)
return NULL;
}
+FILE *depfile; /* = NULL */
struct srcfile_state *current_srcfile; /* = NULL */
/* Detect infinite include recursion. */
@@ -67,6 +68,9 @@ FILE *srcfile_relative_open(const char *fname, char **fullnamep)
strerror(errno));
}
+ if (depfile)
+ fprintf(depfile, " %s", fullname);
+
if (fullnamep)
*fullnamep = fullname;
else