meson, build: verify for up-to-date gimp-data and warn otherwise.

This commit is contained in:
Jehan 2024-08-15 19:41:12 +02:00
parent 5b99177dad
commit 7b274c1200
2 changed files with 15 additions and 0 deletions

5
build/meson/check-gimp-data.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
cd $MESON_SOURCE_ROOT
changes=$(git status --untracked-files=no --short --ignore-submodules=dirty gimp-data|wc -l)
exit $changes

View File

@ -1730,6 +1730,16 @@ if is_git_repository
if not has_gimp_data
error('gimp-data submodule not present. Run: git submodule update --init')
endif
if git.found()
git_submodule_check = run_command(meson.project_source_root() / 'build/meson/check-gimp-data.sh',
check: false)
if git_submodule_check.returncode() != 0
submodule_warning = 'gimp-data submodule seems outdated. Possibly run from the source repository: git submodule update'
warning(submodule_warning)
warnings += submodule_warning
endif
endif
endif
configure_file(