Lines of
service.mk
from check-in cbff0b494f
that are changed by the sequence of edits moving toward
check-in 8af24b112b:
1: SCRIPTS:=${:!find /etc/mrc -name '*.service.mk'!:S/^\/etc\/mrc\///:S/.service.mk$//}
2:
3: .include "starter.mk"
4:
5: # Create service targets
6: .for service in ${SCRIPTS}
7: . include "${service}.service.mk"
8:
9: # Set DAEMON defaults
10: DAEMON_${service}_CWD?= /
11: DAEMON_${service}_ENABLE?= no
12: DAEMON_${service}_USER?= root
13: DAEMON_${service}_GROUP?= wheel
14:
15: . if !defined(DAEMON_${service}_COMMAND)
16: . warning MRC> Service [${service}] defunct: no COMMAND specified
17: . else
18:
19: # Service creation targets
20: . if !target(${service})
cbff0b494f 2023-08-18 21: ${service}: ${SERVICE_EXIT} ${_SERVICE}
22: . endif
23:
24: # Service status targets
25: . if !target(${service}_status)
26: ${service}_status: ${_SERVICE_STATUS}
27: . endif
28:
29: # Service exit targets
30: . if !target(${service}_exit)
31: ${service}_exit: ${_SERVICE_EXIT} ${DAEMON_${service}_DEPS:S/$/_exit/}
32: . endif
33:
34: DAEMON_EXIT: ${service}_exit
35: . endif
36: .endfor
37:
38: .MAIN: ${SCRIPTS} ${TARGETS}
39:
40: .PHONY: ${SCRIPTS} ${OTHER_TARGETS} ${TARGETS}
41:
42: .undef SCRIPTS