Don't rebuild ioctl.c and relink libsysdecode if there are no changes
Instead generate a temporary file and only overwrite ioctl.c if the files are actually different. Approved By: jhb (mentor)
This commit is contained in:
parent
4acc8a67ba
commit
23ff19c627
@ -129,12 +129,17 @@ tables.h: mktables
|
||||
# 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
|
||||
ioctl.c.tmp: .PHONY
|
||||
.endif
|
||||
ioctl.c: mkioctls .META
|
||||
ioctl.c.tmp: mkioctls .META
|
||||
env CPP="${CPP}" MK_PF="${MK_PF}" \
|
||||
/bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET}
|
||||
|
||||
ioctl.c: ioctl.c.tmp
|
||||
if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \
|
||||
mv -f ${.TARGET}.tmp ${.TARGET}; \
|
||||
fi
|
||||
|
||||
beforedepend: ioctl.c tables.h
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
Loading…
x
Reference in New Issue
Block a user