Author: arichardson
Date: Mon Aug 20 10:59:49 2018
New Revision: 338099
URL: https://svnweb.freebsd.org/changeset/base/338099
Log:
  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)

Modified:
  head/lib/libsysdecode/Makefile

Modified: head/lib/libsysdecode/Makefile
==============================================================================
--- head/lib/libsysdecode/Makefile      Mon Aug 20 10:39:53 2018        
(r338098)
+++ head/lib/libsysdecode/Makefile      Mon Aug 20 10:59:49 2018        
(r338099)
@@ -129,11 +129,16 @@ 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
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to