Makefile 577 B

1234567891011121314151617181920212223
  1. always := gdb-scripts
  2. SRCTREE := $(shell cd $(srctree) && /bin/pwd)
  3. $(obj)/gdb-scripts:
  4. ifneq ($(KBUILD_SRC),)
  5. $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj)
  6. endif
  7. @:
  8. quiet_cmd_gen_constants_py = GEN $@
  9. cmd_gen_constants_py = \
  10. $(CPP) -E -x c -P $(c_flags) $< > $@ ;\
  11. sed -i '1,/<!-- end-c-headers -->/d;' $@
  12. targets += constants.py
  13. $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE
  14. $(call if_changed_dep,gen_constants_py)
  15. build_constants_py: $(obj)/constants.py
  16. @:
  17. clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py