[PATCH] perf install: Don't propagate subdir to Documentation submake

Nicolas Schier posted 1 patch 1 year, 8 months ago
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] perf install: Don't propagate subdir to Documentation submake
Posted by Nicolas Schier 1 year, 8 months ago
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Nicolas Schier <n.schier@avm.de>
---
 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 5c35c0d893069..ab15d199e3794 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1093,7 +1093,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
 

---
base-commit: 29c73fc794c83505066ee6db893b2a83ac5fac63
change-id: 20240523-make-tools-perf-install-71c3d1f11ffc

Best regards,
-- 
Nicolas Schier

Re: [PATCH] perf install: Don't propagate subdir to Documentation submake
Posted by Namhyung Kim 1 year, 7 months ago
On Thu, 23 May 2024 10:06:40 +0200, Nicolas Schier wrote:

> 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:
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung
Re: [PATCH] perf install: Don't propagate subdir to Documentation submake
Posted by Uwe Kleine-König 1 year, 7 months ago
Hello Nicolas,

On Thu, May 23, 2024 at 10:06:40AM +0200, Nicolas Schier wrote:
> 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 <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Nicolas Schier <n.schier@avm.de>

If it helps:

Tested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Did I already thank you? If not: Thanks a lot!

Best regards
Uwe

Re: [PATCH] perf install: Don't propagate subdir to Documentation submake
Posted by Nicolas Schier 1 year, 7 months ago
On Thu, May 23, 2024 at 10:06:40AM +0200, Nicolas Schier wrote:
> 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 <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Nicolas Schier <n.schier@avm.de>
> ---
>  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 5c35c0d893069..ab15d199e3794 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -1093,7 +1093,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
>  
> 
> ---
> base-commit: 29c73fc794c83505066ee6db893b2a83ac5fac63
> change-id: 20240523-make-tools-perf-install-71c3d1f11ffc
> 
> Best regards,
> -- 
> Nicolas Schier
> 

Ping.  Are there complaints, or chances that someone picks this up?

Kind regards,
Nicolas