Merge tag 'v2022.04-rc5' into next
[platform/kernel/u-boot.git] / Makefile
index 6998388..6a0234a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -521,7 +521,8 @@ env_h := include/generated/environment.h
 
 no-dot-config-targets := clean clobber mrproper distclean \
                         help %docs check% coccicheck \
-                        ubootversion backup tests check qcheck tcheck pylint
+                        ubootversion backup tests check qcheck tcheck pylint \
+                        pylint_err
 
 config-targets := 0
 mixed-targets  := 0
@@ -682,10 +683,16 @@ endif
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS  += -Os
-else
+endif
+
+ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED
 KBUILD_CFLAGS  += -O2
 endif
 
+ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG
+KBUILD_CFLAGS  += -Og
+endif
+
 LTO_CFLAGS :=
 LTO_FINAL_LDFLAGS :=
 export LTO_CFLAGS LTO_FINAL_LDFLAGS
@@ -2262,7 +2269,7 @@ distclean: mrproper
        @rm -f boards.cfg CHANGELOG
 
 # See doc/develop/python_cq.rst
-PHONY += pylint
+PHONY += pylint pylint_err
 PYLINT_BASE := scripts/pylint.base
 PYLINT_CUR := pylint.cur
 PYLINT_DIFF := pylint.diff
@@ -2304,6 +2311,11 @@ pylint:
                        echo "No pylint regressions"; \
                fi
 
+# Check for errors only
+pylint_err:
+       $(Q)pylint -E  -j 0 --ignore-imports=yes \
+               $(shell find tools test -name "*.py")
+
 backup:
        F=`basename $(srctree)` ; cd .. ; \
        gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F