rolandshacks / vs64

C64 Development Environment for Visual Studio Code
Other
97 stars 16 forks source link

paths in build.ninja when moving projects around on disk #61

Open Rytikar opened 6 months ago

Rytikar commented 6 months ago

Hi, I'm just wondering if I'm missing something... I'm moving and duplicating projects around on disk lately and experience I have to edit build.ninja to correct the paths. It looks to me everything in a project is relativ, why is it neccessary to use absolute paths even containing the disk? And, while we're at it, when defining basedir and builddir at the top of build.ninja, why not use it later on?

Just curious, no big deal editing the file, joyfully violating: ################################################################################

BUILD FILE

generated file: DO NOT EDIT!

################################################################################

rolandshacks commented 6 months ago

There are quite a few preparation steps needed to produce the build file - and one of the most tricky thing is to disambiguate the include paths. In order to ensure proper operation independent of the toolkits and their installation paths or setups - or their expectation on working directory, etc., I decided to go for absolute paths, always. And that's what some other (modern) build systems (Bazel for example) are doing as well.

Maybe there would be ways to utilize basedir and builddir more often, indeed - I'll put that on my list of nice to haves.

Thanks for the feedback!

PS. Press clean and build in vscode, then the file should be re-generated.