]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kbuild: move headers_check.pl to usr/include/
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 6 Dec 2021 02:35:06 +0000 (11:35 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 8 Jan 2022 08:41:00 +0000 (17:41 +0900)
This script is only used by usr/include/Makefile. Make it local to
the directory.

Update the comment in include/uapi/linux/soundcard.h because
'make headers_check' is no longer functional.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
include/uapi/linux/soundcard.h
usr/include/Makefile
usr/include/headers_check.pl [moved from scripts/headers_check.pl with 100% similarity]

index f3b21f989872b558806b7a417e71d001fc8d0b6e..ac1318793a86fccef3171340d75cd133bc562eda 100644 (file)
@@ -1051,7 +1051,7 @@ typedef struct mixer_vol_table {
  *     the GPL version of OSS-4.x and build against that version
  *     of the header.
  *
- *     We redefine the extern keyword so that make headers_check
+ *     We redefine the extern keyword so that usr/include/headers_check.pl
  *     does not complain about SEQ_USE_EXTBUF.
  */
 #define SEQ_DECLAREBUF()               SEQ_USE_EXTBUF()
index 1c2ae1368079d715d80f54cf8954dff142cc5d49..94403806ea568beb0194af7cdb0894c05968aab5 100644 (file)
@@ -99,10 +99,12 @@ quiet_cmd_hdrtest = HDRTEST $<
       cmd_hdrtest = \
                $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
                        $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
-               $(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \
+               $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \
                touch $@
 
 $(obj)/%.hdrtest: $(obj)/%.h FORCE
        $(call if_changed_dep,hdrtest)
 
-clean-files += $(filter-out Makefile, $(notdir $(wildcard $(obj)/*)))
+# Since GNU Make 4.3, $(patsubst $(obj)/%/,%,$(wildcard $(obj)/*/)) works.
+# To support older Make versions, use a somewhat tedious way.
+clean-files += $(filter-out Makefile headers_check.pl, $(notdir $(wildcard $(obj)/*)))