Add regression test for build directory handling to make lint target
[coreboot.git] / Makefile
index 69e32a4d667ad1c5b1c474f3f71f110f321c9489..5082f7e7290de1e52d6e7e70976a2a618e3b3680 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -109,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
@@ -176,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)))))
@@ -237,17 +237,13 @@ printall:
 
 endif
 
+ifndef NOMKDIR
 $(shell mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(additional-dirs) $(alldirs))
+endif
 
 cscope:
        cscope -bR
 
-crossgcc: clean-for-update
-       $(MAKE) -C util/crossgcc build
-
-crossgcc-clean: clean-for-update
-       $(MAKE) -C util/crossgcc clean
-
 doxy: doxygen
 doxygen:
        $(DOXYGEN) documentation/Doxyfile.coreboot