RE: [next] kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build
From: yamada.masahiro
Date: Fri Apr 19 2019 - 14:23:22 EST
Hi Sergey,
> -----Original Message-----
> From: Sergey Senozhatsky [mailto:sergey.senozhatsky.work@xxxxxxxxx]
> Sent: Friday, April 19, 2019 5:34 PM
> To: Yamada, Masahiro/åç çå <yamada.masahiro@xxxxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Sergey Senozhatsky
> <sergey.senozhatsky@xxxxxxxxx>
> Subject: [next] kbuild: use $(srctree) instead of KBUILD_SRC to check
> out-of-tree build
>
> Hello Masahiro,
>
> It seems that commit a9a49c2ad9b9b8 (linux-next) breaks ./scripts/tags.sh
> on my system. It scans, basically, my entire drive now (including the
> root partition):
>
> $ ./scripts/tags.sh tags
I did not know this script is run directly
because I expected people were using 'make tags'.
It is easy to fix, though.
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 6a551805db52..70e14c67bde7 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -19,7 +19,7 @@ ignore="$ignore ( -name *.mod.c ) -prune -o"
# Do not use full path if we do not use O=.. builds
# Use make O=. {tags|cscope}
# to force full paths for a non-O= build
-if [ "${srctree}" = "." ]; then
+if [ "${srctree}" = "." -o -z "${srctree}" ]; then
tree=
else
tree=${srctree}/
> find: â/arch/*.[chS]/â: No such file or directory
> find: â/includeâ: No such file or directory
> find: â/boot/lost+foundâ: Permission denied
> find: â/etc/pacman.d/gnupg/openpgp-revocs.dâ: Permission denied
> find: â/etc/pacman.d/gnupg/private-keys-v1.dâ: Permission denied
> find: â/etc/pacman.d/gnupg/crls.dâ: Permission denied
> find: â/etc/polkit-1/rules.dâ: Permission denied
> find: â/etc/sudoers.dâ: Permission denied
> find: â/etc/audisp/plugins.dâ: Permission denied
> find: â/home/lost+foundâ: Permission denied
> find: â/home/skâ: Permission denied
> find: â/lost+foundâ: Permission denied
> ctags: Warning: --extra option is obsolete; use --extras instead
> [..]
>
>
> With reverted a9a49c2ad9b9b8 tags scans kernel source tree only
>
> ./scripts/tags.sh tags
> find: âarch/*.[chS]/â: No such file or directory
> ctags: Warning: --extra option is obsolete; use --extras instead
> [..]
>
> -ss