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