diff options
author | Niklas Claesson <nicke.claesson@gmail.com> | 2018-05-01 13:51:55 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-05-01 11:51:55 +0000 |
commit | 4f4cdee6876148b14a430e5886fec45299bb0573 (patch) | |
tree | f5dbe7faf3f6eb531f218928447fb250e0805e1f /test cases | |
parent | 8c381e1786d0fbeb2136187c6d98f4000e8962bf (diff) | |
download | meson-4f4cdee6876148b14a430e5886fec45299bb0573.zip meson-4f4cdee6876148b14a430e5886fec45299bb0573.tar.gz meson-4f4cdee6876148b14a430e5886fec45299bb0573.tar.bz2 |
Allow custom_target do depend on indexed output of custom_target
Fixes: #3494
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/161 index customtarget/check_args.py | 18 | ||||
-rw-r--r-- | test cases/common/161 index customtarget/meson.build | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test cases/common/161 index customtarget/check_args.py b/test cases/common/161 index customtarget/check_args.py new file mode 100644 index 0000000..8663a6f --- /dev/null +++ b/test cases/common/161 index customtarget/check_args.py @@ -0,0 +1,18 @@ +#!python3 + +import sys +from pathlib import Path + +def main(): + if len(sys.argv) != 2: + print(sys.argv) + return 1 + if sys.argv[1] != 'gen.c': + print(sys.argv) + return 2 + Path('foo').touch() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/test cases/common/161 index customtarget/meson.build b/test cases/common/161 index customtarget/meson.build index 11cb214..27d28b5 100644 --- a/test cases/common/161 index customtarget/meson.build +++ b/test cases/common/161 index customtarget/meson.build @@ -29,4 +29,11 @@ lib = static_library( ['lib.c', gen[1]], ) +custom_target( + 'foo', + input: gen[0], + output: 'foo', + command: [find_program('check_args.py'), '@INPUT@'], +) + subdir('subdir') |