Re: [kvm-unit-tests PATCH 1/2] Makefile: Fix cscope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 20, 2021 at 03:27:11PM +0200, Paolo Bonzini wrote:
> On 27/08/21 12:22, Andrew Jones wrote:
> > > 51b8f0b1 2017-11-23 Andrew Jones Makefile: fix cscope target
> > No surprise there, that's when the $(PWD) use was first introduced.
> > 
> > > So I add Andrew as CC, I did forgot to do before.
> > > 
> > I'll send a patch changing $(PWD) to $(shell pwd)
> 
> I could not find the patch using $(CURDIR) in my mailbox, though I found
> it on spinics.net.  I fudged the following
> 
> From 164507376abae4be15b0f65aa14d56f179198a99 Mon Sep 17 00:00:00 2001
> From: Andrew Jones <drjones@xxxxxxxxxx>
> Date: Fri, 27 Aug 2021 12:31:15 +0200
> Subject: [PATCH kvm-unit-tests] Makefile: Don't trust PWD
> 
> It's possible that PWD is already set to something which isn't
> the full path of the current working directory. Let's use $(CURDIR)
> instead, which is always correct.
> 
> Suggested-by: Thomas Huth <thuth@xxxxxxxxxx>
> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> 
> diff --git a/Makefile b/Makefile
> index f7b9f28..6792b93 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
> 
> and queued it.

Hi Paolo,

You'll get a conflict when you go to merge because I already did it :-)

commit 3d4eb24cb5b4de6c26f79b849fe2818d5315a691 (origin/misc/queue, misc/queue)
Author: Andrew Jones <drjones@xxxxxxxxxx>
Date:   Fri Aug 27 12:25:27 2021 +0200

    Makefile: Don't trust PWD
    
    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.
    
    Reviewed-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
    Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
    Suggested-by: Thomas Huth <thuth@xxxxxxxxxx>
    Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>



misc/queue is something I recently invented for stuff like this in order
to help lighten your load a bit.

Thanks,
drew




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux