Add regression test for build directory handling to make lint target
[coreboot.git] / Makefile
index 06847b61a0b0818dfa1a6cdab366f51de9fe19af..5082f7e7290de1e52d6e7e70976a2a618e3b3680 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,6 @@ ifneq ($(Q),)
 endif
 endif
 
-CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E
 HOSTCC = gcc
 HOSTCXX = g++
 HOSTCFLAGS := -I$(srck) -I$(objk) -g
@@ -110,7 +109,7 @@ endif
 endif
 
 ifeq ($(CONFIG_CCACHE),y)
-CCACHE:=$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))
+CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))))
 ifeq ($(CCACHE),)
 $(error ccache selected, but not found in PATH)
 endif
@@ -177,7 +176,7 @@ includemakefiles= \
        $(foreach class,$(classes), \
                $(eval $(class)-srcs+= \
                        $$(subst $(top)/,, \
-                       $$(abspath $$(addprefix $(dir $(1)),$$($(class)-y)))))) \
+                       $$(abspath $$(subst $(dir $(1))/,/,$$(addprefix $(dir $(1)),$$($(class)-y))))))) \
        $(foreach special,$(special-classes), \
                $(foreach item,$($(special)-y), $(call $(special)-handler,$(dir $(1)),$(item)))) \
        $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
@@ -238,7 +237,9 @@ printall:
 
 endif
 
+ifndef NOMKDIR
 $(shell mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(additional-dirs) $(alldirs))
+endif
 
 cscope:
        cscope -bR