Fully automatic dependency generation, including macros and layouts