aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2023-12-16 18:58:31 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2023-12-18 10:58:31 +1100
commit0b8026ff254f391bc577a571ef397dd1266f1bbd (patch)
tree79a6bce08b9fa0c69f2422147390b829d4a9d9d6
parent95c74d71f0904235d44892627322f60a18c9a28c (diff)
downloaddtc-0b8026ff254f391bc577a571ef397dd1266f1bbd.tar.gz
meson: allow building from shallow clones
When building from shallow clone, tag is not available and version defaults to git hash. Problem is that some builds check DTC version and fail the comparison. Example is https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git Which fails to build with following error: dtc version too old (039a994), you need at least version 1.4.4 Drop --always from git describe command, see https://github.com/mesonbuild/meson/blob/1.3.0/mesonbuild/utils/universal.py#L773 This will make it more closer to build via Makefile. Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 17cb135..bfe3347 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,7 @@ py = py.find_installation(required: get_option('python'))
swig = find_program('swig', required: get_option('python'))
version_gen_h = vcs_tag(
+ command: ['git', 'describe', '--dirty=+'],
input: 'version_gen.h.in',
output: 'version_gen.h',
)