mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[meson] Check for git availability. Refs #47
This commit is contained in:
parent
6c7df5b7d4
commit
552917701c
11
meson.build
11
meson.build
@ -3,8 +3,15 @@ srcs=[]
|
|||||||
|
|
||||||
srcdir = meson.source_root()
|
srcdir = meson.source_root()
|
||||||
|
|
||||||
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip()
|
git = find_program('git', required: false)
|
||||||
dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip()
|
|
||||||
|
if git.found()
|
||||||
|
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip()
|
||||||
|
dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip()
|
||||||
|
else
|
||||||
|
txt = ''
|
||||||
|
dirty = ''
|
||||||
|
endif
|
||||||
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')
|
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')
|
||||||
|
|
||||||
conf_data = configuration_data()
|
conf_data = configuration_data()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user