Skip to contentSkip to conversation

kbuild: make multiple directory targets work properly

PATCH In review Masahiro Yamada 2 participants 2 messages Feb 5, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: make multiple directory targets work properly

Currently, the single-target build does not work when two or more sub-directories are given:

  $ make fs/ kernel/ lib/
    CALL    scripts/checksyscalls.sh
    CALL    scripts/atomic/check-atomics.sh
    DESCEND  objtool
  make[2]: Nothing to be done for 'kernel/'.
  make[2]: Nothing to be done for 'fs/'.
  make[2]: Nothing to be done for 'lib/'.

Make it work properly.

---

Linus,

If you want to use this patch soon (seems useful since you are travelling), please feel free to apply it directly.

If you wait for my next pull request, I will apply it to my tree.

Either is fine with me.

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 65a5dc653deb..ef8913a8eb2a 100644
@@ -1679,7 +1679,7 @@ PHONY += descend $(build-dirs)
 descend: $(build-dirs)
 $(build-dirs): prepare
 	$(Q)$(MAKE) $(build)=$@ \
-	single-build=$(if $(filter-out $@/, $(single-no-ko)),1) \
+	single-build=$(if $(filter-out $@/, $(filter $@/%, $(single-no-ko))),1) \
 	need-builtin=1 need-modorder=1
 
 clean-dirs := $(addprefix _clean_, $(clean-dirs))
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Masahiro Yamada

If you want to use this patch soon (seems useful since you are travelling), please feel free to apply it directly.

If you wait for my next pull request, I will apply it to my tree.

I'll wait for the proper channels, I'm heading back home tomorrow anyway, and it's not been a big problem for me.

Just an oddity I happened to hit because of doing slightly different things while on the road.

Thanks,
Linus