Makefile.am revision 1c7386f4
1
2EXTRA_DIST = \
3tutorial/index.html \
4tutorial/xcb.css \
5xcb.doxygen.in \
6xkb_internals \
7xkb_issues
8
9docdirs = $(srcdir)/tutorial
10
11if ENABLE_DEVEL_DOCS
12if HAVE_DOXYGEN
13if HAVE_DOT
14
15docdirs += manual
16
17# rule to build documentation and copy necessary files
18manual:
19	doxygen xcb.doxygen
20
21# rules to clean
22clean-local:
23	rm -rf manual/
24
25endif
26endif
27endif
28
29all-local: $(docdirs)
30
31# rule to install the html documentation and tutorial in $(htmldir)
32install-data-local:
33	@if ! test -d "$(DESTDIR)$(htmldir)"; then \
34	  echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \
35	  $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
36	fi
37	@for d in $(docdirs); do \
38	  echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
39	  cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
40	done
41
42uninstall-local:
43	@for d in $(docdirs); do \
44	  d=`basename $$d`; \
45	  echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \
46	  test ! -d '$(DESTDIR)$(htmldir)/'$$d || { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \
47	done
48	rmdir "$(DESTDIR)$(htmldir)/" || true
49