Thread (13 messages) 13 messages, 5 authors, 2021-09-21

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

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2021-09-20 13:27:40
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

On 27/08/21 12:22, Andrew Jones wrote:
quoted
51b8f0b1 2017-11-23 Andrew Jones Makefile: fix cscope target
No 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: tags
and queued it.

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help