1266423Sjfv# Doxygen documentation will not be generated with default configuration,
2266423Sjfv# unless '--enable-doxygen-doc' is configured.
3349163Serj# The following targets are all about doxygen:
4266423Sjfv# make                # 'make doxygen' would be auto executed
5349163Serj# make doxygen        # generating doxygen documentation
6266423Sjfv# make doxygen-doc    # same as 'make doxygen'
7266423Sjfv# make clean          # clean docs generated by doxygen
8266423Sjfv# make install        # install doxygen documentation
9266423Sjfv# make uninstall      # uninstall doxygen documentation
10266423Sjfv
11266423Sjfvif ENABLE_DOXYGEN
12266423Sjfv
13266423Sjfv# Add all needed rules defined in ax_prog_doxygen.m4
14266423Sjfv@DX_RULES@
15266423Sjfv
16266423Sjfv# Use 'make clean' to clean docs generated by doxygen.
17266423Sjfvclean-local:
18266423Sjfv	-rm -rf $(DX_CLEANFILES)
19266423Sjfv
20266423Sjfv# integrate doxygen with automake targets
21266423Sjfvman3_MANS = @DX_DOCDIR@/man/man3/*
22266423Sjfv$(man3_MANS): doxygen-doc
23266423Sjfv
24266423Sjfv# Docs will be installed. It may be one or more docs supported
25266423Sjfv# by doxygen, but does not include 'man'.
26266423Sjfvdocdirs = $(DX_INSTALL_DOCS)
27266423Sjfv
28266423Sjfv# Rules for installing docs generated by doxygen into $(htmldir),
29266423Sjfv# The typical value of $(htmldir) is '/usr/local/share/doc/$(PACKAGE)'
30266423Sjfvinstall-data-local:
31266423Sjfv	@if ! test -d "$(DESTDIR)$(htmldir)"; then \
32266423Sjfv	  echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \
33266423Sjfv	  $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
34266423Sjfv	fi
35266423Sjfv	@for d in $(docdirs); do \
36266423Sjfv	  echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
37266423Sjfv	  cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
38266423Sjfv	done
39266423Sjfv
40266423Sjfv# Rules for uninstalling docs generated by doxygen from $(htmldir)
41266423Sjfvuninstall-local:
42266423Sjfv	@for d in $(docdirs); do \
43266423Sjfv	  d=`basename $$d`; \
44266423Sjfv	  echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
45266423Sjfv	  { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
46266423Sjfv	  rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \
47266423Sjfv	  test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
48266423Sjfv	  { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
49266423Sjfv	  rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \
50270346Sjfv	done
51266423Sjfv	rmdir "$(DESTDIR)$(htmldir)/" || true
52266423Sjfv
53266423Sjfvdoxygen: doxygen-doc
54269198Sjfv
55269198Sjfvendif ENABLE_DOXYGEN
56266423Sjfv