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