diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-08-06 14:35:25 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2023-08-23 11:33:39 -0400 |
commit | 18b96cd0692255b30f8f0597cbf4af89d142a93d (patch) | |
tree | b2edf3ee61fb7b1fef7f0e697c7288923f434a51 /docs/markdown/snippets | |
parent | bde690b06e930020a0ec6ccaea7a76babf77dff5 (diff) | |
download | meson-18b96cd0692255b30f8f0597cbf4af89d142a93d.zip meson-18b96cd0692255b30f8f0597cbf4af89d142a93d.tar.gz meson-18b96cd0692255b30f8f0597cbf4af89d142a93d.tar.bz2 |
machine file: Add @GLOBAL_SOURCE_ROOT@ and @DIRNAME@
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/machine_file_source_dir.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/machine_file_source_dir.md b/docs/markdown/snippets/machine_file_source_dir.md new file mode 100644 index 0000000..5af344e --- /dev/null +++ b/docs/markdown/snippets/machine_file_source_dir.md @@ -0,0 +1,13 @@ +## `@GLOBAL_SOURCE_ROOT@` and `@DIRNAME@` in machine files + +Some tokens are now replaced in the machine file before parsing it: +- `@GLOBAL_SOURCE_ROOT@`: the absolute path to the project's source tree +- `@DIRNAME@`: the absolute path to the machine file's parent directory. + +It can be used, for example, to have paths relative to the source directory, or +relative to toolchain's installation directory. +```ini +[binaries] +c = '@DIRNAME@/toolchain/gcc' +exe_wrapper = '@GLOBAL_SOURCE_ROOT@' / 'build-aux' / 'my-exe-wrapper.sh' +``` |