This is the mail archive of the
mailing list for the GCC project.
Re: Patch: automatic dependencies for gcc
Ralf> The reason I see against my proposal that IMVHO carries real weight
Ralf> would be if you were to require up to date deps files. I would not know
Ralf> how to easily reformulate
Ralf> %.o $(DEPDIR)/%.d: %.c
Ralf> rules into the subdir/$(DEPDIR) scheme. Why aren't you using this BTW?
Ralf> It would already be a bit safer than what you currently have, even if
Ralf> you don't go all the way and make $(DEPFILES) a prerequisite of 'all'.
It seems to me that this will cause us to run these rules at -include
time. -include will not error if the file does not exist, but if the
file can be remade, make will try to do that.
I think include time is too early to build the .d files.
Agreed. I think it's better to remake dep files as side effect of
for more info), which means that %.d will never appear in a rule.
With this sorted out, Ralf's patch at
http://permalink.gmane.org/gmane.comp.gcc.patches/158114 (especially if
redone to use $(*D) and $(*F) instead of dir/notdir) does not seem too ugly.