blob: 8b00031f53497035b68bfe65bd682989430fe016 [file] [log] [blame]
Jan Kiszka3ee7b3f2015-02-17 13:46:36 -08001always := gdb-scripts
2
3SRCTREE := $(shell cd $(srctree) && /bin/pwd)
4
5$(obj)/gdb-scripts:
6ifneq ($(KBUILD_SRC),)
7 $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
8endif
9 @:
10
Kieran Binghamf197d752016-05-23 16:24:40 -070011quiet_cmd_gen_constants_py = GEN $@
12 cmd_gen_constants_py = \
13 $(CPP) -E -x c -P $(c_flags) $< > $@ ;\
14 sed -i '1,/<!-- end-c-headers -->/d;' $@
15
Kieran Bingham834a3522016-07-14 12:06:58 -070016targets += constants.py
17$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
18 $(call if_changed_dep,gen_constants_py)
Kieran Binghamf197d752016-05-23 16:24:40 -070019
20build_constants_py: $(obj)/constants.py
Kieran Binghamabb035b2016-07-14 12:06:55 -070021 @:
Kieran Binghamf197d752016-05-23 16:24:40 -070022
23clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py