diff --git a/Makefile.inc1 b/Makefile.inc1 index 5db4acbeaa3..d78cfd26a16 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -676,9 +676,6 @@ _worldtmp: .PHONY .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These can depend on any header file. - rm -f ${OBJTREE}${.CURDIR}/lib/libsysdecode/ioctl.c - rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c .endif .for _dir in \ lib lib/casper usr legacy/bin legacy/usr diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 692bfbf6f08..b84ef4e615b 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -114,7 +114,12 @@ DEPENDOBJS+= tables.h tables.h: mktables sh ${.CURDIR}/mktables ${DESTDIR}${INCLUDEDIR} ${.TARGET} -ioctl.c: mkioctls +# mkioctls runs find(1) for headers so needs to rebuild every time. This used +# to be a hack only done in buildworld. +.if !defined(_SKIP_BUILD) +ioctl.c: .PHONY +.endif +ioctl.c: mkioctls .META env MACHINE=${MACHINE} CPP="${CPP}" \ /bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET}