bsd.confs.mk revision 289114
1289085Sbapt# $FreeBSD: head/share/mk/bsd.confs.mk 289114 2015-10-10 10:48:09Z bapt $ 2289085Sbapt 3289085Sbapt.if !target(__<bsd.init.mk>__) 4289085Sbapt.error bsd.conf.mk cannot be included directly. 5289085Sbapt.endif 6289085Sbapt 7289085Sbapt.if ${MK_INCLUDES} != "no" 8289085SbaptCONFGROUPS?= CONFS 9289085Sbapt 10289085Sbapt.if !target(buildconfig) 11289085Sbapt.for group in ${CONFSGROUPS} 12289085Sbaptbuildconfig: ${${group}} 13289085Sbapt.endfor 14289085Sbapt.endif 15289085Sbapt 16289085Sbaptall: buildconfig 17289085Sbapt 18289085Sbapt.if !target(installconfig) 19289085Sbapt.for group in ${CONFGROUPS} 20289085Sbapt.if defined(${group}) && !empty(${group}) 21289085Sbapt 22289085Sbapt${group}OWN?= ${SHAREOWN} 23289085Sbapt${group}GRP?= ${SHAREGRP} 24289090Sbapt${group}MODE?= ${CONFMODE} 25289114Sbapt${group}DIR?= ${CONFIGDIR}/ 26289085SbaptSTAGE_SETS+= ${group} 27289085SbaptSTAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR} 28289085SbaptSTAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP} 29289085Sbapt 30289085Sbapt_${group}CONFS= 31289085Sbapt.for cnf in ${${group}} 32289085Sbapt.if defined(${group}OWN_${cnf:T}) || defined(${group}GRP_${cnf:T}) || \ 33289085Sbapt defined(${group}MODE_${cnf:T}) || defined(${group}DIR_${cnf:T}) || \ 34289085Sbapt defined(${group}NAME_${cnf:T}) || defined(${group}NAME) 35289085Sbapt${group}OWN_${cnf:T}?= ${${group}OWN} 36289085Sbapt${group}GRP_${cnf:T}?= ${${group}GRP} 37289085Sbapt${group}MODE_${cnf:T}?= ${${group}MODE} 38289085Sbapt${group}DIR_${cnf:T}?= ${${group}DIR} 39289085Sbapt.if defined(${group}NAME) 40289085Sbapt${group}NAME_${cnf:T}?= ${${group}NAME} 41289085Sbapt.else 42289085Sbapt${group}NAME_${cnf:T}?= ${cnf:T} 43289085Sbapt.endif 44289085SbaptSTAGE_AS_SETS+= ${cnf:T} 45289085SbaptSTAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} 46289085Sbapt# XXX {group}OWN,GRP,MODE 47289085SbaptSTAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} 48289085Sbaptstage_as.${cnf:T}: ${cnf} 49289085Sbaptstage_config: stage_as.${cnf:T} 50289085Sbapt 51289085Sbaptinstallconfig: _${group}INS_${cnf:T} 52289085Sbapt_${group}INS_${cnf:T}: ${cnf} 53289085Sbapt ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ 54289085Sbapt -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ 55289085Sbapt ${.ALLSRC} \ 56289085Sbapt ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} 57289085Sbapt.else 58289085Sbapt_${group}CONFS+= ${cnf} 59289085Sbapt.endif 60289085Sbapt.endfor 61289085Sbapt.if !empty(_${group}CONFS) 62289085Sbaptstage_files.${group}: ${_${group}CONFS} 63289085Sbaptstage_config: stage_files.${group} 64289085Sbapt 65289085Sbaptinstallconfig: _${group}INS 66289085Sbapt_${group}INS: ${_${group}CONFS} 67289085Sbapt.if defined(${group}NAME) 68289085Sbapt ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ 69289085Sbapt ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} 70289085Sbapt.else 71289085Sbapt ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ 72289085Sbapt ${.ALLSRC} ${DESTDIR}${${group}DIR} 73289085Sbapt.endif 74289085Sbapt.endif 75289085Sbapt 76289085Sbapt.endif # defined(${group}) && !empty(${group}) 77289085Sbapt.endfor 78289085Sbapt 79289085Sbapt.endif # !target(installconfig) 80289085Sbapt 81289085Sbapt.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD) 82289085Sbapt.if !defined(NO_STAGE_CONFIG) 83289085SbaptSTAGE_TARGETS+= stage_config 84289085Sbapt.endif 85289085Sbapt.endif 86289085Sbapt 87289085Sbapt.endif # ${MK_TOOLCHAIN} != "no" 88