2015-02-17 21:46:36 +00:00
|
|
|
always := gdb-scripts
|
|
|
|
|
|
|
|
SRCTREE := $(shell cd $(srctree) && /bin/pwd)
|
|
|
|
|
|
|
|
$(obj)/gdb-scripts:
|
|
|
|
ifneq ($(KBUILD_SRC),)
|
|
|
|
$(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
|
|
|
|
endif
|
|
|
|
@:
|
|
|
|
|
2016-05-23 23:24:40 +00:00
|
|
|
quiet_cmd_gen_constants_py = GEN $@
|
|
|
|
cmd_gen_constants_py = \
|
|
|
|
$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
|
|
|
|
sed -i '1,/<!-- end-c-headers -->/d;' $@
|
|
|
|
|
2016-07-14 19:06:58 +00:00
|
|
|
targets += constants.py
|
|
|
|
$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
|
|
|
|
$(call if_changed_dep,gen_constants_py)
|
2016-05-23 23:24:40 +00:00
|
|
|
|
|
|
|
build_constants_py: $(obj)/constants.py
|
2016-07-14 19:06:55 +00:00
|
|
|
@:
|
2016-05-23 23:24:40 +00:00
|
|
|
|
|
|
|
clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py
|