chromium – what does the $: syntax mean in a Ninja build file?
encountered some unusual syntax in a Ninja build file and I’m trying to understand its meaning. Specifically, I’m confused about the $: part in the following lines:
build third_party/blink/renderer/core/animation$:animation: phony obj/third_party/blink/renderer/core/animation/libanimation.a
build third_party/blink/renderer/core/animation: phony obj/third_party/blink/renderer/core/animation/libanimation.a
Here is the complete context of the build file:
plaintext
pool build_toolchain_action_pool
depth = 48
pool build_toolchain_link_pool
depth = 41
# Include other necessary subninja files
# subninja toolchain.ninja
build third_party/blink/renderer/core/animation$:animation: phony obj/third_party/blink/renderer/core/animation/libanimation.a
build third_party/blink/renderer/core/animation: phony obj/third_party/blink/renderer/core/animation/libanimation.a
I understand that the phony targets do not generate actual files but serve to manage dependencies. However, the $: syntax in the target names is not something I am familiar with, and I couldn’t find any references in the official Ninja documentation.
My Questions:
What does the $: syntax mean in the context of these Ninja build file lines?
Is this a standard feature of Ninja or a project-specific customization?
How can I determine the purpose of this syntax if it’s a custom feature?
Any insights or references to relevant documentation would be greatly appreciated.
Read more here: Source link
