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