aboutsummaryrefslogtreecommitdiffstats
path: root/etc/systemd/system/Makefile.am
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-07-11 19:35:58 -0400
committerBrian Behlendorf <[email protected]>2020-07-14 17:33:44 -0700
commit38e2e9ce8327284b2d516874308300aa96102fe9 (patch)
tree0761f7f696e4da7888a0c99ffb3a91a63ecefdd4 /etc/systemd/system/Makefile.am
parentbdb518c13abb9eca8d6f8f1d9e2096dc5163a9e7 (diff)
Centralize variable substitution
A bunch of places need to edit files to incorporate the configured paths i.e. bindir, sbindir etc. Move this logic into a common file. Create arc_summary by copying arc_summary[23] as appropriate at build time instead of install time. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10559
Diffstat (limited to 'etc/systemd/system/Makefile.am')
-rw-r--r--etc/systemd/system/Makefile.am23
1 files changed, 3 insertions, 20 deletions
diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
index 6476fb1bd..c374a52ac 100644
--- a/etc/systemd/system/Makefile.am
+++ b/etc/systemd/system/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/config/Substfiles.am
+
systemdpreset_DATA = \
50-zfs.preset
@@ -12,27 +14,8 @@ systemdunit_DATA = \
zfs-volumes.target \
zfs.target
-EXTRA_DIST = \
- zfs-zed.service.in \
- zfs-import-cache.service.in \
- zfs-import-scan.service.in \
- zfs-mount.service.in \
- zfs-share.service.in \
- zfs-import.target.in \
- zfs-volume-wait.service.in \
- zfs-volumes.target.in \
- zfs.target.in \
- 50-zfs.preset.in
-
-$(systemdunit_DATA) $(systemdpreset_DATA):%:%.in
- -$(SED) -e 's,@bindir\@,$(bindir),g' \
- -e 's,@runstatedir\@,$(runstatedir),g' \
- -e 's,@sbindir\@,$(sbindir),g' \
- -e 's,@sysconfdir\@,$(sysconfdir),g' \
- $< >'$@'
+SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
ln -sf /dev/null "$(DESTDIR)$(systemdunitdir)/zfs-import.service"
-
-CLEANFILES = $(systemdunit_DATA) $(systemdpreset_DATA)