Cosmetic fixes and comment additions in acpi.c.
[coreboot.git] / Makefile
index be6cd3857b2c337dd4d969a4275cc6093597a63d..0cfa85f6e8e473de9c7321fef190d6881e84f2df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -229,7 +229,7 @@ define ramstage-objs_asl_template
 $(obj)/$(1).ramstage.o: src/$(1).asl
        @printf "    IASL       $$(subst $(top)/,,$$(@))\n"
        $(CPP) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
-       iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl > $$(basename $$@).asl.out
+       iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl
        mv $$(obj)/$(1).hex $$(basename $$@).c
        $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
        # keep %.o: %.c rule from catching the temporary .c file after a make clean
@@ -366,6 +366,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