Makefile: fix cscope target
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 17 Dec 2014 16:58:23 +0000 (17:58 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 31 Dec 2014 20:29:05 +0000 (21:29 +0100)
This target doesn't work with current directory layout. Just make cscope
index all .c and .h files.

While we're at it: add cscope output files to .gitignore.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
.gitignore
Makefile

index 73e88fb5bb7b3640b23468dce2d64e05ea48f28e..be1d46199f57ed955f0914af93fdb2c0f1c02299 100644 (file)
@@ -42,3 +42,11 @@ core
 /busybox.links
 /runtest-tempdir-links
 /testsuite/echo-ne
+
+#
+# cscope output
+#
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
index cd42ca37b2195edd5d9415c1a6b8872addd14443..e0888578f7fef56119999e3eaa53383dc330eceb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1165,24 +1165,7 @@ endif
 ALLSOURCE_ARCHS := $(ARCH)
 
 define all-sources
-       ( find $(__srctree) $(RCS_FIND_IGNORE) \
-              \( -name include -o -name arch \) -prune -o \
-              -name '*.[chS]' -print; \
-         for ARCH in $(ALLSOURCE_ARCHS) ; do \
-              find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
-                   -name '*.[chS]' -print; \
-         done ; \
-         find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
-              -name '*.[chS]' -print; \
-         find $(__srctree)include $(RCS_FIND_IGNORE) \
-              \( -name config -o -name 'asm-*' \) -prune \
-              -o -name '*.[chS]' -print; \
-         for ARCH in $(ALLINCLUDE_ARCHS) ; do \
-              find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
-                   -name '*.[chS]' -print; \
-         done ; \
-         find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
-              -name '*.[chS]' -print )
+       ( find -regex '.*\.[ch]$$' )
 endef
 
 quiet_cmd_cscope-file = FILELST cscope.files