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

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

Open
Rytikar opened this issue Mar 31, 2024 · 1 comment
Open

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

Rytikar opened this issue Mar 31, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Rytikar
Copy link

Rytikar commented Mar 31, 2024

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
Copy link
Owner

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.

@rolandshacks rolandshacks added the question Further information is requested label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants