summaryrefslogtreecommitdiff
path: root/Documentation/admin-guide
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-08-22 17:56:11 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-08-26 18:44:33 +0300
commit6ca4c6d25949117dc5b4845612e290b6d89e70a8 (patch)
treea9f4640d6ba787fec387ac3f79543a56de72b58d /Documentation/admin-guide
parentea6cedc5b8a4e666da41f1173ea19970fa60683f (diff)
downloadlinux-6ca4c6d25949117dc5b4845612e290b6d89e70a8.tar.xz
gen_compile_commands: do not support .cmd files under tools/ directory
The tools/ directory uses a different build system, and the format of .cmd files is different because the tools builds run in a different work directory. Supporting two formats compilicates the script. The only loss by this change is objtool. Also, rename the confusing variable 'relative_path' because it is not necessarily a relative path. When the output directory is not the direct child of the source tree (e.g. O=foo/bar), it is an absolute path. Rename it to 'file_path'. os.path.join(root_directory, file_path) works whether the file_path is relative or not. If file_path is already absolute, it returns it as-is. I used os.path.abspath() to normalize file paths. If you run this script against the kernel built with O=foo option, the file_path contains '../' patterns. os.path.abspath() fixes up 'foo/bar/../baz' into 'foo/baz', and produces a cleaner commands_database.json. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'Documentation/admin-guide')
0 files changed, 0 insertions, 0 deletions