From 7b274c12001966f760440f4374fa64f73fccec64 Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 15 Aug 2024 19:41:12 +0200 Subject: [PATCH] meson, build: verify for up-to-date gimp-data and warn otherwise. --- build/meson/check-gimp-data.sh | 5 +++++ meson.build | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100755 build/meson/check-gimp-data.sh 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(