Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make target^ a first-class citizen #2382

Open
dslijepcevic opened this issue Feb 11, 2024 · 0 comments
Open

Make target^ a first-class citizen #2382

dslijepcevic opened this issue Feb 11, 2024 · 0 comments

Comments

@dslijepcevic
Copy link

From the manual:

There is also a special syntax target^ for specifying a target as the first output of some rule containing the source you put in the command line, if one exists. For example, if you specify target as foo.c^ then foo.o will get built (assuming you have those targets in your build files).

Can you please make these special foo.c^ targets behave as regular targets in all ninja commands by simply "dereferencing" them first? For example, while building foo.c^ works, this breaks:

$ ninja -t clean foo.c^
Cleaning...
ninja: error: unknown target 'foo.c^'
0 files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants