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

And none of this is ever really explained anywhere step-by-step.


I've seen very good guides, I wish I had one on hand. I saw both of the examples first hand and assumed these were the "main" ways to get the job done.

When developing for a very small project the generate dependency first method was used. It's more complete. Still added an annoying amount of time to the build ~20-60 sec.

For our main project (which also might be considered fairly small, relatively) this method ends up being too time consuming. So the generate dependencies as a byproduct of build method is typically employed, including by: a completely separate team, a competent supplier, and recommended by our compiler company.

Honestly, once you know, you're golden:

The generate ahead can be done with gcc (I think g++ is typically employed) via the preprocess command. You create a rule to generate all *.d first, and combine into one file (this may not be necessary).

To generate as a byproduct, you simply add a command to your compile rule.

That's it. Can be described in one line. I can't recall offhand, but you will need to figure out how to include the dependency files and the formats may need fine tuning. This isn't asking very much.

I saw a really good document out there, and interestingly our supplier copied it almost verbatim. Our build ended up being somewhat similar. So that sweet, sweet doc is out there, you just gotta find it.





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

Search: