X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Makefile;h=a61acdf9db387af202f39b2ed473c4f41ad259e3;hb=c36d506a05ad02f65d92d0f5a7b70a7c25666445;hp=397e51d301c67de902cc218cf2aa51a55590ec99;hpb=8463dd9db0dc2ce02423775d0eb62e28aa01e9f9;p=coreboot.git diff --git a/Makefile b/Makefile index 397e51d30..a61acdf9d 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,10 @@ export KCONFIG_AUTOCONFIG := $(obj)/auto.conf CONFIG_SHELL := sh KBUILD_DEFCONFIG := configs/defconfig UNAME_RELEASE := $(shell uname -r) -HAVE_DOTCONFIG := $(wildcard .config) +DOTCONFIG ?= .config +KCONFIG_CONFIG = $(DOTCONFIG) +export KCONFIG_CONFIG +HAVE_DOTCONFIG := $(wildcard $(DOTCONFIG)) MAKEFLAGS += -rR --no-print-directory # Make is silent per default, but 'make V=1' will show all compiler calls. @@ -111,7 +114,7 @@ endif strip_quotes = $(subst ",,$(subst \",,$(1))) -ARCHDIR-$(CONFIG_ARCH_X86) := i386 +ARCHDIR-$(CONFIG_ARCH_X86) := x86 ARCHDIR-$(CONFIG_ARCH_POWERPC) := ppc MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR)) @@ -181,6 +184,7 @@ ramstage-srcs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.c romstage-srcs:= driver-srcs:= smm-srcs:= +cbfs-files:= ramstage-objs:= romstage-objs:= @@ -194,11 +198,20 @@ types:=ramstage romstage driver smm includemakefiles= \ $(foreach type,$(2), $(eval $(type)-y:=)) \ $(eval subdirs-y:=) \ + $(eval cbfs-files-y:=) \ $(eval -include $(1)) \ $(foreach type,$(2), \ $(eval $(type)-srcs+= \ $$(subst $(top)/,, \ $$(abspath $$(addprefix $(dir $(1)),$$($(type)-y)))))) \ + $(foreach file,$(cbfs-files-y), \ + $(if $(wildcard $(dir $(1))$(file)), \ + $(eval tmp-cbfs-file:= $(wildcard $(dir $(1))$(file))), \ + $(eval tmp-cbfs-file:= $(file))) \ + $(eval cbfs-files += $(tmp-cbfs-file)|$$($(file)-name)|$$($(file)-type)|$$($(file)-position)) \ + $(eval $(file)-name:=) \ + $(eval $(file)-type:=) \ + $(eval $(file)-position:=)) \ $(eval subdirs+=$$(subst $(CURDIR)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y))))) # For each path in $(subdirs) call includemakefiles @@ -272,6 +285,7 @@ printall: @echo allsrcs=$(allsrcs) @echo DEPENDENCIES=$(DEPENDENCIES) @echo LIBGCC_FILE_NAME=$(LIBGCC_FILE_NAME) + @echo cbfs-files:='$(cbfs-files)' printcrt0s: @echo crt0s=$(crt0s) @@ -366,6 +380,26 @@ distclean: clean-cscope update: dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF +lint: + FAILED=0; LINTLOG=`mktemp`; \ + for script in util/lint/lint-*; do \ + echo; echo `basename $$script`; \ + grep "^# DESCR:" $$script | sed "s,.*DESCR: *,," ; \ + echo ========; \ + $$script > $$LINTLOG; \ + if [ `wc -l $$LINTLOG | cut -d' ' -f1` -eq 0 ]; then \ + printf "success\n\n"; \ + else \ + echo test failed: ; \ + cat $$LINTLOG; \ + rm -f $$LINTLOG; \ + FAILED=$$(( $$FAILED + 1 )); \ + fi; \ + echo ========; \ + done; \ + test $$FAILED -eq 0 || { echo "ERROR: $$FAILED test(s) failed." && exit 1; }; \ + rm -f $$LINTLOG + # This include must come _before_ the pattern rules below! # Order _does_ matter for pattern rules. include util/kconfig/Makefile