Re: [kvm-unit-tests PATCH 1/2] Makefile: Fix cscope
From: Andrew Jones <hidden>
Date: 2021-09-20 14:10:48
On Mon, Sep 20, 2021 at 03:27:11PM +0200, Paolo Bonzini wrote:
quoted hunk ↗ jump to hunk
On 27/08/21 12:22, Andrew Jones wrote:quoted
quoted
51b8f0b1 2017-11-23 Andrew Jones Makefile: fix cscope targetNo surprise there, that's when the $(PWD) use was first introduced.quoted
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 <redacted> 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 <redacted> Signed-off-by: Andrew Jones <redacted> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>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: tagsand 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 [off-list ref]
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 [off-list ref]
Reviewed-by: Thomas Huth [off-list ref]
Suggested-by: Thomas Huth [off-list ref]
Signed-off-by: Andrew Jones [off-list ref]
misc/queue is something I recently invented for stuff like this in order
to help lighten your load a bit.
Thanks,
drew