Teach this to create the "machine" and ${MACHINE_ARCH} (for pc98
only now) symbolic links in the kernel compile directory, rather than relying on config(8) to do this. (The changes to config(8) will be committed separately.) This is aimed towards making the config(8) as lightweight as possible. Idea by: bde (all bugs are mine)
This commit is contained in:
parent
f0caeb4419
commit
a90232e1f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152964
@ -112,7 +112,7 @@ kernel-clean:
|
||||
linterrs makelinks tags vers.c \
|
||||
vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
|
||||
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
|
||||
${CLEAN}
|
||||
${CLEAN} ${_ILINKS}
|
||||
|
||||
lint: ${LNFILES}
|
||||
${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC} 2>&1 | \
|
||||
@ -141,9 +141,10 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
|
||||
kernel-depend: .depend
|
||||
# The argument list can be very long, so use make -V and xargs to
|
||||
# pass it to mkdep.
|
||||
.depend: assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \
|
||||
${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
|
||||
${MFILES:T:S/.m$/.h/}
|
||||
SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \
|
||||
${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
|
||||
${MFILES:T:S/.m$/.h/}
|
||||
.depend: ${SRCS}
|
||||
rm -f .newdep
|
||||
${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | \
|
||||
MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS}
|
||||
@ -152,6 +153,28 @@ kernel-depend: .depend
|
||||
rm -f .depend
|
||||
mv .newdep .depend
|
||||
|
||||
_ILINKS= machine
|
||||
.if ${MACHINE} != ${MACHINE_ARCH}
|
||||
_ILINKS+= ${MACHINE_ARCH}
|
||||
.endif
|
||||
|
||||
# Ensure that the link exists without depending on it when it exists.
|
||||
.for _link in ${_ILINKS}
|
||||
.if !exists(${.OBJDIR}/${_link})
|
||||
${SRCS}: ${_link}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
${_ILINKS}:
|
||||
@case ${.TARGET} in \
|
||||
machine) \
|
||||
path=${S}/${MACHINE}/include ;; \
|
||||
${MACHINE_ARCH}) \
|
||||
path=${S}/${MACHINE_ARCH}/include ;; \
|
||||
esac ; \
|
||||
${ECHO} ${.TARGET} "->" $$path ; \
|
||||
ln -s $$path ${.TARGET}
|
||||
|
||||
kernel-cleandepend:
|
||||
rm -f .depend
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user