Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problematic case is with generated header files. Suppose foo.c includes foo.h, where foo.h is generated by a separate command. On a clean build, there's nothing telling Make that it needs to build foo.h before foo.c, so it may not happen (and worse, it may usually happen but sometimes not when doing parallel builds). A separate invocation of `gcc -MM` works for this, as when it generates the dependency information for foo.c it will see that it needs foo.h before you do the actual build.

Personally I've never found it too burdensome to just manually specify dependencies on generated files.



Wouldn't the header need to be explicitly listed as a dependency to prompt it's generation anyway?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: