Jan Kiszka | 3ee7b3f | 2015-02-17 13:46:36 -0800 | [diff] [blame] | 1 | always := gdb-scripts |
| 2 | |
| 3 | SRCTREE := $(shell cd $(srctree) && /bin/pwd) |
| 4 | |
| 5 | $(obj)/gdb-scripts: |
| 6 | ifneq ($(KBUILD_SRC),) |
| 7 | $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj) |
| 8 | endif |
| 9 | @: |
| 10 | |
Kieran Bingham | f197d75 | 2016-05-23 16:24:40 -0700 | [diff] [blame] | 11 | quiet_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 Bingham | 834a352 | 2016-07-14 12:06:58 -0700 | [diff] [blame] | 16 | targets += constants.py |
| 17 | $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE |
| 18 | $(call if_changed_dep,gen_constants_py) |
Kieran Bingham | f197d75 | 2016-05-23 16:24:40 -0700 | [diff] [blame] | 19 | |
| 20 | build_constants_py: $(obj)/constants.py |
Kieran Bingham | abb035b | 2016-07-14 12:06:55 -0700 | [diff] [blame] | 21 | @: |
Kieran Bingham | f197d75 | 2016-05-23 16:24:40 -0700 | [diff] [blame] | 22 | |
| 23 | clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py |