Skip to contentSkip to conversation

selftests: use "$(MAKE)" instead of "make" for headers_install

PATCH In review Denys Vlasenko 2 participants 2 messages Aug 17, 2020 – Aug 31, 2020 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: use "$(MAKE)" instead of "make" for headers_install

If top make invocation uses -j4 or larger, this patch reduces "make headers_install" subtask run time from 30 to 7 seconds.

---
 tools/testing/selftests/lib.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/lib.mk +2 -2
index 7a17ea815736..51124b962d56 100644
@@ -47,9 +47,9 @@ ARCH		?= $(SUBARCH)
 khdr:
 ifndef KSFT_KHDR_INSTALL_DONE
 ifeq (1,$(DEFAULT_INSTALL_HDR_PATH))
-	make --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
+	$(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
 else
-	make --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \
+	$(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \
 		ARCH=$(ARCH) -C $(top_srcdir) headers_install
 endif
 endif
Signature · 1 line
2.25.0
maintainer
#1 lore raw
Quoted 19 lines · Denys Vlasenko

If top make invocation uses -j4 or larger, this patch reduces "make headers_install" subtask run time from 30 to 7 seconds.

---
  tools/testing/selftests/lib.mk | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/lib.mk +0 -0
index 7a17ea815736..51124b962d56 100644
@@ -47,9 +47,9 @@ ARCH		?= $(SUBARCH)
  khdr:

tools/testing/selftests/lib.mk ARCH ?= $(SUBARCH) · line 55

Quoted 10 lines
tools/testing/selftests/lib.mk +2 -2
  ifndef KSFT_KHDR_INSTALL_DONE
  ifeq (1,$(DEFAULT_INSTALL_HDR_PATH))
-	make --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
+	$(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install
  else
-	make --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \
+	$(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \
  		ARCH=$(ARCH) -C $(top_srcdir) headers_install
  endif
  endif

Thanks for the patch. Applied to linux-kselftest next for 5.10

thanks,
-- Shuah