This patch fixes the link error "built-in.o: no such file or directory". The problem happens if "dirx/Makefile" contains only "obj-m += diry/ dirz/" and the empty "dirx/built-in.o" is missing. Adding $(subdir-m) into check for builtin-target fixes this error.
Unified · Split
| @@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),) · 81 unmodified lines | |||
| 82 | lib-target := $(obj)/lib.a | 82 | lib-target := $(obj)/lib.a |
| 83 | endif | 83 | endif |
| 84 | 84 | ||
| 85 | ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(lib-target)),) | 85 | ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),) |
| 86 | builtin-target := $(obj)/built-in.o | 86 | builtin-target := $(obj)/built-in.o |
| 87 | endif | 87 | endif |
| 88 | 88 | ||