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 . if !target(beforeinstallconfig)
35 installconfig: beforeinstallconfig realinstallconfig afterinstallconfig
36 .ORDER: beforeinstallconfig realinstallconfig afterinstallconfig
38 ${group}OWN?= ${SHAREOWN}
39 ${group}GRP?= ${SHAREGRP}
40 ${group}MODE?= ${CONFMODE}
41 ${group}DIR?= ${CONFDIR}
42 STAGE_SETS+= ${group:C,[/*],_,g}
45 . if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*}
46 . if defined(${${group}PACKAGE})
47 ${group}TAGS+= package=${${group}PACKAGE:Uruntime}
49 ${group}TAGS+= package=${PACKAGE:Uruntime}
53 ${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g}
57 . if ${${group}DIR:S/^\///} == ${${group}DIR}
58 # ${group}DIR specifies a variable that specifies a path
60 _${group}DIR= ${${group}DIR}
62 # ${group}DIR specifies a path
64 _${group}DIR= ${group}DIR
67 STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${_${group}DIR}}
69 . for cnf in ${${group}}
70 ${group}OWN_${cnf}?= ${${group}OWN}
71 ${group}GRP_${cnf}?= ${${group}GRP}
72 ${group}MODE_${cnf}?= ${${group}MODE}
73 ${group}DIR_${cnf}?= ${${group}DIR}
74 . if defined(${group}NAME)
75 ${group}NAME_${cnf}?= ${${group}NAME}
77 ${group}NAME_${cnf}?= ${cnf:T}
81 # Determine the directory for the current file. Default to the parent group
82 # DIR, then check to see how to pass that variable on below.
83 ${group}DIR_${cnf}?= ${${group}DIR}
84 . if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}}
85 # DIR specifies a variable that specifies a path
86 _${group}DIR_${cnf}= ${${group}DIR_${cnf}}
88 # DIR directly specifies a path
89 _${group}DIR_${cnf}= ${group}DIR_${cnf}
91 ${group}PREFIX_${cnf}= ${DESTDIR}${${_${group}DIR_${cnf}}}
93 # Append DIR to DIRS if not already in place -- DIRS is already filtered, so
94 # this is primarily to ease inspection.
98 . if ${DIRS:M${_${group}DIR_${cnf}}} == ""
99 . if ${_DIRS:M${${_${group}DIR_${cnf}}}} == ""
100 DIRS+= ${_${group}DIR_${cnf}}
102 _${group}DIR_${cnf}= ${group}DIR
106 . if defined(${group}NAME)
107 ${group}NAME_${cnf}?= ${${group}NAME}
109 ${group}NAME_${cnf}?= ${cnf:T}
110 . endif # defined(${group}NAME)
112 # Work around a bug with install(1) -C and /dev/null
113 . if ${cnf} == "/dev/null"
119 STAGE_AS_SETS+= ${cnf:T}
120 STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}}
121 # XXX {group}OWN,GRP,MODE
122 STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${_${group}DIR_${cnf}}}
123 stage_as.${cnf:T}: ${cnf}
125 realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T}
126 _${group}INS_${cnf:T}: ${cnf}
127 ${INSTALL} ${${group}TAG_ARGS} ${INSTALL_COPY} -o ${${group}OWN_${cnf}} \
128 -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \
129 ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}}
130 . endfor # for cnf in ${${group}}
132 . endif # defined(${group}) && !empty(${group})
135 .if ${MK_STAGING} != "no"
136 . if !empty(STAGE_SETS)
137 buildconfig: stage_files
138 . if !empty(STAGE_AS_SETS)
139 buildconfig: stage_as
144 .endif # !target(__<bsd.confs.mk>__)