1docdir=$(DESTDIR)$(prefix)/share/doc/@PACKAGE@
2
3EXTRA_DIST = Doxyfile.in white-xifish.png
4
5# ensure doxygen-build.stamp is included,  or else the documentation will
6# not be built or distributed
7noinst_DATA = doxygen-build.stamp
8
9if HAVE_DOXYGEN
10doxygen-build.stamp: Doxyfile $(top_srcdir)/include/fishsound/*.h
11	doxygen
12	touch doxygen-build.stamp
13else
14doxygen-build.stamp:
15	echo "*** Warning: Doxygen not found; documentation will not be built."
16	touch doxygen-build.stamp
17endif
18
19dist_docdir = $(distdir)/libfishsound
20
21dist-hook:
22	if test -d libfishsound; then \
23	  mkdir $(dist_docdir); \
24	  for dir in libfishsound/*; do \
25	    b=`basename $$dir`; \
26	    if test $$b != "CVS"; then \
27	      if test -d $$dir; then \
28	        mkdir $(dist_docdir)/$$b; \
29	        for f in $$dir/*; do \
30		  cp -p $$f $(dist_docdir)/$$b; \
31	        done \
32	      fi \
33	    fi \
34	  done \
35	fi
36
37
38install-data-local: doxygen-build.stamp
39	$(mkinstalldirs) $(docdir)
40	if test -d libfishsound; then \
41	  for dir in libfishsound/*; do \
42	    if test -d $$dir; then \
43	      b=`basename $$dir`; \
44	      $(mkinstalldirs) $(docdir)/$$b; \
45	      for f in $$dir/*; do \
46		$(INSTALL_DATA) $$f $(docdir)/$$b; \
47	      done \
48	    fi \
49	  done \
50	fi
51
52uninstall-local:
53	rm -rf $(docdir)
54
55clean-local:
56	if test -d libfishsound; then rm -rf libfishsound; fi
57	if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
58
59