On Fri, Aug 27, 2021 at 11:26:38AM +0200, 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 ? If you do 'env' I'll bet you'll see something like ... PWD= ... > I use a bash on s390x. > inside bash PWD shows current directory > GNU Make is 4.2.1 on Ubuntu 18.04 > > This works on X with redhat and GNU make 3.82 > > This happens on s390x since: > 51b8f0b1 2017-11-23 Andrew Jones Makefile: fix cscope target No surprise there, that's when the $(PWD) use was first introduced. > > So I add Andrew as CC, I did forgot to do before. > I'll send a patch changing $(PWD) to $(shell pwd) Thanks, drew