Skip to content

Commit

Permalink
meson: allow building from shallow clones
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Gibson <[email protected]>
  • Loading branch information
petermarko authored and dgibson committed Dec 17, 2023
1 parent 95c74d7 commit 0b8026f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
)
Expand Down

0 comments on commit 0b8026f

Please sign in to comment.