diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-05-13 11:35:51 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2022-05-13 11:36:28 +0200 |
commit | 875df65542f3e91a651080a2f9c3301632291d3e (patch) | |
tree | cef54f9a0e1dfa5128a465a541f1246cbe16a19a | |
parent | 0c27c5f3fbfd85c610405c40a10026551b4cf99f (diff) | |
download | ptxdist-875df65542f3e91a651080a2f9c3301632291d3e.tar.gz ptxdist-875df65542f3e91a651080a2f9c3301632291d3e.tar.xz |
ptxd_make_world_compile_commands_filter: create compile_commands.json in the correct dir for lndir:// URLs
With a lndir:// URL, ${pkg_dir} is a separate directory with symlinks for
all files, so compile_commands.json should not be placed here. Use the real
source directory from the URL instead.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_compile_commands.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_world_compile_commands.sh b/scripts/lib/ptxd_make_world_compile_commands.sh index 44aed3477..9ea8d88a7 100644 --- a/scripts/lib/ptxd_make_world_compile_commands.sh +++ b/scripts/lib/ptxd_make_world_compile_commands.sh @@ -10,6 +10,11 @@ ptxd_make_world_compile_commands_filter() { local src_cmds="${1:-${pkg_build_dir}/compile_commands.json}" local dst_cmds="${pkg_dir}/compile_commands.json" + if [[ "${pkg_url}" =~ ^lndir:// ]]; then + # find the real source dir for lndir:// URLs + dst_cmds="$(ptxd_abspath "$(ptxd_file_url_path "${pkg_url}")")/compile_commands.json" + fi + if [ ! -e "${src_cmds}" ]; then ptxd_verbose "Ignoring missing '${src_cmds}'." return |