Hi Masahiro, On Fri, 05 May 2023, Masahiro Yamada wrote: > > It is wrong to check whether you are building out of the > source tree. See line 159 of the Makefile. > Oh, didn't think about that case. Thanks for the reference and the further clarification in reply. I'll remove the ${O} check then and use saner mechanisms. > BTW, this patch does not work for me. > It spits a ton of "not found" warnings, then generates > empty tags. > > > $ make O=build gtags Interesting... When doing: $ make O=../build gtags scripts/tags.sh "$tree" variable is set to the absolute path of the kernel source tree. Thus all the paths fed to gtags are absolute and this patch series works. When doing what you tested with: $ make O=build/ gtags scripts/tags.sh "$tree" variable is set to the path of the kernel source tree *relative* to O=build/. So in that case kernel source "$tree" equals ".." With this series, the build will fail as gtags current working dir is the kernel source tree, and all the fed paths are thus invalid as they're relative to O=build/ instead. Without this series the build will still fail given the original problem of having the files "outside the source tree", where gtags thinks the source tree is "build/". I'll think of something that can cover the both cases. Kind regards, Ahmed -- Linutronix GmbH