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 . for group in ${CONFGROUPS}
27 . if defined(${group}) && !empty(${group})
29 . if !target(afterinstallconfig)
32 installconfig: realinstallconfig afterinstallconfig
33 .ORDER: realinstallconfig afterinstallconfig
35 ${group}OWN?= ${SHAREOWN}
36 ${group}GRP?= ${SHAREGRP}
37 ${group}MODE?= ${CONFMODE}
38 ${group}DIR?= ${CONFDIR}
39 STAGE_SETS+= ${group:C,[/*],_,g}
40 STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR}
43 . if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*}
44 . if defined(${${group}PACKAGE})
45 ${group}TAGS+= package=${${group}PACKAGE:Uruntime}
47 ${group}TAGS+= package=${PACKAGE:Uruntime}
51 ${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g}
55 . if ${${group}DIR:S/^\///} == ${${group}DIR}
56 # ${group}DIR specifies a variable that specifies a path
58 _${group}DIR= ${${group}DIR}
60 # ${group}DIR specifies a path
62 _${group}DIR= ${group}DIR
66 . for cnf in ${${group}}
67 ${group}OWN_${cnf}?= ${${group}OWN}
68 ${group}GRP_${cnf}?= ${${group}GRP}
69 ${group}MODE_${cnf}?= ${${group}MODE}
70 ${group}DIR_${cnf}?= ${${group}DIR}
71 . if defined(${group}NAME)
72 ${group}NAME_${cnf}?= ${${group}NAME}
74 ${group}NAME_${cnf}?= ${cnf:T}
78 # Determine the directory for the current file. Default to the parent group
79 # DIR, then check to see how to pass that variable on below.
80 ${group}DIR_${cnf}?= ${${group}DIR}
81 . if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}}
82 # DIR specifies a variable that specifies a path
83 _${group}DIR_${cnf}= ${${group}DIR_${cnf}}
85 # DIR directly specifies a path
86 _${group}DIR_${cnf}= ${group}DIR_${cnf}
88 ${group}PREFIX_${cnf}= ${DESTDIR}${${_${group}DIR_${cnf}}}
90 # Append DIR to DIRS if not already in place -- DIRS is already filtered, so
91 # this is primarily to ease inspection.
95 . if ${DIRS:M${_${group}DIR_${cnf}}} == ""
96 . if ${_DIRS:M${${_${group}DIR_${cnf}}}} == ""
97 DIRS+= ${_${group}DIR_${cnf}}
99 _${group}DIR_${cnf}= ${group}DIR
103 . if defined(${group}NAME)
104 ${group}NAME_${cnf}?= ${${group}NAME}
106 ${group}NAME_${cnf}?= ${cnf:T}
107 . endif # defined(${group}NAME)
109 # Work around a bug with install(1) -C and /dev/null
110 . if ${cnf} == "/dev/null"
116 STAGE_AS_SETS+= ${cnf:T}
117 STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}}
118 # XXX {group}OWN,GRP,MODE
119 STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}}
120 stage_as.${cnf:T}: ${cnf}
122 realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T}
123 _${group}INS_${cnf:T}: ${cnf}
124 ${INSTALL} ${${group}TAG_ARGS} ${INSTALL_COPY} -o ${${group}OWN_${cnf}} \
125 -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \
126 ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}}
127 . endfor # for cnf in ${${group}}
129 . endif # defined(${group}) && !empty(${group})
132 .if ${MK_STAGING} != "no"
133 . if !empty(STAGE_SETS)
134 buildconfig: stage_files
135 . if !empty(STAGE_AS_SETS)
136 buildconfig: stage_as
141 .endif # !target(__<bsd.confs.mk>__)