[gimp/wip/jtojnar/meson-dist: 116/117] meson: Fix dist script
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/jtojnar/meson-dist: 116/117] meson: Fix dist script
- Date: Fri, 18 Mar 2022 16:06:04 +0000 (UTC)
commit 0c7a980bc10db15b5d6a36e368de707200758f3b
Author: Jan Tojnar <jtojnar gmail com>
Date: Fri Feb 25 16:11:21 2022 +0100
meson: Fix dist script
meson.build | 5 +++--
meson_dist_script.sh | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3be249d3ed..a69529ef07 100644
--- a/meson.build
+++ b/meson.build
@@ -1476,7 +1476,8 @@ has_version_h = run_command('python3', '-c',
'import sys,os; sys.exit(0 if os.path.exists("git-version.h") else 1)'
).returncode() == 0
-if is_git_repository or not has_version_h
+generate_version_h = is_git_repository or not has_version_h
+if generate_version_h
gitversion_h1 = vcs_tag(
input : 'app/git-version.h.in',
output: 'git-version.h.in.1',
@@ -1647,7 +1648,7 @@ custom_target('Changelog',
build_by_default: false,
)
-meson.add_dist_script('meson_dist_script.sh')
+meson.add_dist_script('meson_dist_script.sh', generate_version_h ? gitversion_h.full_path() : gitversion_h)
################################################################################
diff --git a/meson_dist_script.sh b/meson_dist_script.sh
index e61da177a7..d900d7d1db 100755
--- a/meson_dist_script.sh
+++ b/meson_dist_script.sh
@@ -3,4 +3,4 @@
cp -f 'INSTALL' "${MESON_DIST_ROOT}"
# rm -f "${MESON_DIST_ROOT}/INSTALL.in"
-cp 'git-version.h' "${MESON_DIST_ROOT}"
+cp "$1" "${MESON_DIST_ROOT}"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]