Makefile 539 B

123456789101112131415161718192021
  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. $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in
  13. $(call if_changed,gen_constants_py)
  14. build_constants_py: $(obj)/constants.py
  15. clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py