All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD
@ 2021-08-27 10:54 Andrew Jones
  2021-08-27 13:47 ` Pierre Morel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Jones @ 2021-08-27 10:54 UTC (permalink / raw)
  To: kvm; +Cc: pmorel, thuth, frankja, david, cohuck, imbrenda, pbonzini

PWD comes from the environment and it's possible that it's already
set to something which isn't the full path of the current working
directory. Use the make variable $(CURDIR) instead.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f7b9f28c9319..6792b93c4e16 100644
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,7 @@ cscope: cscope_dirs = lib lib/libfdt lib/linux $(TEST_DIR) $(ARCH_LIBDIRS) lib/a
 cscope:
 	$(RM) ./cscope.*
 	find -L $(cscope_dirs) -maxdepth 1 \
-		-name '*.[chsS]' -exec realpath --relative-base=$(PWD) {} \; | sort -u > ./cscope.files
+		-name '*.[chsS]' -exec realpath --relative-base=$(CURDIR) {} \; | sort -u > ./cscope.files
 	cscope -bk
 
 .PHONY: tags
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD
  2021-08-27 10:54 [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD Andrew Jones
@ 2021-08-27 13:47 ` Pierre Morel
  2021-08-27 14:17 ` Thomas Huth
  2021-08-31 10:31 ` Andrew Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Pierre Morel @ 2021-08-27 13:47 UTC (permalink / raw)
  To: Andrew Jones, kvm; +Cc: thuth, frankja, david, cohuck, imbrenda, pbonzini



On 8/27/21 12:54 PM, Andrew Jones wrote:
> PWD comes from the environment and it's possible that it's already
> set to something which isn't the full path of the current working
> directory. Use the make variable $(CURDIR) instead.
> 
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index f7b9f28c9319..6792b93c4e16 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -119,7 +119,7 @@ cscope: cscope_dirs = lib lib/libfdt lib/linux $(TEST_DIR) $(ARCH_LIBDIRS) lib/a
>   cscope:
>   	$(RM) ./cscope.*
>   	find -L $(cscope_dirs) -maxdepth 1 \
> -		-name '*.[chsS]' -exec realpath --relative-base=$(PWD) {} \; | sort -u > ./cscope.files
> +		-name '*.[chsS]' -exec realpath --relative-base=$(CURDIR) {} \; | sort -u > ./cscope.files
>   	cscope -bk
>   
>   .PHONY: tags
> 

Perfect for me, works as expected on Z.

Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>


-- 
Pierre Morel
IBM Lab Boeblingen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD
  2021-08-27 10:54 [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD Andrew Jones
  2021-08-27 13:47 ` Pierre Morel
@ 2021-08-27 14:17 ` Thomas Huth
  2021-08-31 10:31 ` Andrew Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-08-27 14:17 UTC (permalink / raw)
  To: Andrew Jones, kvm; +Cc: pmorel, frankja, david, cohuck, imbrenda, pbonzini

On 27/08/2021 12.54, Andrew Jones wrote:
> PWD comes from the environment and it's possible that it's already
> set to something which isn't the full path of the current working
> directory. Use the make variable $(CURDIR) instead.
> 
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index f7b9f28c9319..6792b93c4e16 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -119,7 +119,7 @@ cscope: cscope_dirs = lib lib/libfdt lib/linux $(TEST_DIR) $(ARCH_LIBDIRS) lib/a
>   cscope:
>   	$(RM) ./cscope.*
>   	find -L $(cscope_dirs) -maxdepth 1 \
> -		-name '*.[chsS]' -exec realpath --relative-base=$(PWD) {} \; | sort -u > ./cscope.files
> +		-name '*.[chsS]' -exec realpath --relative-base=$(CURDIR) {} \; | sort -u > ./cscope.files
>   	cscope -bk
>   
>   .PHONY: tags
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD
  2021-08-27 10:54 [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD Andrew Jones
  2021-08-27 13:47 ` Pierre Morel
  2021-08-27 14:17 ` Thomas Huth
@ 2021-08-31 10:31 ` Andrew Jones
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Jones @ 2021-08-31 10:31 UTC (permalink / raw)
  To: kvm; +Cc: pmorel, thuth, frankja, david, cohuck, imbrenda, pbonzini

On Fri, Aug 27, 2021 at 12:54:07PM +0200, Andrew Jones wrote:
> PWD comes from the environment and it's possible that it's already
> set to something which isn't the full path of the current working
> directory. Use the make variable $(CURDIR) instead.
> 
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index f7b9f28c9319..6792b93c4e16 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -119,7 +119,7 @@ cscope: cscope_dirs = lib lib/libfdt lib/linux $(TEST_DIR) $(ARCH_LIBDIRS) lib/a
>  cscope:
>  	$(RM) ./cscope.*
>  	find -L $(cscope_dirs) -maxdepth 1 \
> -		-name '*.[chsS]' -exec realpath --relative-base=$(PWD) {} \; | sort -u > ./cscope.files
> +		-name '*.[chsS]' -exec realpath --relative-base=$(CURDIR) {} \; | sort -u > ./cscope.files
>  	cscope -bk
>  
>  .PHONY: tags
> -- 
> 2.31.1
>

Applied to misc/queue and merged to master.

Thanks,
drew


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-31 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 10:54 [PATCH kvm-unit-tests v2] Makefile: Don't trust PWD Andrew Jones
2021-08-27 13:47 ` Pierre Morel
2021-08-27 14:17 ` Thomas Huth
2021-08-31 10:31 ` Andrew Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.