mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-14 05:33:59 -04:00
meson: run generate_version.sh in a C locale
Previously, only the date command inside the script was run with LC_TIME=C. But there’s no reason to be that conservative; we absolutely do not want _anything_ in that script to generate locale dependent output.
This commit is contained in:
parent
b8226fa14c
commit
88b2808dcd
2 changed files with 3 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ if [ -d "${src_dir}/.git" ] && command -v git > /dev/null; then
|
||||||
git_branch=$(git rev-parse --abbrev-ref HEAD)
|
git_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
cd "${workdir}"
|
cd "${workdir}"
|
||||||
|
|
||||||
new_version="${git_version} ($(env LC_TIME=C date "+%b %d %Y"), branch '${git_branch}')"
|
new_version="${git_version} ($(date "+%b %d %Y"), branch '${git_branch}')"
|
||||||
else
|
else
|
||||||
new_version="${default_version}"
|
new_version="${default_version}"
|
||||||
extra=""
|
extra=""
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,13 @@ foreach prot : wl_proto_xml
|
||||||
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
env = find_program('env', native: true)
|
||||||
generate_version_sh = files('generate-version.sh')
|
generate_version_sh = files('generate-version.sh')
|
||||||
version = custom_target(
|
version = custom_target(
|
||||||
'generate_version',
|
'generate_version',
|
||||||
build_always_stale: true,
|
build_always_stale: true,
|
||||||
output: 'version.h',
|
output: 'version.h',
|
||||||
command: [generate_version_sh, meson.project_version(), '@SOURCE_ROOT@', '@OUTPUT@'])
|
command: [env, 'LC_ALL=C', generate_version_sh, meson.project_version(), '@SOURCE_ROOT@', '@OUTPUT@'])
|
||||||
|
|
||||||
common = static_library(
|
common = static_library(
|
||||||
'common',
|
'common',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue