diff --git a/build/meson/check-gimp-data.sh b/build/meson/check-gimp-data.sh new file mode 100755 index 0000000000..e226740c88 --- /dev/null +++ b/build/meson/check-gimp-data.sh @@ -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 diff --git a/meson.build b/meson.build index 4e7bf82586..5ec0920675 100644 --- a/meson.build +++ b/meson.build @@ -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(