xref: /freebsd/contrib/libevent/doxygen.am (revision b50261e21f39a6c7249a49e7b60aa878c98512a8)
1# Doxygen documentation will not be generated with default configuration,
2# unless '--enable-doxygen-doc' is configured.
3# The following targets are all about doxygen:
4# make                # 'make doxygen' would be auto executed
5# make doxygen        # generating doxygen documentation
6# make doxygen-doc    # same as 'make doxygen'
7# make clean          # clean docs generated by doxygen
8# make install        # install doxygen documentation
9# make uninstall      # uninstall doxygen documentation
10
11if ENABLE_DOXYGEN
12
13# Add all needed rules defined in ax_prog_doxygen.m4
14@DX_RULES@
15
16# Use 'make clean' to clean docs generated by doxygen.
17clean-local:
18	-rm -rf $(DX_CLEANFILES)
19
20# integrate doxygen with automake targets
21man3_MANS = @DX_DOCDIR@/man/man3/*
22$(man3_MANS): doxygen-doc
23
24# Docs will be installed. It may be one or more docs supported
25# by doxygen, but does not include 'man'.
26docdirs = $(DX_INSTALL_DOCS)
27
28# Rules for installing docs generated by doxygen into $(htmldir),
29# The typical value of $(htmldir) is '/usr/local/share/doc/$(PACKAGE)'
30install-data-local:
31	@if ! test -d "$(DESTDIR)$(htmldir)"; then \
32	  echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \
33	  $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
34	fi
35	@for d in $(docdirs); do \
36	  echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
37	  cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
38	done
39
40# Rules for uninstalling docs generated by doxygen from $(htmldir)
41uninstall-local:
42	@for d in $(docdirs); do \
43	  d=`basename $$d`; \
44	  echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
45	  { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
46	  rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \
47	  test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
48	  { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
49	  rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \
50	done
51	rmdir "$(DESTDIR)$(htmldir)/" || true
52
53doxygen: doxygen-doc
54
55endif ENABLE_DOXYGEN
56