Re: [PATCH kvm-unit-tests] Makefile: Don't trust PWD

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

 



On Fri, Aug 27, 2021 at 12:36:05PM +0200, Thomas Huth wrote:
> On 27/08/2021 12.31, Andrew Jones wrote:
> > It's possible that PWD is already set to something which isn't
> > the full path of the current working directory. Let's make sure
> > it is.
> > 
> > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> > ---
> >   Makefile | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/Makefile b/Makefile
> > index f7b9f28c9319..a65f225b7d5c 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,4 +1,5 @@
> >   SHELL := /usr/bin/env bash
> > +PWD := $(shell pwd)
> 
> I think we should rather use $(CURDIR) in Makefiles instead, since this is
> the official way that GNU Make handles the current working directory.

Agreed. I'll send a v2.

> 
> By the way, is this cscope thing also supposed to work in out-of-tree builds?

I personally don't care if it works from the out-of-tree build dir. I
generally want to be able to use git commands while browsing code too,
so I won't be running cscope anywhere but in a repo with a checked-out
working tree.

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