summaryrefslogtreecommitdiff
path: root/package/targets.mak
blob: ce3d7b2063e87255bcb50d4f94f997c8c374ee04 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
BIN_TARGETS := \
s6-frontend-config-preprocess

LIBEXEC_TARGETS :=

WRAP_ANY :=

ifdef WRAP_DAEMONTOOLS

ifdef WRAP_SYMLINKS

WRAP_ANY := 1

DAEMONTOOLS_TARGETS := \
envdir \
envuidgid \
fghack \
multilog \
pgrphack \
readproctitle \
setlock \
setuidgid \
softlimit \
supervise \
svc \
svok \
svscan \
svscanboot \
svstat \
tai64n \
tai64nlocal

else

DAEMONTOOLS_TARGETS :=

endif

install-bin: $(DAEMONTOOLS_TARGETS:%=$(DESTDIR)$(bindir)/%)

ifneq ($(exthome),)
global-links: $(DAEMONTOOLS_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
endif

endif

ifdef WRAP_RUNIT

ifdef WRAP_SYMLINKS

WRAP_ANY := 1

RUNIT_TARGETS := \
runit \
runit-init \
runsv \
runsvchdir \
runsvdir \
svlogd \
utmpset

else

RUNIT_TARGETS :=

endif

RUNIT_SPECIAL_TARGETS := chpst sv
BIN_TARGETS += s6-frontend-alias-sv s6-frontend-alias-chpst

install-bin: $(RUNIT_TARGETS:%=$(DESTDIR)$(bindir)/%) $(RUNIT_SPECIAL_TARGETS:%=$(DESTDIR)$(bindir)/%)

ifneq ($(exthome),)
global-links: $(RUNIT_TARGETS:%=$(DESTDIR)$(sproot)/command/%) $(RUNIT_SPECIAL_TARGETS:%=$(DESTDIR)$(sproot)/command/%)
endif

$(DESTDIR)$(bindir)/chpst: $(DESTDIR)$(bindir)/s6-frontend-alias-chpst
	 exec $(INSTALL) -D -l s6-frontend-alias-chpst $@
$(DESTDIR)$(bindir)/sv: $(DESTDIR)$(bindir)/s6-frontend-alias-sv
	 exec $(INSTALL) -D -l s6-frontend-alias-sv $@

endif

ifdef WRAP_ANY

BIN_TARGETS += s6-frontend-alias

$(DAEMONTOOLS_TARGETS:%=$(DESTDIR)$(bindir)/%) $(RUNIT_TARGETS:%=$(DESTDIR)$(bindir)/%): $(DESTDIR)$(bindir)/s6-frontend-alias
	 exec $(INSTALL) -D -l s6-frontend-alias $@

endif