OSDN Git Service

kbuild: compile-test headers listed in header-test-m as well
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 16 Jul 2019 13:29:45 +0000 (22:29 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 17 Jul 2019 13:37:51 +0000 (22:37 +0900)
It will be useful to control the header-test by a tristate option.

If CONFIG_FOO is a tristate option, you can write like this:

  header-test-$(CONFIG_FOO) += foo.h

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/Makefile.build
scripts/Makefile.lib

index be38198..5829ccb 100644 (file)
@@ -294,7 +294,7 @@ quiet_cmd_cc_lst_c = MKLST   $@
 $(obj)/%.lst: $(src)/%.c FORCE
        $(call if_changed_dep,cc_lst_c)
 
-# header test (header-test-y target)
+# header test (header-test-y, header-test-m target)
 # ---------------------------------------------------------------------------
 
 quiet_cmd_cc_s_h = CC      $@
index 6cb3aa5..5241d07 100644 (file)
@@ -78,7 +78,7 @@ header-test-y += $(filter-out $(header-test-), \
                $(wildcard $(addprefix $(srctree)/$(src)/, \
                $(header-test-pattern-y)))))
 
-extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y))
+extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y) $(header-test-m))
 
 # Add subdir path