Permalink
Browse files

build fix for older systemd

Some older versions of systemd don't have 'systemdutildir' in the
pkg-config data, so we end up with files in weird places.

If that's the case, just set UTILDIR to the directory above the UNITDIR.
  • Loading branch information...
1 parent 4e1ca1e commit 9225b62fa205c0476c58fdb1a900dbe397f7fe89 @wgwoods wgwoods committed Nov 25, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 systemd/Makefile
View
@@ -1,8 +1,12 @@
SERVICES=upgrade-prep.service upgrade-switch-root.service
TARGETS=system-upgrade.target upgrade-switch-root.target
SCRIPTS=upgrade-prep.sh
-UTILDIR=$(DESTDIR)$(shell pkg-config systemd --variable systemdutildir)
UNITDIR=$(DESTDIR)$(shell pkg-config systemd --variable systemdsystemunitdir)
+UTILDIR=$(DESTDIR)$(shell pkg-config systemd --variable systemdutildir)
+ifeq ($(strip $(UTILDIR)),$(DESTDIR))
+ # Older systemd doesn't have this in its pkg-config, so..
+ UTILDIR=$(UNITDIR)/..
+endif
INSTALL=install -p
all:

0 comments on commit 9225b62

Please sign in to comment.