1
0
Fork 0
alistair23-linux/scripts/gdb/linux/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)