blob: a37cb6279533a50343fc286f3f7e410f8f325856 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
prefix = /usr
rootprefix = $(prefix)
rootlibexecdir = $(rootprefix)/lib/systemd
systemunitdir=$(rootprefix)/lib/systemd/system
TIMESYNCD_PATH = $(rootlibexecdir)/systemd-timesyncd
RM = /usr/bin/rm
####
files.out.all += systemd-timesyncd-wait
files.out.all += systemd-timesyncd-wrap
files.out.all += systemd-timesyncd.service.d-wait.conf
files.out.all += systemd-timesyncd-wait.service
files.sys.all += $(rootlibexecdir)/systemd-timesyncd-wait
files.sys.all += $(rootlibexecdir)/systemd-timesyncd-wrap
files.sys.all += $(systemunitdir)/systemd-timesyncd-wait.socket
files.sys.all += $(systemunitdir)/systemd-timesyncd-wait.service
files.sys.all += $(systemunitdir)/systemd-timesyncd.service.d/wait.conf
outdir = .
srcdir = .
all: $(addprefix $(outdir)/,$(files.out.all))
clean:
rm -f -- $(addprefix $(outdir)/,$(files.out.all))
install: $(addprefix $(DESTDIR),$(files.sys.all))
.PHONY: all clean install
$(outdir)/%: $(srcdir)/%.go
go build -o $@ $<
vars = rootlibexecdir TIMESYNCD_PATH RM
$(outdir)/%: $(srcdir)/%.in
sed $(foreach v,$(vars),-e 's|@$v@|$($v)|g') < $< > $@
$(DESTDIR)$(rootlibexecdir)/%: $(outdir)/%
install -DTm755 $< $@
$(DESTDIR)$(systemunitdir)/%: $(srcdir)/%
install -DTm644 $< $@
$(DESTDIR)$(systemunitdir)/systemd-timesyncd.service.d/wait.conf: $(outdir)/systemd-timesyncd.service.d-wait.conf
install -DTm644 $< $@
.SECONDARY:
.DELETE_ON_ERROR:
|