-
Notifications
You must be signed in to change notification settings - Fork 8k
scripts: west_commands: extend build.dir-fmt
format args
#96421
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
base: main
Are you sure you want to change the base?
scripts: west_commands: extend build.dir-fmt
format args
#96421
Conversation
411e776
to
03d0ed0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at all the os.cwd()
(which should probably be Path.cwd()
), I wonder about people using west
outside the west workspace, thanks to the ZEPHYR_BASE variable. How is this going to work for them? Has dir-fmt
ever worked for them? It's OK if it does not but then it should fail clearly and "gracefully".
Noob questions sorry.
4a4bd90
to
1cfc21e
Compare
4fbdfa3
to
2b455ec
Compare
build.dir-fmt format string arguments are extended. New format args are 'west_topdir' (absolute path to the west workspace directory) and 'source_dir_workspace' (relative path of the source directory to west_topdir). Signed-off-by: Thorsten Klein <[email protected]>
2b455ec
to
f612541
Compare
|
Is there anything else I should provide or address to get this feature merged? 💯 |
build.dir-fmt
format string arguments are extended.New supported format args are:
{west_topdir}
which is the absolute path to the west workspace directory (west topdir). This is helpful for users when they want to place all build folders under a fix path within the west workspace.{source_dir_workspace}
which is the relative path of the source directory to the west workspace (west topdir). If the source directory is outside of the west workspace,{source_dir_workspace}
will be relative to the filesystem root.{source_dir_workspace}
is helpful to keep builds in separate folders under a specific subfolder. Since the path is relative to west topdir , it does not matter in which working directory thewest build
command was called.Background:
{source_dir}
cannot be used currently since it is relative to the current working directory and it might therefore be a relative path starting with../
.{source_dir_ws}
will never start with../
.E.g. users can now use following
dir-fmt
in order to store builds under a fix path<west_workspace>/build/
: