ninja -t list doesn't work in a directory without build.ninja #244

Closed
tfarina opened this Issue Mar 12, 2012 · 2 comments

Projects

None yet

2 participants

@tfarina
Contributor
tfarina commented Mar 12, 2012

Try to run ninja -t list for example in chromium/src/ directory.

ninja: ERROR: loading 'build.ninja': No such file or directory

But the expected result would be:

ninja subtools:
browse browse dependency graph in a web browser
clean clean built files
commands list all commands required to rebuild given targets
graph output graphviz dot file for targets
query show inputs/outputs for a path
rules list all rules
targets list targets by their rule or depth in the DAG

Adding:
if (!tool.empty())
return RunTool(tool, &globals, argc, argv);

right before "bool rebuilt_manifest = false;" fixed this issue, but I'm not sure it's the best fix.

@evmar
Collaborator
evmar commented Mar 12, 2012

Some tools rely on build.ninja being loaded, while a few others don't. I guess I could split the logic.

@evmar
Collaborator
evmar commented Sep 6, 2012

Fixed in d6ff278 , improved further in d82206d

@evmar evmar closed this Sep 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment