mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vipin Sharma <vipinsh@google.com>
To: gregkh@linuxfoundation.org, rkovhaev@gmail.com
Cc: dmatlack@google.com, linux-kernel@vger.kernel.org,
	Vipin Sharma <vipinsh@google.com>
Subject: [PATCH] scripts/tags.sh: Include tools directory in tags generation
Date: Fri, 17 Jun 2022 17:54:57 -0700	[thread overview]
Message-ID: <20220618005457.2379324-1-vipinsh@google.com> (raw)

Add tools directory in generating tags and quiet the "No such file or
directory" warnings.

It reverts the changes introduced in commit 162343a876f1
("scripts/tags.sh: exclude tools directory from tags generation") while
maintainig the original intent of the patch to get rid of the warnings.
This allows the root level cscope files to include tools source code
besides kernel and a single place to browse the code for both.

Signed-off-by: Vipin Sharma <vipinsh@google.com>
---

I have found myself many times to browse tools and other part of the
kernel code together. Excluding tools from the root level cscope makes
it difficult to efficiently move between files and find user api
definitions.

Root cause of these warning is due to generated .cmd files which use
relative paths in some files, I am not sure how to make them absolute
file paths which can satisfy realpath warnings. Also, not sure if those
warnings are helpful and should be kept. Passing "-q" to realpath seems
easier solution. Please, let me know if there is a better alternative.

Thanks

 scripts/tags.sh | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 01fab3d4f90b5..e137cf15aae9d 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -25,13 +25,6 @@ else
 	tree=${srctree}/
 fi
 
-# ignore userspace tools
-if [ -n "$COMPILED_SOURCE" ]; then
-	ignore="$ignore ( -path ./tools ) -prune -o"
-else
-	ignore="$ignore ( -path ${tree}tools ) -prune -o"
-fi
-
 # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
 if [ "${ALLSOURCE_ARCHS}" = "" ]; then
 	ALLSOURCE_ARCHS=${SRCARCH}
@@ -100,7 +93,7 @@ all_compiled_sources()
 		find $ignore -name "*.cmd" -exec \
 			grep -Poh '(?(?=^source_.* \K).*|(?=^  \K\S).*(?= \\))' {} \+ |
 		awk '!a[$0]++'
-	} | xargs realpath -es $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) |
+	} | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) |
 	sort -u
 }
 
-- 
2.37.0.rc0.104.g0611611a94-goog


             reply	other threads:[~2022-06-18  0:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18  0:54 Vipin Sharma [this message]
2022-06-27 17:47 ` Vipin Sharma
2022-06-28  6:05   ` Greg KH
2022-06-29 22:18     ` Vipin Sharma
2022-06-29 22:54       ` Cristian Ciocaltea
2022-06-30  6:42         ` Greg KH
2022-06-30  9:26           ` Cristian Ciocaltea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220618005457.2379324-1-vipinsh@google.com \
    --to=vipinsh@google.com \
    --cc=dmatlack@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkovhaev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®