diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-12-17 03:28:15 +0530 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-18 20:00:25 +0200 |
| commit | 6b8df9da84fe5c8aef92230a59ac22b99d548b00 (patch) | |
| tree | 2a40fc1394cbf3e9afe9b151073b3f2092c64efd /test cases | |
| parent | 411e88a5ab06dfdc6817c03f7dc96defc3a5d6aa (diff) | |
| download | meson-6b8df9da84fe5c8aef92230a59ac22b99d548b00.tar.gz | |
custom_target: Make directory outputs installable
This is useful in many cases where the list of files cannot be known in
advance and is just dumped inside a directory. For example when
generating documentation with doxygen and other tools that we don't have
built-in support for.
Includes a test for the same.
Closes #893
Diffstat (limited to 'test cases')
3 files changed, 24 insertions, 0 deletions
diff --git a/test cases/common/131 custom target directory install/docgen.py b/test cases/common/131 custom target directory install/docgen.py new file mode 100644 index 000000000..245f37035 --- /dev/null +++ b/test cases/common/131 custom target directory install/docgen.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +import os +import sys + +out = sys.argv[1] + +os.mkdir(out) + +for name in ('a', 'b', 'c'): + with open(os.path.join(out, name + '.html'), 'w') as f: + f.write(name) diff --git a/test cases/common/131 custom target directory install/installed_files.txt b/test cases/common/131 custom target directory install/installed_files.txt new file mode 100644 index 000000000..bcf20e0ac --- /dev/null +++ b/test cases/common/131 custom target directory install/installed_files.txt @@ -0,0 +1,3 @@ +usr/share/doc/testpkgname/html/a.html +usr/share/doc/testpkgname/html/b.html +usr/share/doc/testpkgname/html/c.html diff --git a/test cases/common/131 custom target directory install/meson.build b/test cases/common/131 custom target directory install/meson.build new file mode 100644 index 000000000..ada9ae119 --- /dev/null +++ b/test cases/common/131 custom target directory install/meson.build @@ -0,0 +1,9 @@ +project('custom-target-dir-install', 'c') + +docgen = find_program('docgen.py') + +custom_target('docgen', + output : 'html', + command : [docgen, '@OUTPUT@'], + install : true, + install_dir : join_paths(get_option('datadir'), 'doc/testpkgname')) |
