[gnome-photos/wip/rishi/buffer-decoder: 3/13] build: Ensure that the Git submodules are kept updated



commit ab8519e61bde29b79df8249fc0f455f109e8bdd3
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Sep 25 07:56:38 2018 +0200

    build: Ensure that the Git submodules are kept updated
    
    It's assumed that those building release tarballs, like distributions,
    might not have Git in their buildroots. Therefore, this is skipped for
    'plain' builds.

 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index cb41c8ef..ffba85eb 100644
--- a/meson.build
+++ b/meson.build
@@ -30,6 +30,11 @@ po_dir = join_paths(source_root, 'po')
 
 top_inc = include_directories('.')
 
+git = find_program('git')
+if not photos_buildtype.contains('plain')
+  run_command(git, '-C', source_root, 'submodule', 'update', '--init', '--recursive')
+endif
+
 cc = meson.get_compiler('c')
 
 config_h = configuration_data()
@@ -38,7 +43,6 @@ config_h.set_quoted('PACKAGE_TARNAME', meson.project_name())
 config_h.set_quoted('PACKAGE_URL', 'https://wiki.gnome.org/Apps/Photos')
 config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
 
-git = find_program('git')
 res = run_command(git, '-C', source_root, 'describe')
 if res.returncode() == 0
   config_h.set_quoted('PACKAGE_COMMIT_ID', res.stdout().strip())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]