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

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

 



On 27/08/2021 11.26, Pierre Morel wrote:


On 8/26/21 7:07 AM, Thomas Huth wrote:
On 25/08/2021 18.20, Pierre Morel wrote:
In Linux, cscope uses a wrong directory.
Simply search from the directory where the make is started.

Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f7b9f28c..c8b0d74f 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=. {} \; | sort -u > ./cscope.files

Why is $PWD not pointing to the same location as "." ? Are you doing in-tree or out-of-tree builds?

  Thomas


In tree.
That is the point, why is PWD indicating void ?
I use a bash on s390x.
inside bash PWD shows current directory
GNU Make is 4.2.1 on Ubuntu 18.04

Hmm, looking at the code twice, $(PWD) is used a a Make variable, not as a shell variable. For using a shell variable, it should use double $$ instead ... So yes, this is broken since $(PWD) does not seem to be an official Make variable. There is $(CURDIR) which could do the job, too, but I guess "." is just fine as well. Andrew, what do you think?

 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