Page MenuHomeFreeBSD

Move the MAKEOBJDIRPREFIX value guard to sys.mk and expand to MAKEOBJDIR.
Needs ReviewPublic

Authored by bdrewery on Dec 15 2015, 8:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 9:19 PM
Unknown Object (File)
Nov 6 2023, 9:37 AM
Unknown Object (File)
Oct 30 2023, 11:03 AM
Unknown Object (File)
Oct 5 2023, 8:35 AM
Unknown Object (File)
Sep 28 2023, 11:08 AM
Unknown Object (File)
Sep 24 2023, 6:59 AM
Unknown Object (File)
Jun 16 2023, 9:28 AM
Unknown Object (File)
Jun 11 2023, 3:51 AM
Subscribers

Details

Reviewers
sjg
bapt
imp
Summary

This will ensure that the variable was not set as a make override, in
make.conf, src.conf or src-env.conf. It allows setting the value in
src-env.conf when using WITH_AUTO_OBJ since that case properly handles
changing .OBJDIR (except if MAKEOBJDIRPREFIX does not yet exist which is
being discussed to be changed).

This change allows setting a default MAKEOBJDIRPREFIX via local.sys.env.mk.

Sponsored by: EMC / Isilon Storage Division

Test Plan

Modifying src-env.conf, src.conf, make.conf, env, makeargs with
and without WITH_AUTO_OBJ.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1684
Build 1690: arc lint + arc unit

Event Timeline

bdrewery retitled this revision from to Move the MAKEOBJDIRPREFIX value guard to sys.mk and expand to MAKEOBJDIR..
bdrewery updated this object.
bdrewery edited the test plan for this revision. (Show Details)
bdrewery added reviewers: sjg, bapt, imp.

I don't think this is an appropriate change to sys.mk
It is perfectly valid to want to do make MAKEOBJDIRPREFIX=/som/dir
the fact that that causes problems for src/Makefile.inc1 does not make it something that sys.mk should block.
This test would be more appropriate in src/Makefile or src/Makefile.inc1 since they are the only ones that should care

In D4589#96796, @sjg wrote:

I don't think this is an appropriate change to sys.mk
It is perfectly valid to want to do make MAKEOBJDIRPREFIX=/som/dir
the fact that that causes problems for src/Makefile.inc1 does not make it something that sys.mk should block.
This test would be more appropriate in src/Makefile or src/Makefile.inc1 since they are the only ones that should care

Nothing here is preventing someone from modifying it. The intent is to prevent it being set where it won't actually work. It doesn't work in make.conf or cmdline as we never use .OBJDIR to change to it, we rely on make picking it up from the environment. And then we also rely on make's logic that the directory exists.

In D4589#96796, @sjg wrote:

I don't think this is an appropriate change to sys.mk
It is perfectly valid to want to do make MAKEOBJDIRPREFIX=/som/dir
the fact that that causes problems for src/Makefile.inc1 does not make it something that sys.mk should block.
This test would be more appropriate in src/Makefile or src/Makefile.inc1 since they are the only ones that should care

Nothing here is preventing someone from modifying it. The intent is to prevent it being set where it won't actually work. It doesn't work in make.conf or cmdline as we never use .OBJDIR to change to it, we rely on make picking it up from the environment. And then we also rely on make's logic that the directory exists.

The change to sys.mk says it is an error to do 'make MAKEOBJDIRPREFIX=/blah' it isn't, that is perfectly valid syntax. That is causes proplem for src/Makefile means it should be detected and dealt with there.
/usr/share/mk/ is supposed to work for things other than src.