Add proper dependency tracking for Makefile.subdirs.