diff options
author | Kirill Isakov <bootctl@gmail.com> | 2022-04-20 11:28:21 +0600 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-04-20 20:53:19 -0400 |
commit | 39dd1ff9e83acfdc8c532604b20cb7b774727334 (patch) | |
tree | 6ba62dc2cbb2bc0ba98547b123c55352a93c8a0d /test cases | |
parent | 33aa803521b2aa62688833842ea7eddb828e0e25 (diff) | |
download | meson-39dd1ff9e83acfdc8c532604b20cb7b774727334.zip meson-39dd1ff9e83acfdc8c532604b20cb7b774727334.tar.gz meson-39dd1ff9e83acfdc8c532604b20cb7b774727334.tar.bz2 |
vcs_tag: handle non-str / non-file arguments
This makes vcs_tag behave like other commands so it accepts not only
string and file arguments, but also exe, custom_tgt, and
external_program.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/66 vcstag/meson.build | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test cases/common/66 vcstag/meson.build b/test cases/common/66 vcstag/meson.build index 9eba4c6..38fa590 100644 --- a/test cases/common/66 vcstag/meson.build +++ b/test cases/common/66 vcstag/meson.build @@ -17,12 +17,26 @@ fallback : '1.0.0') version_src_fallback = vcs_tag(input : 'vcstag.c.in', output : 'vcstag-fallback.c') +git = find_program('git') + +version_src_git_program = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag-git-program.c', +command : [git, 'rev-parse', 'HEAD'], +fallback : '1.0.0') + version_src_file = vcs_tag(input : 'vcstag.c.in', output : 'vcstag-file.c', command : files('version.py')) -executable('tagprog', 'tagprog.c', version_src) +tagprog = executable('tagprog', 'tagprog.c', version_src) + +version_src_executable = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag-executable.c', +command : [tagprog]) + executable('tagprog-custom', 'tagprog.c', version_src_custom) executable('tagprog-fallback', 'tagprog.c', version_src_fallback) executable('tagprog-notfound-fallback', 'tagprog.c', version_src_notfound_fallback) +executable('tagprog-git-program', 'tagprog.c', version_src_git_program) +executable('tagprog-executable', 'tagprog.c', version_src_executable) executable('tagprog-file', 'tagprog.c', version_src_file) |