From owner-svn-src-head@freebsd.org Mon Aug 20 10:59:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA70108C885; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62D18872A9; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4404014581; Mon, 20 Aug 2018 10:59:50 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KAxoXw089729; Mon, 20 Aug 2018 10:59:50 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KAxoIt089728; Mon, 20 Aug 2018 10:59:50 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201808201059.w7KAxoIt089728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Mon, 20 Aug 2018 10:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338099 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 338099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 10:59:50 -0000 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