From: Andy Shevchenko Date: Tue, 8 Oct 2019 18:12:45 +0000 (+0300) Subject: Makefile: Skip symbolic links to files for cscope X-Git-Tag: v2020.10~552^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e15a951da4db145bbcf659931f4bd4c5344ddb97;p=platform%2Fkernel%2Fu-boot.git Makefile: Skip symbolic links to files for cscope cscope complains that it can't find files that appears to be symbolic links cscope: cannot find file tools/binman/test/u_boot_binman_syms_bad.c cscope: cannot find file tools/version.h `find -L` tests properties, but name, and cscope can't cope with symbolic links (a lot of bugs in upstream were simple closed as kinda invalid). To work around the problem, exclude symbolic links from the cscope.files. Note, it's done in two pass to speed up the process (`-exec realpath ...` approach is not portable and introduces a 3x delay). Signed-off-by: Andy Shevchenko --- diff --git a/Makefile b/Makefile index 6fda326..c583e40 100644 --- a/Makefile +++ b/Makefile @@ -1808,6 +1808,9 @@ etags: cscope: $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ cscope.files + @find $(TAG_SUBDIRS) -name '*.[chS]' -type l -print | \ + grep -xvf - cscope.files > cscope.files.no-symlinks; \ + mv cscope.files.no-symlinks cscope.files cscope -b -q -k SYSTEM_MAP = \