summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-06-23 18:17:57 -0700
committerGary E. Miller <gem@rellim.com>2018-06-23 18:17:57 -0700
commitc49d1113bf1692081521bd60509643ded775bc31 (patch)
tree87debcc690f538e7e6568ebc314c90aafc327551 /SConstruct
parentbaaf8eff8d4a6199e43851b55c21eae415253a5b (diff)
downloadgpsd-c49d1113bf1692081521bd60509643ded775bc31.tar.gz
Revert "SConstruct: refactor some systemd code"
This reverts commit baaf8eff8d4a6199e43851b55c21eae415253a5b.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct33
1 files changed, 19 insertions, 14 deletions
diff --git a/SConstruct b/SConstruct
index 97b2236e..e337b8a9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2297,11 +2297,6 @@ env.Command('www/hardware.html', ['gpscap.py',
# Note that a udev event can be triggered with an invocation like:
# udevadm trigger --sysname-match=ttyUSB0 --action add
-udev_install = Utility('udev-install', 'install', [
- 'mkdir -p ' + DESTDIR + env['udevdir'] + '/rules.d',
- 'cp $SRCDIR/gpsd.rules ' + DESTDIR + env['udevdir'] +
- '/rules.d/25-gpsd.rules', ] + hotplug_wrapper_install)
-
if env['systemd']:
systemdinstall_target = [env.Install(DESTDIR + systemd_dir,
"systemd/%s" % (x,)) for x in
@@ -2314,23 +2309,33 @@ if env['systemd']:
env.AlwaysBuild(systemd_uninstall)
env.Precious(systemd_uninstall)
- hotplug_wrapper_install = []
- env.Requires(udev_install, systemd_install)
- if 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(systemctl_daemon_reload, systemd_install)
- env.Requires(udev_install, systemctl_daemon_reload)
+if env['systemd']:
+ hotplug_wrapper_install = []
else:
hotplug_wrapper_install = [
'cp $SRCDIR/gpsd.hotplug ' + DESTDIR + env['udevdir'],
'chmod a+x ' + DESTDIR + env['udevdir'] + '/gpsd.hotplug'
]
+udev_install = Utility('udev-install', 'install', [
+ 'mkdir -p ' + DESTDIR + env['udevdir'] + '/rules.d',
+ 'cp $SRCDIR/gpsd.rules ' + DESTDIR + env['udevdir'] +
+ '/rules.d/25-gpsd.rules', ] + 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(systemctl_daemon_reload, systemd_install)
+ env.Requires(udev_install, systemctl_daemon_reload)
+
+
Utility('udev-uninstall', '', [
'rm -f %s/gpsd.hotplug' % env['udevdir'],
'rm -f %s/rules.d/25-gpsd.rules' % env['udevdir'],