From owner-svn-src-all@freebsd.org Tue Apr 19 12:16:02 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 2EF2CB1425B; Tue, 19 Apr 2016 12:16:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B385E1354; Tue, 19 Apr 2016 12:16:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u3JCFpec081405 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 19 Apr 2016 15:15:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u3JCFpec081405 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u3JCFpve081403; Tue, 19 Apr 2016 15:15:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Apr 2016 15:15:51 +0300 From: Konstantin Belousov To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298219 - head/share/mk Message-ID: <20160419121551.GX2422@kib.kiev.ua> References: <201604181814.u3IIE22P059301@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <201604181814.u3IIE22P059301@repo.freebsd.org> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Tue, 19 Apr 2016 12:16:02 -0000 On Mon, Apr 18, 2016 at 06:14:02PM +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Mon Apr 18 18:14:02 2016 > New Revision: 298219 > URL: https://svnweb.freebsd.org/changeset/base/298219 >=20 > Log: > Cause an error during 'make install' if trying to compile with CC. > =20 > This is limited to src-tree builds, meaning not extended to ports or ot= her > out-of-tree builds. > =20 > This will help ensure that read-only OBJDIRS will be respected at insta= ll-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=3Dfalse as has been attempted and discussed before. > =20 > Of course this is only relevant for files generated by CC. > =20 > Disable this for META_MODE since it will detect the CFLAGS/command > change and force a rebuild. > =20 > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/share/mk/bsd.sys.mk >=20 > Modified: head/share/mk/bsd.sys.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- 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+=3D ${ACFLAGS.${.IMPSRC:T}} > CFLAGS+=3D ${CFLAGS.${.IMPSRC:T}} > CXXFLAGS+=3D ${CXXFLAGS.${.IMPSRC:T}} > =20 > +.if defined(SRCTOP) > +# Prevent rebuilding during install to support read-only objdirs. > +.if make(install) && empty(.MAKE.MODE:Mmeta) > +CFLAGS+=3D ERROR-tried-to-rebuild-during-make-install > +.endif > +.endif > + > # Tell bmake not to mistake standard targets for things to be searched f= or > # or expect to ever be up-to-date. > PHONY_NOTMAIN =3D analyze afterdepend afterinstall all beforedepend befo= reinstall \ It seems to cause the following behaviour: make buildenv cd lib/libthr # make DEBUG_FLAGS=3D-g WITHOUT_TESTS=3Dyes all install cc -O2 -pipe -DPTHREAD_KERNEL -I/usr/home/kostik/work/build/bsd/DEV/src= /lib/libthr/../libc/include -I/usr/home/kostik/work/build/bsd/DEV/src/lib/l= ibthr/thread -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/../../in= clude -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/arch/amd64/inclu= de -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/sys -I/usr/home/kos= tik/work/build/bsd/DEV/src/lib/libthr/../../libexec/rtld-elf -I/usr/home/ko= stik/work/build/bsd/DEV/src/lib/libthr/../../libexec/rtld-elf/amd64 -I/usr/= home/kostik/work/build/bsd/DEV/src/lib/libthr/../libthread_db -Winline -fex= ceptions -D_PTHREAD_FORCED_UNWIND -D_PTHREADS_INVARIANTS -mno-mmx -mno-sse = -mno-avx -g -MD -MP -MF.depend.thr_init.o -MTthr_init.o -std=3Dgnu99 -Wsyst= em-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-= prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-poi= nter-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -= Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-u= nused-function -Wno-enum-conversion -Wno-unused-local-typedef -Qunused-arg= uments ERROR-tried-to-rebuild-during-make-install -c /usr/home/kostik/work= /build/bsd/DEV/src/lib/libthr/thread/thr_init.c -o thr_init.o cc: error: no such file or directory: 'ERROR-tried-to-rebuild-during-make-i= nstall' *** Error code 1 Stop. make[3]: stopped in /usr/home/kostik/work/build/bsd/DEV/src/lib/libthr Doing separate steps for all and install targets work, but before, it also worked and was convenient to list sequential targets on the make command line.