summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-09 16:59:15 +0100
committerGuido Günther <agx@sigxcpu.org>2017-02-09 17:15:40 +0100
commitc52a81288630c53b4bbefcb15bfd4e8868cc5163 (patch)
treef220df3484c5a8dedaa0195523bda4bacdca66a8 /Makefile
parent48ca448bfca0c23ba44c3a8137610f81d546ae61 (diff)
Add systemd user unitHEADmaster
We use /bin/sh so we have an absolute path
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 33198e9..a50d917 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
ERL ?= erl
APP := simplec
+USER_UNITS := ~/.config/systemd/user/
+SERVICE := $(APP).service
.PHONY: deps
@@ -26,6 +28,17 @@ test: all
tags:
find . -name "*.[he]rl" -print | etags -
+install_user: test
+ cp priv/$(SERVICE) $(USER_UNITS)/$(SERVICE)
+ mkdir -p ~/bin/
+ ln -s $$(realpath .)/$(APP) ~/bin/$(APP)
+ systemctl --user enable $(SERVICE)
+
+uninstall_user:
+ systemctl --user stop $(SERVICE)
+ systemctl --user disable $(SERVICE)
+ rm -f $(USER_UNITS)/$(SERVICE) ~/bin/$(APP)
+
DEPSOLVER_PLT=$(CURDIR)/.depsolver_plt
$(DEPSOLVER_PLT):
dialyzer --output_plt $(DEPSOLVER_PLT) --build_plt \