Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Rules to convert a .h file to inline RST documentation
  2. SRC_DIR=$(srctree)/Documentation/media
  3. PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
  4. UAPI = $(srctree)/include/uapi/linux
  5. KAPI = $(srctree)/include/linux
  6. FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
  7. videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
  8. TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
  9. gen_rst = \
  10. echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
  11. ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
  12. quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
  13. ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
  14. silent_gen_rst = ${gen_rst}
  15. $(BUILDDIR)/audio.h.rst: ${UAPI}/dvb/audio.h ${PARSER} $(SRC_DIR)/audio.h.rst.exceptions
  16. @$($(quiet)gen_rst)
  17. $(BUILDDIR)/ca.h.rst: ${UAPI}/dvb/ca.h ${PARSER} $(SRC_DIR)/ca.h.rst.exceptions
  18. @$($(quiet)gen_rst)
  19. $(BUILDDIR)/dmx.h.rst: ${UAPI}/dvb/dmx.h ${PARSER} $(SRC_DIR)/dmx.h.rst.exceptions
  20. @$($(quiet)gen_rst)
  21. $(BUILDDIR)/frontend.h.rst: ${UAPI}/dvb/frontend.h ${PARSER} $(SRC_DIR)/frontend.h.rst.exceptions
  22. @$($(quiet)gen_rst)
  23. $(BUILDDIR)/net.h.rst: ${UAPI}/dvb/net.h ${PARSER} $(SRC_DIR)/net.h.rst.exceptions
  24. @$($(quiet)gen_rst)
  25. $(BUILDDIR)/video.h.rst: ${UAPI}/dvb/video.h ${PARSER} $(SRC_DIR)/video.h.rst.exceptions
  26. @$($(quiet)gen_rst)
  27. $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.h.rst.exceptions
  28. @$($(quiet)gen_rst)
  29. $(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
  30. @$($(quiet)gen_rst)
  31. $(BUILDDIR)/cec.h.rst: ${UAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
  32. @$($(quiet)gen_rst)
  33. $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
  34. @$($(quiet)gen_rst)
  35. # Media build rules
  36. .PHONY: all html epub xml latex
  37. all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
  38. html: all
  39. epub: all
  40. xml: all
  41. latex: $(IMGPDF) all
  42. linkcheck:
  43. clean:
  44. -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
  45. $(BUILDDIR):
  46. $(Q)mkdir -p $@