aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode/Makefile
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2018-08-20 10:59:49 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2018-08-20 10:59:49 +0000
commit23ff19c6275b10ba8f17dd389630ce4a6585941e (patch)
treed76435162823a5970837bcaa2f12292aab367c59 /lib/libsysdecode/Makefile
parent4acc8a67bad0a91dd9dbe07f2904a5dfdf313817 (diff)
Notes
Diffstat (limited to 'lib/libsysdecode/Makefile')
-rw-r--r--lib/libsysdecode/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile
index a37d05de20c4..97af7dc7cade 100644
--- a/lib/libsysdecode/Makefile
+++ b/lib/libsysdecode/Makefile
@@ -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>