meson: shortcut meson not finding gimp-data/meson.build with a better error message.
As reported by pippin, when gimp-data submodule is not initialized, meson configuration fails with: > meson.build:1830:0: ERROR: Nonexistent build file 'gimp-data/meson.build' This does not give a lot of info, and while the solution can also be found in INSTALL.in (INSTALL in tarballs) and on developer website, it's nicer if the build itself could give a clearer information. Now it will say instead: > ERROR: Problem encountered: gimp-data submodule not present. Run: git submodule update --init
This commit is contained in:
parent
aba7316e34
commit
5b99177dad
1 changed files with 10 additions and 0 deletions
10
meson.build
10
meson.build
|
|
@ -1721,6 +1721,16 @@ if is_git_repository
|
|||
)
|
||||
endif
|
||||
|
||||
if is_git_repository
|
||||
has_gimp_data = run_command(python, '-c',
|
||||
'import sys,os; sys.exit(0 if os.path.exists("gimp-data/meson.build") else 1)',
|
||||
check: false
|
||||
).returncode() == 0
|
||||
|
||||
if not has_gimp_data
|
||||
error('gimp-data submodule not present. Run: git submodule update --init')
|
||||
endif
|
||||
endif
|
||||
|
||||
configure_file(
|
||||
output: 'config.h',
|
||||
|
|
|
|||
Loading…
Reference in a new issue