[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the sourc

From: Greg Kurz
Subject: [PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree
Date: Thu, 15 Oct 2020 16:49:06 +0200
User-agent: StGit/0.21

Tools usually expect the index files to be in the source tree, eg. emacs.
This is already the case when doing out-of-tree builds, but with in-tree
builds they end up in the build directory.

Force cscope, ctags and etags to put them in the source tree.

Signed-off-by: Greg Kurz <groug@kaod.org>
 Makefile |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 3c5a0b0f7a11..45f983d9ef08 100644
--- a/Makefile
+++ b/Makefile
@@ -194,19 +194,19 @@ find-src-path = find "$(SRC_PATH)/" -path 
"$(SRC_PATH)/meson" -prune -o \( -name
 .PHONY: ctags
-       rm -f tags
-       $(find-src-path) -exec ctags --append {} +
+       rm -f "$(SRC_PATH)/"tags
+       $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
-       rm -f TAGS
-       $(find-src-path) -exec etags --append {} +
+       rm -f "$(SRC_PATH)/"TAGS
+       $(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} +
 .PHONY: cscope
        rm -f "$(SRC_PATH)"/cscope.*
        $(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
-       cscope -b -i"$(SRC_PATH)/cscope.files"
+       cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out
 # Needed by "meson install"
 export DESTDIR

reply via email to

[Prev in Thread] Current Thread [Next in Thread]