Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.files.mk
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
.endif | .endif | ||||
.if defined(${group}NAME) | .if defined(${group}NAME) | ||||
${group}NAME_${file}?= ${${group}NAME} | ${group}NAME_${file}?= ${${group}NAME} | ||||
.else | .else | ||||
${group}NAME_${file}?= ${file:T} | ${group}NAME_${file}?= ${file:T} | ||||
.endif # defined(${group}NAME) | .endif # defined(${group}NAME) | ||||
STAGE_AS_SETS+= ${file} | |||||
STAGE_AS_${file}= ${${group}NAME_${file}} | STAGE_AS_${file}= ${${group}NAME_${file}} | ||||
# XXX {group}OWN,GRP,MODE | # we cannot use file safely as a set name | ||||
STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}} | # since we cannot? apply :T | ||||
stage_as.${file}: ${file} | # but we can use the ${group}DIR_${file} | ||||
# as a set - meta.stage.mk will :O:u for us | |||||
# we need to expand ${group}DIR_${file} and replace | |||||
# all '/' and '*' with '_' to make a safe target name. | |||||
STAGE_AS_SETS+= ${${_${group}DIR_${file}}:C,[/*],_,g} | |||||
STAGE_DIR.${${_${group}DIR_${file}}:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR_${file}} | |||||
stage_as.${${_${group}DIR_${file}}:C,[/*],_,g}: ${file} | |||||
installfiles-${group}: _${group}INS1_${file} | installfiles-${group}: _${group}INS1_${file} | ||||
_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} | _${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} | ||||
_${group}INS_${file}: ${file} | _${group}INS_${file}: ${file} | ||||
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ | ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ | ||||
-g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ | -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ | ||||
${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} | ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} | ||||
.endfor # file in ${${group}} | .endfor # file in ${${group}} | ||||
.endif # defined(${group}) && !empty(${group}) | .endif # defined(${group}) && !empty(${group}) | ||||
.endfor # .for group in ${FILESGROUPS} | .endfor # .for group in ${FILESGROUPS} | ||||
realinstall: installfiles | realinstall: installfiles | ||||
.ORDER: beforeinstall installfiles | .ORDER: beforeinstall installfiles | ||||
.if ${MK_STAGING} != "no" | .if ${MK_STAGING} != "no" | ||||
.if ${FILESGROUPS:@g@${$g}@} != "" | |||||
.if !empty(STAGE_SETS) | .if !empty(STAGE_SETS) | ||||
buildfiles: stage_files | buildfiles: stage_files | ||||
STAGE_TARGETS+= stage_files | STAGE_TARGETS+= stage_files | ||||
stage_files: | |||||
.if !empty(STAGE_AS_SETS) | .if !empty(STAGE_AS_SETS) | ||||
buildfiles: stage_as | buildfiles: stage_as | ||||
STAGE_TARGETS+= stage_as | STAGE_TARGETS+= stage_as | ||||
stage_as: | |||||
.endif | |||||
.endif | .endif | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.include <bsd.dirs.mk> | .include <bsd.dirs.mk> | ||||
.endif # !target(__<bsd.files.mk>__) | .endif # !target(__<bsd.files.mk>__) |