diff --git a/meson.build b/meson.build index 2a0191bcba..c28bf08eab 100644 --- a/meson.build +++ b/meson.build @@ -1456,15 +1456,19 @@ if is_git_repository or not has_version_h replace_string: '@GIMP_GIT_LAST_COMMIT_YEAR@', fallback: 'unknown (unsupported)', ) - if not is_git_repository + + git = find_program('git', required: false) + if not is_git_repository or not git.found() # We create git-version.h but know it will be useless because we are # not in a git repository. Output a warning. git_warning = ''' UNSUPPORTED BUILD! - This is not a distribution tarball (git-version.h missing) nor is it - a git repository. Therefore we have no reference for debugging. + This is not a distribution tarball (git-version.h missing) and + we could not establish the corresponding commit (either this is + not a git repository or git command is missing). Therefore + we have no reference for debugging. Please either use release tarballs or build from the repository. ''' warning(git_warning)