Fully honor KERNSRCDIR for 'make universe' if it is set.

MFC after:	1 week
This commit is contained in:
John Baldwin 2011-03-01 14:54:14 +00:00
parent 9c216a50c0
commit 141aca1ff0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219137

View file

@ -336,6 +336,7 @@ MAKE_JUST_WORLDS= YES
.else .else
UNIVERSE_TARGET?= buildworld UNIVERSE_TARGET?= buildworld
.endif .endif
KERNSRCDIR?= ${.CURDIR}/sys
targets: targets:
@echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets"
@ -383,8 +384,8 @@ universe_${target}_${target_arch}: universe_${target}_prologue
.endfor .endfor
.endif .endif
.if !defined(MAKE_JUST_WORLDS) .if !defined(MAKE_JUST_WORLDS)
.if exists(${.CURDIR}/sys/${target}/conf/NOTES) .if exists(${KERNSRCDIR}/${target}/conf/NOTES)
@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
(echo "${target} 'make LINT' failed," \ (echo "${target} 'make LINT' failed," \
"check _.${target}.makeLINT for details"| ${MAKEFAIL})) "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
@ -398,13 +399,13 @@ universe_kernels: universe_kernconfs
.if !defined(TARGET) .if !defined(TARGET)
TARGET!= uname -m TARGET!= uname -m
.endif .endif
KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
! -name DEFAULTS ! -name NOTES ! -name DEFAULTS ! -name NOTES
universe_kernconfs: universe_kernconfs:
.for kernel in ${KERNCONFS} .for kernel in ${KERNCONFS}
TARGET_ARCH_${kernel}!= cd ${.CURDIR}/sys/${TARGET}/conf && \ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} 2> /dev/null | \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
grep -v WARNING: | cut -f 2 grep -v WARNING: | cut -f 2
.if empty(TARGET_ARCH_${kernel}) .if empty(TARGET_ARCH_${kernel})
.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old." .error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old."