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> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
committed by
Michal Marek
parent
5bb0571bfd
commit
136ec2049f
@@ -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
|
||||
|
Reference in New Issue
Block a user