YosysHQ / icestorm

Project IceStorm - Lattice iCE40 FPGAs Bitstream Documentation (Reverse Engineered)
ISC License
965 stars 224 forks source link

Use -MP to eliminate one way that -MD can fatally confuse make #253

Closed SolraBizna closed 4 years ago

SolraBizna commented 4 years ago

This attempts to solve the same problem as #240, but is a much better approach. -MP causes the compiler to emit dummy targets for every included header file, so that Make won't throw an error if a header disappears. Instead, it will (as it should) simply rebuild the affected files. These dummy targets are ignored in the presence of real targets for e.g. generated headers.

(Sorry if it seems like I'm fighting for a weirdly specific hill. It's just that I remembered about -MP while working on an unrelated project and was instantly reminded of #240.)