build: meson.build minor code refactoring

This commit is contained in:
Stanislav Grinkov 2021-09-29 00:16:09 +06:00
parent e43743e0eb
commit 48ee6a1a72
No known key found for this signature in database
GPG key ID: F9FF16FBCBF58578

View file

@ -15,11 +15,6 @@ conf = configuration_data()
warnings = []
# git-version.h is already present and not generated if dist tarball
is_git_repository = run_command('python3', '-c',
'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)'
).returncode() == 0
################################################################################
# Project info
@ -1446,9 +1441,15 @@ endif
##### #### # # # # #### # # ###### ###### ####
# git-version.h is already present and not generated if dist tarball
is_git_repository = run_command('python3', '-c',
'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)'
).returncode() == 0
has_version_h = run_command('python3', '-c',
'import sys,os; sys.exit(0 if os.path.exists("git-version.h") else 1)'
).returncode() == 0
if is_git_repository or not has_version_h
gitversion_h1 = vcs_tag(
input : 'app/git-version.h.in',