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

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

 



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.

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

 Thomas




[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