From 0c38f15ac749a2c5b674d9ba2036fc416b984fe2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 26 Feb 2018 03:16:04 +0000 Subject: [PATCH] Add NO_OBJ to those directories that don't make anything. For directories that don't many anything, add NO_OBJ=t just before we include bsd.init.mk. This prevents them from creating an OBJ directory. In addition, prevent defs.mk from creating the machine related links in these cases. They aren't needed and break, at least on stable, the read-only src tree build. --- stand/arm/Makefile | 2 ++ stand/defs.mk | 3 ++- stand/efi/Makefile | 2 ++ stand/forth/Makefile | 2 ++ stand/i386/Makefile | 2 ++ stand/mips/Makefile | 2 ++ stand/powerpc/Makefile | 2 ++ stand/sparc64/Makefile | 2 ++ 8 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stand/arm/Makefile b/stand/arm/Makefile index 1d12d9831658..7ff21abcc9b8 100644 --- a/stand/arm/Makefile +++ b/stand/arm/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + SUBDIR= uboot .include diff --git a/stand/defs.mk b/stand/defs.mk index dd165ff9f06b..9dcf32b4da7b 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -163,6 +163,7 @@ CLEANFILES+=${_ILINKS} all: ${PROG} +.if !defined(NO_OBJ) beforedepend: ${_ILINKS} beforebuild: ${_ILINKS} @@ -190,5 +191,5 @@ ${_ILINKS}: path=`(cd $$path && /bin/pwd)` ; \ ${ECHO} ${.TARGET:T} "->" $$path ; \ ln -fhs $$path ${.TARGET:T} - +.endif .endif # __BOOT_DEFS_MK__ diff --git a/stand/efi/Makefile b/stand/efi/Makefile index e3b22de4a99a..ee1abfd583a4 100644 --- a/stand/efi/Makefile +++ b/stand/efi/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + .include # In-tree GCC does not support __attribute__((ms_abi)), but gcc newer diff --git a/stand/forth/Makefile b/stand/forth/Makefile index 3d79dc1716c2..acb5842b8989 100644 --- a/stand/forth/Makefile +++ b/stand/forth/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + .include MAN+= beastie.4th.8 \ diff --git a/stand/i386/Makefile b/stand/i386/Makefile index 9a1663abab07..a67088b68213 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + .include SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ diff --git a/stand/mips/Makefile b/stand/mips/Makefile index 760c557d92d1..90341b2f7e50 100644 --- a/stand/mips/Makefile +++ b/stand/mips/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + SUBDIR= uboot # diff --git a/stand/powerpc/Makefile b/stand/powerpc/Makefile index c8bbb17e2f06..09b2bfe8715f 100644 --- a/stand/powerpc/Makefile +++ b/stand/powerpc/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + .include SUBDIR= boot1.chrp ofw uboot diff --git a/stand/sparc64/Makefile b/stand/sparc64/Makefile index 6a81a0580d5f..3c6e2bf85c9c 100644 --- a/stand/sparc64/Makefile +++ b/stand/sparc64/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +NO_OBJ=t + .include SUBDIR= boot1 loader