kbuild: show hint if subdir-y/m is used to visit module Makefile
[linux-2.6-block.git] / scripts / headers_install.sh
index 47f6f3ea07717e435e3ea6210f3b23b23d2f4eb4..bbaf293869956f509206b01154c47af19019e764 100755 (executable)
@@ -23,6 +23,12 @@ TMPFILE=$OUTFILE.tmp
 
 trap 'rm -f $OUTFILE $TMPFILE' EXIT
 
+# SPDX-License-Identifier with GPL variants must have "WITH Linux-syscall-note"
+if [ -n "$(sed -n -e "/SPDX-License-Identifier:.*GPL-/{/WITH Linux-syscall-note/!p}" $INFILE)" ]; then
+       echo "error: $INFILE: missing \"WITH Linux-syscall-note\" for SPDX-License-Identifier" >&2
+       exit 1
+fi
+
 sed -E -e '
        s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g
        s/__attribute_const__([[:space:]]|$)/\1/g