License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / scripts / gdb / linux / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
3ee7b3fa
JK
2always := gdb-scripts
3
8e9b4667 4SRCTREE := $(abspath $(srctree))
3ee7b3fa
JK
5
6$(obj)/gdb-scripts:
7ifneq ($(KBUILD_SRC),)
8 $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
9endif
10 @:
11
f197d75f
KB
12quiet_cmd_gen_constants_py = GEN $@
13 cmd_gen_constants_py = \
14 $(CPP) -E -x c -P $(c_flags) $< > $@ ;\
15 sed -i '1,/<!-- end-c-headers -->/d;' $@
16
834a3529
KB
17targets += constants.py
18$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
19 $(call if_changed_dep,gen_constants_py)
f197d75f
KB
20
21build_constants_py: $(obj)/constants.py
abb035b4 22 @:
f197d75f
KB
23
24clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py