From 608c3b1e612a91fc1b811d2ae6a30ed8dbc7cab7 Mon Sep 17 00:00:00 2001 From: Nicolas Schier Date: Thu, 23 May 2024 10:06:40 +0200 Subject: [PATCH] perf install: Don't propagate subdir to Documentation submake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly reset 'subdir' variable when descending to tools/perf/Documentation. Similar to commit f89fb55714b62 ("perf build: Don't propagate subdir to submakes for install_headers", 2023-01-02), calling the 'tools/perf_install' target via top-levels Makefile results in repeated subdir components when attempting to call the perf documentation installation rules: $ make tools/perf_install NO_LIBTRACEEVENT=1 JOBS=1 [...] /bin/sh: 1: cd: can't cd to /data/linux/kbuild/tools/perf/tools/perf/ ../../scripts/Makefile.include:17: *** output directory "/data/linux/kbuild/tools/perf/tools/perf/" does not exist. Stop. make[5]: *** [Makefile.perf:1096: try-install-man] Error 2 make[4]: *** [Makefile.perf:264: sub-make] Error 2 make[3]: *** [Makefile:113: install] Error 2 make[2]: *** [Makefile:131: perf_install] Error 2 Resetting 'subdir' fixes the call from top-level Makefile. Reported-by: Uwe Kleine-König Signed-off-by: Nicolas Schier Acked-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240523-make-tools-perf-install-v1-1-3903499e637f@avm.de Signed-off-by: Namhyung Kim --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 1ebaec961ba7..175e4c7898f0 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1128,7 +1128,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): - $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:-doc=) ASCIIDOC_EXTRA=$(ASCIIDOC_EXTRA) + $(Q)$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) $(@:-doc=) ASCIIDOC_EXTRA=$(ASCIIDOC_EXTRA) subdir= ### Cleaning rules