linux-brain/scripts/gdb/linux/Makefile
Masahiro Yamada 1e5ff84ffe scripts/gdb: do not descend into scripts/gdb from scripts
Currently, Kbuild descends from scripts/Makefile to scripts/gdb/Makefile
just for creating symbolic links, but it does not need to do it so early.

Merge the two descending paths to simplify the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2019-02-27 21:40:09 +09:00

22 lines
523 B
Makefile

# SPDX-License-Identifier: GPL-2.0
always := gdb-scripts
SRCTREE := $(abspath $(srctree))
$(obj)/gdb-scripts:
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
endif
@:
quiet_cmd_gen_constants_py = GEN $@
cmd_gen_constants_py = \
$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
sed -i '1,/<!-- end-c-headers -->/d;' $@
extra-y += constants.py
$(obj)/constants.py: $(src)/constants.py.in FORCE
$(call if_changed_dep,gen_constants_py)
clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py)