linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: James Clark <james.clark@arm.com>
Cc: acme@kernel.org, jolsa@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools build: Fix feature detect clean for out of source builds
Date: Tue, 31 Aug 2021 20:46:10 +0200	[thread overview]
Message-ID: <YS548qYreGLtabs4@krava> (raw)
In-Reply-To: <20210816130705.1331868-1-james.clark@arm.com>

On Mon, Aug 16, 2021 at 02:07:05PM +0100, James Clark wrote:
> Currently the clean target when using O= isn't cleaning the feature
> detect output. This is because O= and OUTPUT= are set to canonical
> paths. For example in tools/perf/Makefile:
> 
>   FULL_O := $(shell cd $(PWD); readlink -f $(O) || echo $(O))
> 
> This means that OUTPUT ends in a / and most usages prepend it to a file
> without adding an extra /. This line that was changed adds an extra /
> before the 'feature' folder but not to the end, resulting in a clean
> command like this:
> 
>   rm -f /tmp/build//featuretest-all.bin ...
> 
> After the change the clean command looks like this:
> 
>   rm -f /tmp/build/feature/test-all.bin ...
> 
> Signed-off-by: James Clark <james.clark@arm.com>

nice catch!

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/build/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/build/Makefile b/tools/build/Makefile
> index 5ed41b96fcde..6f11e6fc9ffe 100644
> --- a/tools/build/Makefile
> +++ b/tools/build/Makefile
> @@ -32,7 +32,7 @@ all: $(OUTPUT)fixdep
>  
>  # Make sure there's anything to clean,
>  # feature contains check for existing OUTPUT
> -TMP_O := $(if $(OUTPUT),$(OUTPUT)/feature,./)
> +TMP_O := $(if $(OUTPUT),$(OUTPUT)feature/,./)
>  
>  clean:
>  	$(call QUIET_CLEAN, fixdep)
> -- 
> 2.28.0
> 


  reply	other threads:[~2021-08-31 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16 13:07 [PATCH] tools build: Fix feature detect clean for out of source builds James Clark
2021-08-31 18:46 ` Jiri Olsa [this message]
2021-09-01 14:26   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YS548qYreGLtabs4@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).