public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1] Makefile: Skip symbolic links to files for cscope
@ 2019-10-08 18:12 Andy Shevchenko
  2019-10-17 11:25 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2019-10-08 18:12 UTC (permalink / raw)
  To: u-boot

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 <andriy.shevchenko@linux.intel.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 54da5cd51c..968a70885b 100644
--- a/Makefile
+++ b/Makefile
@@ -1793,6 +1793,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 = \
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v1] Makefile: Skip symbolic links to files for cscope
  2019-10-08 18:12 [U-Boot] [PATCH v1] Makefile: Skip symbolic links to files for cscope Andy Shevchenko
@ 2019-10-17 11:25 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-10-17 11:25 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 08, 2019 at 09:12:45PM +0300, Andy Shevchenko wrote:

> 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 <andriy.shevchenko@linux.intel.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191017/bdf23c08/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-08 18:12 [U-Boot] [PATCH v1] Makefile: Skip symbolic links to files for cscope Andy Shevchenko
2019-10-17 11:25 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox