Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: move W=1 check for scripts/misc-check to top-level Makefile

This script is executed only when ${KBUILD_EXTRA_WARN} contains 1.
Move this check to the top-level Makefile to allow more checks to be
easily added to this script.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>

+4 -8
+3
Makefile
··· 1827 1827 # Misc 1828 1828 # --------------------------------------------------------------------------- 1829 1829 1830 + # Run misc checks when ${KBUILD_EXTRA_WARN} contains 1 1830 1831 PHONY += misc-check 1832 + ifneq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) 1831 1833 misc-check: 1832 1834 $(Q)$(srctree)/scripts/misc-check 1835 + endif 1833 1836 1834 1837 all: misc-check 1835 1838
+1 -8
scripts/misc-check
··· 3 3 4 4 set -e 5 5 6 - # Detect files that are tracked but ignored by git. This is checked only when 7 - # ${KBUILD_EXTRA_WARN} contains 1, git is installed, and the source tree is 8 - # tracked by git. 6 + # Detect files that are tracked but ignored by git. 9 7 check_tracked_ignored_files () { 10 - case "${KBUILD_EXTRA_WARN}" in 11 - *1*) ;; 12 - *) return;; 13 - esac 14 - 15 8 git -C ${srctree:-.} ls-files -i -c --exclude-per-directory=.gitignore 2>/dev/null | 16 9 sed 's/$/: warning: ignored by one of the .gitignore files/' >&2 17 10 }