Commit e0e1b1ec authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: remove duplication from modules.order in sub-directories

Currently, only the top-level modules.order drops duplicated entries.

The modules.order files in sub-directories potentially contain
duplication. To list out the paths of all modules, I want to use
modules.order instead of parsing *.mod files in $(MODVERDIR).

To achieve this, I want to rip off duplication from modules.order
of external modules too.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 1bd9a468
...@@ -423,13 +423,10 @@ endif # builtin-target ...@@ -423,13 +423,10 @@ endif # builtin-target
# #
# Create commands to either record .ko file or cat modules.order from # Create commands to either record .ko file or cat modules.order from
# a subdirectory # a subdirectory
modorder-cmds = \
$(foreach m, $(modorder), \
$(if $(filter %/modules.order, $m), \
cat $m;, echo $m;))
$(modorder-target): $(subdir-ym) FORCE $(modorder-target): $(subdir-ym) FORCE
$(Q)(cat /dev/null; $(modorder-cmds)) > $@ $(Q){ $(foreach m, $(modorder), \
$(if $(filter %/modules.order, $m), cat $m, echo $m);) :; } \
| $(AWK) '!x[$$0]++' - > $@
# #
# Rule to compile a set of .o files into one .a file (with symbol table) # Rule to compile a set of .o files into one .a file (with symbol table)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment