On Thu, Dec 05, 2024 at 02:06:15PM +0100, Rasmus Villemoes wrote: > The Makefile already seems to have the proper logic for generating the > .foo.o.d dependency files, but I think the issue is at the end: > > # GCC's dependencies > -include $(OBJS:%.o=.%.o.d) > > and $(OBJS) does not contains $(SMATCH_OBJS). > > Adding SMATCH_OBJS to OBJS may have some other random effects, so I > think the simplest is to just add another line > > -include $(SMATCH_OBJS:%.o=.%.o.d) > > Then touching any .h file should rebuild exactly the .c files using that. Rasmus, thank you! That works. It would have taken me forever to figure out... regards, dan carpenter