Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -712,6 +712,21 @@ .else rm -rf ${WORLDTMP}/legacy/usr/include .endif +# Dependencies cannot cope with certain source tree changes, particularly +# with respect to removing source files and replacing generated files. +# Handle these cases here in an ad-hoc fashion. +# 20170523 remove stale generated asm files for functions which are no longer +# syscalls after r318736 +.if exists(${OBJTREE}${.CURDIR}/lib/libc/getdents.s) || \ + exists(${OBJTREE}${.CURDIR}/lib/libc/getdents.S) + @echo removing stale generated syscall asm files +.for f in getdents lstat mknod stat + @rm -f ${OBJTREE}${.CURDIR}/lib/libc/${f}.* \ + @rm -f ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \ + @rm -f ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/${f}.* \ + @rm -f ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.* +.endfor +.endif .for _dir in \ lib lib/casper usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir}