nanobsd: Better NANO_OBJ if NANO_LAYOUT is set

If NANO_LAYOUT is set, then use /usr/obj/nanobsd.${NANO_NAME}.${NANO_LAYOUT}
instead of the current /usr/obj/nanobsd.${NANO_NAME} to allow multiple layouts
to be built w/o errors due to the time-skew that creates.

PR: 269366
Suggested by: Eugene Grosbein
Sponsored by: Netflix
This commit is contained in:
Warner Losh 2023-02-08 16:19:49 -07:00
parent de7a6b6fd0
commit cbf64e2dd5

View File

@ -885,7 +885,7 @@ export_var ( ) { # Don't wawnt a subshell
# Call this function to set defaults _after_ parsing options.
# dont want a subshell otherwise variable setting is thrown away.
set_defaults_and_export ( ) {
: ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}}
: ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}${NANO_LAYOUT:+.${NANO_LAYOUT}}
: ${MAKEOBJDIRPREFIX:=${NANO_OBJ}}
: ${NANO_DISKIMGDIR:=${NANO_OBJ}}
: ${NANO_WORLDDIR:=${NANO_OBJ}/_.w}