summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJames Knight <james.d.knight@live.com>2016-02-16 23:51:08 -0500
committerEric S. Raymond <esr@thyrsus.com>2016-02-23 17:31:28 -0500
commit777cb3737ae85b13642fff48eabb601c4d40f527 (patch)
treed7c820f5d091d505cfbf642bcd8030f47044a621 /SConstruct
parent40d000aef1f752e942f99ab5046491a3eddf0d3e (diff)
downloadgpsd-777cb3737ae85b13642fff48eabb601c4d40f527.tar.gz
do not interact with systemctl when cross-compiling
The installation process for GPSd on a systemd environment will attempt to reload systemd's manager configuration (systemctl daemon-reload). This is to allow the system to take advantage of the newly installed GPSd services. When cross-compiling, the installation process should not attempt to interact with the build environment's systemd instance (if any). The following change checks if the build is not cross compiling (via 'not env["sysroot"]') before attempting to do a systemd reload. Signed-off-by: James Knight <james.d.knight@live.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 3 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index c3bfd0d1..97c1b3a9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1909,10 +1909,12 @@ udev_install = Utility('udev-install', 'install', [
] + hotplug_wrapper_install)
if env['systemd']:
+ env.Requires(udev_install, systemd_install)
+
+if env['systemd'] and not env["sysroot"]:
systemctl_daemon_reload = Utility('systemctl-daemon-reload', '', ['systemctl daemon-reload || true'])
env.AlwaysBuild(systemctl_daemon_reload)
env.Precious(systemctl_daemon_reload)
- env.Requires(udev_install, systemd_install)
env.Requires(systemctl_daemon_reload, systemd_install)
env.Requires(udev_install, systemctl_daemon_reload)