aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-07-04 09:15:00 +1000
committerJussi Pakkanen <jpakkane@gmail.com>2018-02-22 20:26:16 +0200
commit6b550ae91f166a5c5161ab23c500760a9a155909 (patch)
tree50a3a690dde0bf60318855c76c70b0493b94a188 /docs/markdown
parentc572d222daf141656f6fe8119f1bd5bfc5fbe63e (diff)
downloadmeson-6b550ae91f166a5c5161ab23c500760a9a155909.zip
meson-6b550ae91f166a5c5161ab23c500760a9a155909.tar.gz
meson-6b550ae91f166a5c5161ab23c500760a9a155909.tar.bz2
Allow for missing install_dir in install_data()
The documentation doesn't require it and the interpreter code works around the possibility of it being None. The ninja backend code however fails with File "/home/whot/code/meson/mesonbuild/backend/ninjabackend.py", line 796, in generate_data_install dstabs = os.path.join(subdir or None, plain_f) File "/usr/lib64/python3.6/posixpath.py", line 78, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType If install_dir is missing, default to datadir/projectname
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-manual.md2
-rw-r--r--docs/markdown/snippets/installdir.md5
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index af01dff..4dc87c9 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -712,6 +712,8 @@ arguments. The following keyword arguments are supported:
directory. If this is a relative path, it is assumed to be relative
to the prefix.
+ If omitted, the directory defaults to `{datadir}/{projectname}` *(added 0.45.0)*.
+
- `install_mode` specify the file mode in symbolic format and
optionally the owner/uid and group/gid for the installed files. For
example:
diff --git a/docs/markdown/snippets/installdir.md b/docs/markdown/snippets/installdir.md
new file mode 100644
index 0000000..c709ffe
--- /dev/null
+++ b/docs/markdown/snippets/installdir.md
@@ -0,0 +1,5 @@
+## `install_data()` defaults to `{datadir}/{projectname}`
+
+If `install_data()` is not given an `install_dir` keyword argument, the
+target directory defaults to `{datadir}/{projectname}` (e.g.
+`/usr/share/myproj`).