Re: [PATCH kvm-unit-tests] Makefile: Don't trust PWD
From: Thomas Huth <hidden>
Date: 2021-08-27 10:36:12
From: Thomas Huth <hidden>
Date: 2021-08-27 10:36:12
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 <redacted> --- 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