google / shipshape

Program analysis platform
Apache License 2.0
269 stars 35 forks source link

Use "include" instead of "subninja" for rules.ninja #37

Closed emsod closed 9 years ago

emsod commented 9 years ago

rules.ninja only defines rules. Up to ninja 1.5.x, include and subninja do the same thing for ninja files that only define rules.

In ninja 1.6, we hope to change rules to be scoped to the current subninja ( https://github.com/martine/ninja/pull/921 ). With that change, subninja rules.ninja would define the rules in a new scope that closes at the end of the line and all the rules in rules.ninja would be ignores. include won't introduce a new scope and instead add the rules in the context of the parent build.ninja file.

This change should have no effect on ninja up to 1.5.x, and it should keep the build working as previously with newer ninja versions.