Date: Thu, 30 Jun 2016 15:22:29 -0700 From: "Simon J. Gerraty" <sjg@juniper.net> To: Bryan Drewery <bdrewery@freebsd.org> Cc: <arch@freebsd.org>, <sjg@juniper.net> Subject: Re: Build work 11.0 plans status update Message-ID: <2094.1467325349@kaos.jnpr.net> In-Reply-To: <84851e7b-60b9-b3dc-7410-45dc2b3ba1c1@FreeBSD.org> References: <201605270001.u4R01mKT087678@repo.freebsd.org> <fb451ad5-da16-cdbe-6106-8b67705600b3@FreeBSD.org> <20160527182543.GB4025@FreeBSD.org> <0d639d52-3ed4-a86d-3d45-b93c02939ce7@FreeBSD.org> <99714.1467316694@kaos.jnpr.net> <84851e7b-60b9-b3dc-7410-45dc2b3ba1c1@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
Bryan Drewery <bdrewery@freebsd.org> wrote:
> Maybe. I'd rather not introduce something like this since it is invoked
> from sys.mk. I really hate adding more executions. To bad there is no
Yes but you need only do it once - ie. if .MAKE.LEVEL==0
the result isn't going to change.
.if ${.MAKE.LEVEL} == 0
x != test -w ${OBJROOT:U${MAKEOBJDIRPREFIX:U/usr/obj}}/.; echo $$?
if ${x} != 0 && defined(WITH_AUTO_OBJ)
# they explicitly asked for it and we cannot do it
.error cannot write ${OBJROOT:U${MAKEOBJDIRPREFIX:U/usr/obj}} fix that or set WITHOUT_AUTO_OBJ
.endif
.endif
> # The above test is not really enough either since we want to test every
> component of the directory which is what mkdir -p is already doing in
> auto.obj.mk...
If you are allowed to write /usr/obj/.
you should be able to write anything below it.
Of course using a OBJROOT private to the tree, avoids such problems.
SRCTOP=/some/where/src
OBJROOT=/some/where/obj
which is what we use....
> What seems more efficient to me is to default AUTO_OBJ to on and then
> have auto.obj.mk consider an EPERM to just disable the feature for some
> cases. The 'for some cases' is where it becomes murky since we want to
> force auto obj on for things like buildworld/DIRDEPS regardless of
> writability as those should error and stop. Building a user or in a
> subdir (not DIRDEPS) may be fine to ignore the EPERM and build in source
> tree since that's a historical behavior.
auto.obj.mk will already throw an error if it cannot do what it was
asked to.
I like brutal simplicity.
That is much safer than soldiering on dribbling all over src for an hour
when that is not what the user wanted.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2094.1467325349>
