linux-yocto/scripts/gdb/linux/Makefile
Douglas Anderson 659bbf7e1b kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)
Recently we went through the source tree and replaced
$(srctree)/$(src) w/ $(src). However, the gdb scripts Makefile had a
hidden $(srctree)/$(src) that looked like this:

  $(abspath $(srctree))/$(src)

Because we missed that then my installed kernel had symlinks that
looked like this:

  __init__.py ->
    ${INSTALL_DIR}/$(INSTALL_DIR}/scripts/gdb/linux/__init__.py

Let's also replace the midden $(abspath $(srctree))/$(src) with
$(src). Now:

  __init__.py ->
    $(INSTALL_DIR}/scripts/gdb/linux/__init__.py

Fixes: b1992c3772 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-05-29 16:40:03 +09:00

623 B

SPDX-License-Identifier: GPL-2.0

ifdef building_out_of_srctree

symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py))

quiet_cmd_symlink = SYMLINK $@ cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(src)/%,$@) $@

always-y += $(symlinks) $(addprefix $(obj)/, $(symlinks)): FORCE $(call if_changed,symlink)

endif

quiet_cmd_gen_constants_py = GEN $@ cmd_gen_constants_py =
$(CPP) -E -x c -P $(c_flags) $< > $@ ;
sed -i '1,//d;' $@

always-y += constants.py $(obj)/constants.py: $(src)/constants.py.in FORCE $(call if_changed_dep,gen_constants_py)

clean-files := *.pyc *.pyo