summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Taylor <louis@kragniz.eu>2019-01-21 21:45:36 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-01-22 14:39:38 +0100
commitd1084aa2f803cdce6b3809dc9b7ec899251fd5dc (patch)
treeba74d5797b087e0f346c565a4ba1f2420ec7152d
parent04ba6ed1677848969e9bd1a36642f8d1507c7d16 (diff)
downloadsystemd-d1084aa2f803cdce6b3809dc9b7ec899251fd5dc.tar.gz
systemd-d1084aa2f803cdce6b3809dc9b7ec899251fd5dc.tar.bz2
systemd-d1084aa2f803cdce6b3809dc9b7ec899251fd5dc.zip
meson: make version a dependency and use it in libbasic
This should hopefully ensure it gets generated before basic build happens. Fixes #11483.
-rw-r--r--meson.build7
-rw-r--r--src/basic/meson.build10
-rw-r--r--src/version/version.h.in (renamed from src/basic/version.h.in)0
3 files changed, 9 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 011e449806..5cf2fc2664 100644
--- a/meson.build
+++ b/meson.build
@@ -580,6 +580,13 @@ vcs_tagger = [meson.source_root() + '/tools/meson-vcs-tag.sh',
get_option('version-tag'),
meson.project_version()]
+version_h = vcs_tag(
+ input : 'src/version/version.h.in',
+ output : 'version.h',
+ command: vcs_tagger)
+
+versiondep = declare_dependency(sources: version_h)
+
sed = find_program('sed')
awk = find_program('awk')
m4 = find_program('m4')
diff --git a/src/basic/meson.build b/src/basic/meson.build
index 349957f215..e5852f32f9 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1+
-version_h = vcs_tag(
- command: vcs_tagger,
- input : 'version.h.in',
- output : 'version.h')
-
basic_sources = files('''
MurmurHash2.c
MurmurHash2.h
@@ -216,8 +211,6 @@ basic_sources = files('''
xattr-util.h
'''.split())
-basic_sources += version_h
-
missing_audit_h = files('missing_audit.h')
missing_capability_h = files('missing_capability.h')
missing_network_h = files('missing_network.h')
@@ -299,7 +292,8 @@ libbasic = static_library(
'basic',
basic_sources,
include_directories : includes,
- dependencies : [threads,
+ dependencies : [versiondep,
+ threads,
libcap,
libselinux,
libm],
diff --git a/src/basic/version.h.in b/src/version/version.h.in
index 9f82d905a7..9f82d905a7 100644
--- a/src/basic/version.h.in
+++ b/src/version/version.h.in