From owner-svn-src-all@freebsd.org Mon Apr 18 18:14:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 784BFB13D4F; Mon, 18 Apr 2016 18:14:03 +0000 (UTC) (envelope-from bdrewery@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 mx1.freebsd.org (Postfix) with ESMTPS id 49440152B; Mon, 18 Apr 2016 18:14:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3IIE2XQ059302; Mon, 18 Apr 2016 18:14:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3IIE22P059301; Mon, 18 Apr 2016 18:14:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201604181814.u3IIE22P059301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 18 Apr 2016 18:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298219 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 18:14:03 -0000 Author: bdrewery Date: Mon Apr 18 18:14:02 2016 New Revision: 298219 URL: https://svnweb.freebsd.org/changeset/base/298219 Log: Cause an error during 'make install' if trying to compile with CC. This is limited to src-tree builds, meaning not extended to ports or other out-of-tree builds. This will help ensure that read-only OBJDIRS will be respected at install-time by causing a more consistent failure for those who don't use a read-only OBJDIR. It also will cause Jenkins to yell. This is a better solution than trying to see CC=false as has been attempted and discussed before. Of course this is only relevant for files generated by CC. Disable this for META_MODE since it will detect the CFLAGS/command change and force a rebuild. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Mon Apr 18 18:13:58 2016 (r298218) +++ head/share/mk/bsd.sys.mk Mon Apr 18 18:14:02 2016 (r298219) @@ -178,6 +178,13 @@ ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} +.if defined(SRCTOP) +# Prevent rebuilding during install to support read-only objdirs. +.if make(install) && empty(.MAKE.MODE:Mmeta) +CFLAGS+= ERROR-tried-to-rebuild-during-make-install +.endif +.endif + # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \