Lines of
Makefile
from check-in e71c4b0c63
that are changed by the sequence of edits moving toward
check-in 4361bde8b2:
1: .include "defaults.mk"
2: .include "/etc/mrc.mk"
3: .export
4:
5: OTHER_TARGETS:=_service _earlyservice
6: STARTER?=svc
7:
8: .for starter in ${:!find /etc/mrc -name '*.starter.mk'!:S/\/etc\/mrc\///}
9: .include "${starter}"
10: .endfor
11:
12: .if !target(_service) || !target(_earlyservice)
13: .error No service handler defined.
14: .endif
15:
e71c4b0c63 2020-05-26 16: #.MAKE.JOBS?=2
17: .SILENT:
18:
19: install:
20: install rc /etc/rc
21:
22: SCRIPTS=${:!find /etc/mrc -name '*.service.mk'!:S/\/etc\/mrc\///}
23:
24: .if defined(AUTOBOOT)
25: .include "init.mk"
26:
27: .ERROR:
28: : ERROR: ABORTING BOOT (sending SIGTERM to parent)!
29: : target ${.ERROR_TARGET} failed to execute:
30: : ${.ERROR_CMD}
31: kill 1
32: .else
33: DAEMON: NETWORK SERVERS
34: LOGIN: DAEMON
35: NETWORK:
36: SERVERS:
37: SERVICE:
38:
39: mount:
40: root:
41: netif:
42: newsyslog:
43: .endif
44:
45: test:
46: echo Empty target.
e71c4b0c63 2020-05-26 47:
e71c4b0c63 2020-05-26 48: TARGETS:=${SCRIPTS:S/.service.mk//}
49:
50: .for file in ${SCRIPTS}
51: #.info ${file}
52: .include "${file}"
53: .if !target(${file:S/.service.mk//})
54: ${file:S/.service.mk//}: _service
55: .endif
56: .if !target(${file:S/.service.mk/_status/})
57: ${file:S/.service.mk/_status/}: _status
58: .endif
59: .if !target(${file:S/.service.mk/_restart/})
60: ${file:S/.service.mk/_restart/}: _restart
61: .endif
62: .endfor
63:
64: .MAIN: ${TARGETS}
65:
66: .PHONY: ${TARGETS} ${OTHER_TARGETS}
67:
68: .undef TARGETS OTHER_TARGETS SCRIPTS
69:
70: ENABLED=${:!env!:C/=.*//:M*_ENABLE}
71:
72: .for var in ${ENABLED}
73: .if !empty(${var}:tl:Mno)
74: #.info ${var}
75: .undef ${var}
76: .endif
77: .endfor
78:
79: .undef ENABLED
80: .unexport-env
81: .export
82: #.info ${:!env!}