summaryrefslogtreecommitdiffstats
path: root/extras/systemd/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'extras/systemd/Makefile.am')
-rw-r--r--extras/systemd/Makefile.am22
1 files changed, 14 insertions, 8 deletions
diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am
index 3fc656b8262..61446a9b84a 100644
--- a/extras/systemd/Makefile.am
+++ b/extras/systemd/Makefile.am
@@ -1,11 +1,17 @@
+CLEANFILES = glusterd.service glustereventsd.service glusterfssharedstorage.service gluster-ta-volume.service
+EXTRA_DIST = glusterd.service.in glustereventsd.service.in glusterfssharedstorage.service.in gluster-ta-volume.service.in
-CLEANFILES =
+if USE_SYSTEMD
+systemd_DATA = gluster-ta-volume.service
+endif
-SYSTEMD_DIR = @systemddir@
-
-install-exec-local:
- @if [ -d $(SYSTEMD_DIR) ]; then \
- $(mkdir_p) $(DESTDIR)$(SYSTEMD_DIR); \
- $(INSTALL_PROGRAM) glusterd.service $(DESTDIR)$(SYSTEMD_DIR)/; \
- fi
+if WITH_SERVER
+if USE_SYSTEMD
+# systemddir is already defined through configure.ac
+systemd_DATA += glusterd.service glusterfssharedstorage.service
+if BUILD_EVENTS
+systemd_DATA += glustereventsd.service
+endif
+endif
+endif