Home | History | Annotate | Download | only in doxygen
      1 
      2 .SUFFIXES = .gv .png .map
      3 
      4 noinst_DATA = \
      5               xml/Client/index.xml \
      6               xml/Server/index.xml \
      7               html/Client/index.html \
      8               html/Server/index.html
      9 dist_noinst_DATA = wayland.doxygen.in
     10 
     11 scanned_src_files_shared = 				\
     12 	$(top_srcdir)/src/wayland-util.c	\
     13 	$(top_srcdir)/src/wayland-util.h
     14 
     15 scanned_src_files_Client = 				\
     16 	$(scanned_src_files_shared)			\
     17 	$(top_srcdir)/src/wayland-client.c	\
     18 	$(top_srcdir)/src/wayland-client.h	\
     19 	$(top_srcdir)/src/wayland-client-core.h
     20 
     21 scanned_src_files_Server = 				\
     22 	$(scanned_src_files_shared)			\
     23 	$(top_srcdir)/src/wayland-server.c	\
     24 	$(top_srcdir)/src/wayland-server.h	\
     25 	$(top_srcdir)/src/wayland-server-core.h	\
     26 	$(top_srcdir)/src/wayland-shm.c
     27 
     28 scanned_src_files_man =					\
     29 	$(scanned_src_files_Server)			\
     30 	$(top_srcdir)/src/wayland-client.c	\
     31 	$(top_srcdir)/src/wayland-client.h	\
     32 	$(top_srcdir)/src/wayland-client-core.h
     33 
     34 extra_doxygen = \
     35 	mainpage.dox
     36 
     37 extra_doxygen_Server = \
     38 	$(top_builddir)/protocol/wayland-server-protocol.h \
     39 	$(extra_doxygen)
     40 
     41 extra_doxygen_Client = \
     42 	$(top_builddir)/protocol/wayland-client-protocol.h \
     43 	$(extra_doxygen)
     44 
     45 diagramsdir := $(srcdir)/dot
     46 diagramssrc := $(wildcard $(diagramsdir)/*.gv)
     47 diagrams := $(patsubst $(diagramsdir)/%,xml/%,$(diagramssrc:.gv=.png))
     48 diagram_maps := $(patsubst $(diagramsdir)/%,xml/%,$(diagramssrc:.gv=.map))
     49 
     50 # find all man/man3/wl_foo.3 pages
     51 # for this to work, we need to create them before the man target (hence
     52 # all-local below)
     53 dist_man3_MANS = $(shell test -d man && find man/man3 -name "wl_*.3" -printf "man/man3/%P\n")
     54 
     55 # Listing various directories that might need to be created.
     56 alldirs := xml xml/Client xml/Server man/man3 html/Client html/Server
     57 
     58 $(diagrams): $(diagramssrc)
     59 
     60 $(diagram_maps):  $(diagramssrc)
     61 
     62 xml/%/index.xml: $(top_srcdir)/src/scanner.c $(scanned_src_files_%) wayland.doxygen $(diagrams) $(diagram_maps) | xml/%
     63 	$(AM_V_GEN)(cat wayland.doxygen; \
     64           echo "GENERATE_XML=YES"; \
     65           echo "XML_OUTPUT=xml/$*"; \
     66           echo "INPUT= $(scanned_src_files_$*)"; \
     67           ) | $(DOXYGEN) -
     68 
     69 html/%/index.html: $(scanned_src_files_%) wayland.doxygen $(diagrams) $(diagram_maps) | html/%
     70 	$(AM_V_GEN)(cat wayland.doxygen; \
     71           echo "PROJECT_NAME=\"Wayland $* API\""; \
     72           echo "GENERATE_HTML=YES"; \
     73           echo "HTML_OUTPUT=html/$*"; \
     74           echo "INPUT= $(scanned_src_files_$*) $(extra_doxygen_$*)"; \
     75           ) | $(DOXYGEN) -
     76 
     77 man/man3/wl_display.3: $(top_srcdir)/src/scanner.c $(scanned_src_files_man) wayland.doxygen | man/man3
     78 	$(AM_V_GEN)(cat wayland.doxygen; \
     79           echo "GENERATE_MAN=YES"; \
     80           echo "MAN_OUTPUT=man"; \
     81           echo "JAVADOC_AUTOBRIEF=NO"; \
     82           echo "INPUT= $(scanned_src_files_man)"; \
     83           ) | $(DOXYGEN) -
     84 
     85 xml/%.png: $(diagramsdir)/%.gv | xml
     86 	$(AM_V_GEN)$(DOT) -Tpng -o$@ $<
     87 
     88 xml/%.map: $(diagramsdir)/%.gv | xml
     89 	$(AM_V_GEN)$(DOT) -Tcmapx_np -o$@ $<
     90 
     91 # general rule to create one of the listed directories.
     92 $(alldirs):
     93 	$(AM_V_GEN)$(MKDIR_P) $@
     94 
     95 # there is no man-local
     96 all-local: man/man3/wl_display.3
     97 
     98 clean-local:
     99 	rm -rf xml/
    100 	rm -rf html/
    101 	rm -rf man/
    102 
    103 EXTRA_DIST = $(diagramssrc)
    104