diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-08-21 16:27:56 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-10-03 11:46:34 +0200 |
commit | 2b482e39a90fa1929e0fa4006861f4264f28adb2 (patch) | |
tree | 0af5ef229d25bef1b974445406fc3c9d28c0756f /docs/yaml/functions/files.yaml | |
parent | ad65a699f93a7659739287882ca27c58c564670b (diff) | |
download | meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.zip meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.tar.gz meson-2b482e39a90fa1929e0fa4006861f4264f28adb2.tar.bz2 |
docs: Add the YAML Reference manual
Diffstat (limited to 'docs/yaml/functions/files.yaml')
-rw-r--r-- | docs/yaml/functions/files.yaml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/yaml/functions/files.yaml b/docs/yaml/functions/files.yaml new file mode 100644 index 0000000..ca72745 --- /dev/null +++ b/docs/yaml/functions/files.yaml @@ -0,0 +1,30 @@ +name: files +returns: list[file] +description: | + This command takes the strings given to it in arguments and returns + corresponding File objects that you can use as sources for build + targets. The difference is that file objects remember the subdirectory + they were defined in and can be used anywhere in the source tree. + +example: | + As an example suppose you have source file `foo.cpp` in subdirectory + `bar1` and you would like to use it in a build target that is defined + in `bar2`. To make this happen you first create the object in `bar1` + like this: + + ```meson + foofile = files('foo.cpp') + ``` + + Then you can use it in `bar2` like this: + + ```meson + executable('myprog', 'myprog.cpp', foofile, ...) + ``` + + Meson will then do the right thing. + +varargs: + name: file + type: str + description: Path to the file. |