Skip to content
Extraits de code Groupes Projets
Valider fd00ba50 rédigé par Myaamori's avatar Myaamori Validation de Ryan Lucia
Parcourir les fichiers

meson: create git_version.h in build directory in version.sh

parent 0c5c4db1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,7 +13,7 @@ else ...@@ -13,7 +13,7 @@ else
endif endif
version_inc = include_directories('.') version_inc = include_directories('.')
version_h = custom_target('git_version.h', version_h = custom_target('git_version.h',
command: [version_sh, meson.current_build_dir()], command: [version_sh, meson.current_build_dir(), meson.current_source_dir()],
build_by_default: true, build_by_default: true,
build_always_stale: true, # has internal check whether target file will be refreshed build_always_stale: true, # has internal check whether target file will be refreshed
output: ['git_version.h', 'git_version.xml']) output: ['git_version.h', 'git_version.xml'])
......
srcdir="$1" builddir="$1"
srcdir="$2"
# If no git repo try to read from the existing git_version.h, for building from tarballs # If no git repo try to read from the existing git_version.h, for building from tarballs
version_h_path="${srcdir}/git_version.h" version_h_path="${builddir}/git_version.h"
if ! test -d "${srcdir}/.git"; then if ! test -d "${srcdir}/.git"; then
if test -f "${version_h_path}"; then if test -f "${version_h_path}"; then
while read line; do while read line; do
...@@ -65,7 +66,7 @@ export BUILD_GIT_VERSION_NUMBER="${git_revision}" ...@@ -65,7 +66,7 @@ export BUILD_GIT_VERSION_NUMBER="${git_revision}"
export BUILD_GIT_VERSION_STRING="${git_version_str}" export BUILD_GIT_VERSION_STRING="${git_version_str}"
export VERSION_SOURCE="from git" export VERSION_SOURCE="from git"
cat << EOF > "${srcdir}/git_version.xml" cat << EOF > "${builddir}/git_version.xml"
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter