Mario Six | 8fac291 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 1 | # Rules to convert a .h file to inline RST documentation |
| 2 | |
Breno Matheus Lima | 7e3400b | 2019-06-05 18:18:30 +0000 | [diff] [blame] | 3 | SRC_DIR=$(srctree)/doc/media |
| 4 | PARSER = $(srctree)/doc/sphinx/parse-headers.pl |
Mario Six | 8fac291 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 5 | API = $(srctree)/include |
| 6 | |
| 7 | FILES = linker_lists.h.rst |
| 8 | |
| 9 | TARGETS := $(addprefix $(BUILDDIR)/, $(FILES)) |
| 10 | |
| 11 | gen_rst = \ |
| 12 | echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \ |
| 13 | ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions |
| 14 | |
| 15 | quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \ |
| 16 | ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions |
| 17 | |
| 18 | silent_gen_rst = ${gen_rst} |
| 19 | |
| 20 | $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linker_lists.h.rst.exceptions |
| 21 | @$($(quiet)gen_rst) |
| 22 | |
| 23 | # Media build rules |
| 24 | |
Maxim Cournoyer | 52ac5e4 | 2022-12-18 21:48:08 -0500 | [diff] [blame] | 25 | .PHONY: all html texinfo epub xml latex |
Mario Six | 8fac291 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 26 | |
| 27 | all: $(IMGDOT) $(BUILDDIR) ${TARGETS} |
| 28 | html: all |
Maxim Cournoyer | 52ac5e4 | 2022-12-18 21:48:08 -0500 | [diff] [blame] | 29 | texinfo: all |
Mario Six | 8fac291 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 30 | epub: all |
| 31 | xml: all |
| 32 | latex: $(IMGPDF) all |
| 33 | linkcheck: |
| 34 | |
| 35 | clean: |
| 36 | -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null |
| 37 | |
| 38 | $(BUILDDIR): |
| 39 | $(Q)mkdir -p $@ |