diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-01-13 16:42:09 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-01-18 11:06:48 -0500 |
commit | 1a0eff005483b63259e365bd4d51be7c4bd3b729 (patch) | |
tree | 7b64867bb7ac42f9a0b441e4c375b4113eeea47b /docs/markdown | |
parent | 5a4168c410fea6fce8867ec60e0ba481d7c61866 (diff) | |
download | meson-1a0eff005483b63259e365bd4d51be7c4bd3b729.zip meson-1a0eff005483b63259e365bd4d51be7c4bd3b729.tar.gz meson-1a0eff005483b63259e365bd4d51be7c4bd3b729.tar.bz2 |
devenv: Allow dumping into file and select a format
It is often more useful to generate shell script than dumping to stdout.
It is also important to be able to select the shell format.
Formats currently implemented:
- sh: Basic VAR=prepend_value:$VAR
- export: Same as 'sh', but also export VAR
- vscode: Same as 'sh', but without substitutions because they don't
seems to work. To be used in launch.json's envFile.
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Commands.md | 17 | ||||
-rw-r--r-- | docs/markdown/snippets/devenv.md | 11 |
2 files changed, 25 insertions, 3 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md index 4a00c4f..b7b72c4 100644 --- a/docs/markdown/Commands.md +++ b/docs/markdown/Commands.md @@ -348,20 +348,31 @@ These variables are set in environment in addition to those set using [[meson.ad - `QEMU_LD_PREFIX` *Since 1.0.0* is set to the `sys_root` value from cross file when cross compiling and that property is defined. -Since *Since 0.62.0* if bash-completion scripts are being installed and the +*Since 0.62.0* if bash-completion scripts are being installed and the shell is bash, they will be automatically sourced. -Since *Since 0.62.0* when GDB helper scripts (*-gdb.py, *-gdb.gdb, and *-gdb.csm) +*Since 0.62.0* when GDB helper scripts (*-gdb.py, *-gdb.gdb, and *-gdb.csm) are installed with a library name that matches one being built, Meson adds the needed auto-load commands into `<builddir>/.gdbinit` file. When running gdb from top build directory, that file is loaded by gdb automatically. In the case of python scripts that needs to load other python modules, `PYTHONPATH` may need to be modified using `meson.add_devenv()`. -Since *Since 0.63.0* when cross compiling for Windows `WINEPATH` is used instead +*Since 0.63.0* when cross compiling for Windows `WINEPATH` is used instead of `PATH` which allows running Windows executables using wine. Note that since `WINEPATH` size is currently limited to 1024 characters, paths relative to the root of build directory are used. That means current workdir must be the root of build directory when running wine. +*Since 1.1.0* `meson devenv --dump [<filename>]` command takes an optional +filename argument to write the environment into a file instead of printing to +stdout. + +*Since 1.1.0* `--dump-format` argument has been added to select which shell +format should be used. There are currently 3 formats supported: +- `sh`: Lines are in the format `VAR=/prepend:$VAR:/append`. +- `export`: Same as `sh` but with extra `export VAR` lines. +- `vscode`: Same as `sh` but without `$VAR` substitution because they do not + seems to be properly supported by vscode. + {{ devenv_arguments.inc }} diff --git a/docs/markdown/snippets/devenv.md b/docs/markdown/snippets/devenv.md new file mode 100644 index 0000000..c2ce2ad --- /dev/null +++ b/docs/markdown/snippets/devenv.md @@ -0,0 +1,11 @@ +## Dump devenv into file and select format + +`meson devenv --dump [<filename>]` command now takes an option filename argument +to write the environment into a file instead of printing to stdout. + +A new `--dump-format` argument has been added to select which shell format +should be used. There are currently 3 formats supported: +- `sh`: Lines are in the format `VAR=/prepend:$VAR:/append`. +- `export`: Same as `sh` but with extra `export VAR` lines. +- `vscode`: Same as `sh` but without `$VAR` substitution because they do not + seems to be properly supported by vscode. |