I'm trying to figure out how to implement this Makefile code for generating dependencies.
depend: .depend
.depend: $(SRCS)
rm -f ./.depend
$(CC) $(CFLAGS) -MM $^ > ./.depend;
include .depend
However, I have to modify it so that .depend will be regenerated each time make is run. I Have tried to accomplish this by making a phony target that calls rm -f ./.depend
, but, not matter how I arrange things, it always runs after .depend
and before include
. On the other hand, if I could just get the .depend
recipe to run no matter what, that would work even better.