Thread (40 messages) flat view 40 messages, 7 authors, 2021-08-04
STALE1869d

Revision v3 of 3 in this series.

Revisions (3)
  1. v2 [diff vs current]
  2. v3 current
  3. v4 [diff vs current]

[PATCH v3 4/5] Makefile: the "cscope" target always creates a "cscope.out"

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-07-21 23:23:21
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

In the preceding commit the "cscope" target was changed to be a phony
alias for the "cscope.out" target.

The cscope target was added in a2a9150bf06 (makefile: Add a cscope
target, 2007-10-06), and has always referred to cscope* instead of to
cscope.out.

As far as I can tell this ambiguity was never needed. The
"-fcscope.out" (note, no whitespace) argument is enabled by default,
but let's provide it explicitly for good measure.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 .gitignore | 2 +-
 Makefile   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 311841f9bed..d74029c1ca7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -217,7 +217,7 @@
 /.vscode/
 /tags
 /TAGS
-/cscope*
+/cscope.out
 /compile_commands.json
 *.hcc
 *.obj
diff --git a/Makefile b/Makefile
index 18895d94ffa..730ff23b923 100644
--- a/Makefile
+++ b/Makefile
@@ -2752,8 +2752,8 @@ tags: $(FOUND_SOURCE_FILES)
 	mv tags+ tags
 
 cscope.out: $(FOUND_SOURCE_FILES)
-	$(QUIET_GEN)$(RM) cscope* && \
-	echo $(FOUND_SOURCE_FILES) | xargs cscope -b
+	$(QUIET_GEN)$(RM) cscope.out && \
+	echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@ -b
 
 .PHONY: cscope
 cscope: cscope.out
@@ -3230,7 +3230,7 @@ clean: profile-clean coverage-clean cocciclean
 	$(RM) $(HCC)
 	$(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json
 	$(RM) -r po/build/
-	$(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope*
+	$(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope.out
 	$(RM) -r .dist-tmp-dir .doc-tmp-dir
 	$(RM) $(GIT_TARNAME).tar.gz
 	$(RM) $(htmldocs).tar.gz $(manpages).tar.gz
-- 
2.32.0.955.ge7c5360f7e7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help