For a bit of background, I am currently working on an IDE that the basic premise is to utilize ninja to power it’s build infrastructure but also be used for the project layout (imagine if Xcode or any other IDE didn’t have funky project files, but used the build script itself to derive the structural layout of the code). Of course to keep the app responsive, I want to run the ninja build tasks in background. The other portion of this is integrating with clang’s compilation database – in order to get AST based syntax highlighting and refactoring capabilities I need to derive all of the arguments that would be invoked to compilation per file; this portion works marvelously.
I have refactored ninja itself a bit to avoid some of the assumptions of the current working directory and it is behaving much better so far; as a matter of fact the IDE can actually now self host (mostly credit there is due to ninja itself).
Is it a safe assumption to make that all file references in ninja build scripts are either a) relative to the parent directory of the script, or b) absolute? One of the changes I made unfortunately broke some of the unit tests: the edge path lookups were being assumed to paths like foo.c and with my alterations to make paths absolute in the calculations the resultant was ./foo.c instead.
Once I can get the unit tests cleaned up and the commits broken out into feature branches I will likely submit them as a set of pull requests if this type of alteration is something useful outside of just libninja.a usage.