Order-only dependencies on a generator #14182
Unanswered
lhearachel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As part of a project that I help maintain, we generate some binary data files using an assembler and assembler macros, e.g.,
We run each of these
*.sfiles through the following generator:(Aside: the shell-script wrapper is so that we can execute an
objcopyto extract thebinarycomponent of the assembler output, rather than effectively run one input file through two generators.)As the
TODOcomment notes, we have a dependency onmessage_banks_indexdeclared, which is a target declared earlier in the build-chain:This target is listed in
dependsonly to ensure that some generated content is built ahead of running the generator (in the example above,res/text/gmm/message_bank_acuity_cavern.h). Per thegeneratordocs, this seems to be the right approach for declaring such a dependency.However, this results in a change to any of the static files in
message_bank_filesto flag all of our assembly-generators as requiring rebuild; ideally, we would like to be able to declaremessage_banks_indexas an order-only dependency and rely on thedepfileto denote which specific headers are implicit dependencies. We could list all of the specific headers that are tracked, but there are at least a hundred such headers, and that solution feels brittle for any user who forks our project.Is there a way to declare such a dependency as order-only for back-ends that support it? If not, where does that code live, and would it be a reasonable and/or welcome contribution?
Beta Was this translation helpful? Give feedback.
All reactions