3 .if !target(__<bsd.init.mk>__)
4 . error bsd.conf.mk cannot be included directly.
7 .if !target(__<bsd.confs.mk>__)
8 . if target(__<bsd.dirs.mk>__)
9 . error bsd.dirs.mk must be included after bsd.confs.mk.
16 . if !target(buildconfig)
17 . for group in ${CONFGROUPS}
18 buildconfig: ${${group}}
22 . if !defined(_SKIP_BUILD)
26 . if !target(installconfig)
27 . for group in ${CONFGROUPS}
28 . if defined(${group}) && !empty(${group})
30 . if !target(afterinstallconfig)
33 installconfig: realinstallconfig afterinstallconfig
34 .ORDER: realinstallconfig afterinstallconfig
36 ${group}OWN?= ${SHAREOWN}
37 ${group}GRP?= ${SHAREGRP}
38 ${group}MODE?= ${CONFMODE}
39 ${group}DIR?= ${CONFDIR}
40 STAGE_SETS+= ${group:C,[/*],_,g}
41 STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR}
44 . if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*}
45 . if defined(${${group}PACKAGE})
46 ${group}TAGS+= package=${${group}PACKAGE:Uruntime}
48 ${group}TAGS+= package=${PACKAGE:Uruntime}
52 ${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g}
56 . if ${${group}DIR:S/^\///} == ${${group}DIR}
57 # ${group}DIR specifies a variable that specifies a path
59 _${group}DIR= ${${group}DIR}
61 # ${group}DIR specifies a path
63 _${group}DIR= ${group}DIR
67 . for cnf in ${${group}}
68 ${group}OWN_${cnf}?= ${${group}OWN}
69 ${group}GRP_${cnf}?= ${${group}GRP}
70 ${group}MODE_${cnf}?= ${${group}MODE}
71 ${group}DIR_${cnf}?= ${${group}DIR}
72 . if defined(${group}NAME)
73 ${group}NAME_${cnf}?= ${${group}NAME}
75 ${group}NAME_${cnf}?= ${cnf:T}
79 # Determine the directory for the current file. Default to the parent group
80 # DIR, then check to see how to pass that variable on below.
81 ${group}DIR_${cnf}?= ${${group}DIR}
82 . if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}}
83 # DIR specifies a variable that specifies a path
84 _${group}DIR_${cnf}= ${${group}DIR_${cnf}}
86 # DIR directly specifies a path
87 _${group}DIR_${cnf}= ${group}DIR_${cnf}
89 ${group}PREFIX_${cnf}= ${DESTDIR}${${_${group}DIR_${cnf}}}
91 # Append DIR to DIRS if not already in place -- DIRS is already filtered, so
92 # this is primarily to ease inspection.
96 . if ${DIRS:M${_${group}DIR_${cnf}}} == ""
97 . if ${_DIRS:M${${_${group}DIR_${cnf}}}} == ""
98 DIRS+= ${_${group}DIR_${cnf}}
100 _${group}DIR_${cnf}= ${group}DIR
104 . if defined(${group}NAME)
105 ${group}NAME_${cnf}?= ${${group}NAME}
107 ${group}NAME_${cnf}?= ${cnf:T}
108 . endif # defined(${group}NAME)
111 STAGE_AS_SETS+= ${cnf:T}
112 STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}}
113 # XXX {group}OWN,GRP,MODE
114 STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}}
115 stage_as.${cnf:T}: ${cnf}
117 realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T}
118 _${group}INS_${cnf:T}: ${cnf}
119 ${INSTALL} ${${group}TAG_ARGS} -C -o ${${group}OWN_${cnf}} \
120 -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \
121 ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}}
122 . endfor # for cnf in ${${group}}
125 . endif # defined(${group}) && !empty(${group})
128 .endif # !target(installconfig)
130 .if ${MK_STAGING} != "no"
131 . if !empty(STAGE_SETS)
132 buildconfig: stage_files
133 . if !empty(STAGE_AS_SETS)
134 buildconfig: stage_as
139 .endif # !target(__<bsd.confs.mk>__)