git: DragonFly_RELEASE_6_4 Makefile.inc1: Abort building if MAKEOBJDIRPREFIX not set as an env var

Aaron LI aly at crater.dragonflybsd.org
Wed Mar 4 22:06:53 PST 2026


commit ab499a69057783f185894f6fb762f0effde1546f
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Mar 5 09:16:21 2026 +0800

    Makefile.inc1: Abort building if MAKEOBJDIRPREFIX not set as an env var
    
    As described in <bsd.obj.mk>, MAKEOBJDIRPREFIX works properly only if
    set as an *environment* variable, not as a global or command-line
    variable.  This change adds a check for MAKEOBJDIRPREFIX and aborts the
    building if it's specified as a make variable on the command line.
    
    Although build(7) lists quite a few environment variables, but most of
    them (e.g., KERNCONF, DESTDIR) just work as well when specified as a
    make variable.  However, MAKEOBJDIRPREFIX is special and doesn't work
    in the same way.
    
    We decided to simply abort the building if MAKEOBJDIRPREFIX is
    mis-specified, being simple and following build(7) as well, although we
    can also convert it to an environment variable by using:
    
    	.MAKEOVERRIDES:= ${.MAKEOVERRIDES:NMAKEOBJDIRPREFIX}
    	.export MAKEOBJDIRPREFIX
    
    Discussed-with: swildner

Summary of changes:
 Makefile.inc1 | 8 ++++++++
 1 file changed, 8 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ab499a69057783f185894f6fb762f0effde1546f


-- 
DragonFly BSD source repository


More information about the Commits mailing list