-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (23 loc) · 716 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
BIN:=/usr/bin
GOFILES=$(shell go list -f '{{join .GoFiles " "}}')
GOTESTFILES=$(shell go list -f '{{printf "%v %v" (join .GoFiles " ") (join .TestGoFiles " ")}}')
SYSTEMD_USER_DIR="$(HOME)/.config/systemd/user"
CONFIG_DIR="$(HOME)/.config/gsettings-upd"
build: pre-build
go build -o .build/gsettings-upd $(GOFILES)
test:
go test -v $(GOTESTFILES)
clean:
rm -rf .build
pre-build:
mkdir -p .build
install:
cp .build/gsettings-upd $(BIN)
systemd:
mkdir -p "$(SYSTEMD_USER_DIR)"
mkdir -p "$(CONFIG_DIR)"
cp gsettings-upd.service "$(SYSTEMD_USER_DIR)"
cp config.json "$(CONFIG_DIR)"
systemctl --user daemon-reload
systemctl --user enable gsettings-upd
.PHONY: build test clean pre-build install systemd