xref: /openbmc/u-boot/Documentation/media/Makefile (revision 2ae23a28)
1*78a88f79SMario Six# Rules to convert a .h file to inline RST documentation
2*78a88f79SMario Six
3*78a88f79SMario SixSRC_DIR=$(srctree)/Documentation/media
4*78a88f79SMario SixPARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
5*78a88f79SMario SixAPI = $(srctree)/include
6*78a88f79SMario Six
7*78a88f79SMario SixFILES = linker_lists.h.rst
8*78a88f79SMario Six
9*78a88f79SMario SixTARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
10*78a88f79SMario Six
11*78a88f79SMario Sixgen_rst = \
12*78a88f79SMario Six	echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
13*78a88f79SMario Six	${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
14*78a88f79SMario Six
15*78a88f79SMario Sixquiet_gen_rst = echo '  PARSE   $(patsubst $(srctree)/%,%,$<)'; \
16*78a88f79SMario Six	${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
17*78a88f79SMario Six
18*78a88f79SMario Sixsilent_gen_rst = ${gen_rst}
19*78a88f79SMario Six
20*78a88f79SMario Six$(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linker_lists.h.rst.exceptions
21*78a88f79SMario Six	@$($(quiet)gen_rst)
22*78a88f79SMario Six
23*78a88f79SMario Six# Media build rules
24*78a88f79SMario Six
25*78a88f79SMario Six.PHONY: all html epub xml latex
26*78a88f79SMario Six
27*78a88f79SMario Sixall: $(IMGDOT) $(BUILDDIR) ${TARGETS}
28*78a88f79SMario Sixhtml: all
29*78a88f79SMario Sixepub: all
30*78a88f79SMario Sixxml: all
31*78a88f79SMario Sixlatex: $(IMGPDF) all
32*78a88f79SMario Sixlinkcheck:
33*78a88f79SMario Six
34*78a88f79SMario Sixclean:
35*78a88f79SMario Six	-rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
36*78a88f79SMario Six
37*78a88f79SMario Six$(BUILDDIR):
38*78a88f79SMario Six	$(Q)mkdir -p $@
39