mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
97b909f852
commit
69df9f0de2
9 changed files with 40 additions and 1 deletions
4
srcpos.c
4
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue