Message ID | 20241110013649.34903-2-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kbuild: support building external modules in a separate build directory | expand |
diff --git a/Makefile b/Makefile index 8dceb6830486..891d28e54791 100644 --- a/Makefile +++ b/Makefile @@ -228,12 +228,12 @@ else # need-sub-make # We process the rest of the Makefile if this is the final invocation of make -ifeq ($(abs_srctree),$(abs_objtree)) +ifeq ($(abs_srctree),$(CURDIR)) # building in the source tree srctree := . building_out_of_srctree := else - ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) + ifeq ($(abs_srctree)/,$(dir $(CURDIR))) # building in a subdirectory of the source tree srctree := .. else