Skip to content

Commit 970485a

Browse files
committed
systemd: Fix out-of-tree builds
The systemd unit file installation does not work when the build directory differs from the source directory because cp cannot find the source file. Prefix the unit files with $(srcdir) to reference files from the source tree. This fixes out-of-tree builds which use separate build directories (B != S). Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent deb2071 commit 970485a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

systemd/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ MAINTAINERCLEANFILES = Makefile.in
2424
if INSTALL_SYSTEMD
2525
install-data-hook: $(unit_files)
2626
mkdir -p $(DESTDIR)/$(unitdir)
27-
cp $(unit_files) $(DESTDIR)/$(unitdir)
27+
cp $(addprefix $(srcdir)/,$(unit_files)) $(DESTDIR)/$(unitdir)
2828
endif

0 commit comments

Comments
 (0)