blob: b9b43a34c362a7aa61a4a0d1ed6a1089883a4f6d [file] [log] [blame]
Mario Six78a88f72018-07-10 08:40:17 +02001# Rules to convert a .h file to inline RST documentation
2
Breno Matheus Lima656d8da2019-06-05 18:18:30 +00003SRC_DIR=$(srctree)/doc/media
4PARSER = $(srctree)/doc/sphinx/parse-headers.pl
Mario Six78a88f72018-07-10 08:40:17 +02005API = $(srctree)/include
6
7FILES = linker_lists.h.rst
8
9TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
10
11gen_rst = \
12 echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
13 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
14
15quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
16 ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
17
18silent_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
25.PHONY: all html epub xml latex
26
27all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
28html: all
29epub: all
30xml: all
31latex: $(IMGPDF) all
32linkcheck:
33
34clean:
35 -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
36
37$(BUILDDIR):
38 $(Q)mkdir -p $@