Makefile 564 字节
Newer Older
J
Jan Kiszka 已提交
1 2
always := gdb-scripts

3
SRCTREE := $(abspath $(srctree))
J
Jan Kiszka 已提交
4 5 6 7 8 9 10

$(obj)/gdb-scripts:
ifneq ($(KBUILD_SRC),)
	$(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
endif
	@:

11 12 13 14 15
quiet_cmd_gen_constants_py = GEN     $@
      cmd_gen_constants_py = \
	$(CPP) -E -x c -P $(c_flags) $< > $@ ;\
	sed -i '1,/<!-- end-c-headers -->/d;' $@

16 17 18
targets += constants.py
$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
	$(call if_changed_dep,gen_constants_py)
19 20

build_constants_py: $(obj)/constants.py
21
	@:
22 23

clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py