diff options
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3c5e88bfecf1..8e440233c27d 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -25,6 +25,11 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) | |||
25 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) | 25 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) |
26 | # and add the directory to the list of dirs to descend into: $(subdir-m) | 26 | # and add the directory to the list of dirs to descend into: $(subdir-m) |
27 | 27 | ||
28 | # Determine modorder. | ||
29 | # Unfortunately, we don't have information about ordering between -y | ||
30 | # and -m subdirs. Just put -y's first. | ||
31 | modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko)) | ||
32 | |||
28 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) | 33 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) |
29 | subdir-y += $(__subdir-y) | 34 | subdir-y += $(__subdir-y) |
30 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) | 35 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) |
@@ -64,6 +69,7 @@ real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y) | |||
64 | extra-y := $(addprefix $(obj)/,$(extra-y)) | 69 | extra-y := $(addprefix $(obj)/,$(extra-y)) |
65 | always := $(addprefix $(obj)/,$(always)) | 70 | always := $(addprefix $(obj)/,$(always)) |
66 | targets := $(addprefix $(obj)/,$(targets)) | 71 | targets := $(addprefix $(obj)/,$(targets)) |
72 | modorder := $(addprefix $(obj)/,$(modorder)) | ||
67 | obj-y := $(addprefix $(obj)/,$(obj-y)) | 73 | obj-y := $(addprefix $(obj)/,$(obj-y)) |
68 | obj-m := $(addprefix $(obj)/,$(obj-m)) | 74 | obj-m := $(addprefix $(obj)/,$(obj-m)) |
69 | lib-y := $(addprefix $(obj)/,$(lib-y)) | 75 | lib-y := $(addprefix $(obj)/,$(lib-y)) |