diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-01-12 11:31:00 -0700 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2012-01-13 07:23:58 -0600 |
commit | 69df9f0de25db1c37970850115cdf48335d41802 (patch) | |
tree | cc78ac31bd8ec042ce0c34f7a90d1fb4be8d716a /srcpos.c | |
parent | 97b909f852039daaae267a66f5df2c90ed05b586 (diff) | |
download | dtc-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |