Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2016 21:19:37 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
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:  <20160421181937.GO2422@kib.kiev.ua>
In-Reply-To: <5718FC0C.7040604@FreeBSD.org>
References:  <201604181814.u3IIE22P059301@repo.freebsd.org> <20160419121551.GX2422@kib.kiev.ua> <5718FC0C.7040604@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 21, 2016 at 09:13:00AM -0700, Bryan Drewery wrote:
> On 4/19/16 5:15 AM, Konstantin Belousov wrote:
> > 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
> >>
> >> 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=
 other
> >>   out-of-tree builds.
> >>  =20
> >>   This will help ensure that read-only OBJDIRS will be respected at in=
stall-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 solut=
ion 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
> >>
> >> Modified:
> >>   head/share/mk/bsd.sys.mk
> >>
> >> 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 searche=
d for
> >>  # or expect to ever be up-to-date.
> >>  PHONY_NOTMAIN =3D analyze afterdepend afterinstall all beforedepend b=
eforeinstall \
> >=20
> > It seems to cause the following behaviour:
> > make buildenv
> > cd lib/libthr
> > # make DEBUG_FLAGS=3D-g WITHOUT_TESTS=3Dyes all install
>=20
> By the way, since r295646 it should be safe to use -j here. Let me know
> if you run into trouble with it.
You mean, that install -j does the right thing now ?  Thanks.

>=20
> > 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/l=
ib/libthr/thread  -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/../.=
=2E/include -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/arch/amd64=
/include -I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/sys -I/usr/ho=
me/kostik/work/build/bsd/DEV/src/lib/libthr/../../libexec/rtld-elf -I/usr/h=
ome/kostik/work/build/bsd/DEV/src/lib/libthr/../../libexec/rtld-elf/amd64 -=
I/usr/home/kostik/work/build/bsd/DEV/src/lib/libthr/../libthread_db -Winlin=
e -fexceptions -D_PTHREAD_FORCED_UNWIND -D_PTHREADS_INVARIANTS -mno-mmx -mn=
o-sse -mno-avx -g -MD -MP -MF.depend.thr_init.o -MTthr_init.o -std=3Dgnu99 =
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Ws=
trict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -W=
no-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-vari=
able -Wno-tautological-compar
>  e
>  -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-en=
um-conversion -Wno-unused-local-typedef  -Qunused-arguments  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-ma=
ke-install'
> > *** Error code 1
> >=20
> > Stop.
> > make[3]: stopped in /usr/home/kostik/work/build/bsd/DEV/src/lib/libthr
> >=20
> > Doing separate steps for all and install targets work, but before, it a=
lso
> > worked and was convenient to list sequential targets on the make command
> > line.
> >=20
>=20
> Fixed in r298413.

Yes, make all install worked.

Still, I do not think that the revision would help for any other target
used in-line with install.  I believe it is sometimes useful, but more
rare than all install idiom.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160421181937.GO2422>