From 69df9f0de25db1c37970850115cdf48335d41802 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 12 Jan 2012 11:31:00 -0700 Subject: 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 Acked-by: David Gibson --- srcpos.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'srcpos.c') 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 -- cgit v1.2.3-59-g8ed1b