Index: stand/Makefile =================================================================== --- stand/Makefile +++ stand/Makefile @@ -39,7 +39,12 @@ .include S.${MK_EFI}+= efi -.if ${MK_FDT} != "no" +# +# Work around LIB32 descending into this directory after we've processed +# src.opt.mk with the 64-bit MACHINE_ARCH settings. It then resets MACHINE_ARCH +# and descends which causes problems for clean, includes, etc. +# +.if ${MK_FDT} != "no" && exists(${.CURDIR}/kboot/arch/${MACHINE_ARCH}/Makefile.inc) S.${MK_LOADER_KBOOT}+= kboot .endif S.${MK_LOADER_UBOOT}+= uboot