mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
1e5ff84ffe
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>
22 lines
523 B
Makefile
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)
|