Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / scripts / gdb / linux / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 always := gdb-scripts
3
4 SRCTREE := $(abspath $(srctree))
5
6 $(obj)/gdb-scripts:
7 ifneq ($(KBUILD_SRC),)
8         $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
9 endif
10         @:
11
12 quiet_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
17 targets += constants.py
18 $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
19         $(call if_changed_dep,gen_constants_py)
20
21 build_constants_py: $(obj)/constants.py
22         @:
23
24 clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py