add Makefile.am for building/installing doxygen doc
[free-sw/xcb/libxcb] / doc / Makefile.am
1
2 EXTRA_DIST = \
3 tutorial/index.html \
4 tutorial/xcb.css
5
6 if BUILD_DOCS
7
8 # install documentation
9
10 all-local: doc-build.stamp
11
12 # rule to remove all old created files
13 doc-prepare.stamp:
14         @if test -d manual/ ; then \
15           rm -rf manual/; \
16         fi
17
18 # rule to build documentation and copy necessary files
19 doc-build.stamp: doc-prepare.stamp
20         @cd .. && doxygen xcb.doxygen
21
22 # rules to clean
23 clean-local:
24         @rm -rf manual/
25
26 install-data-local: install-html-local
27
28 # rule to install the html documentation and tutorial in $(htmldir)
29 install-html-local:
30         @if ! test -d "$(DESTDIR)$(htmldir)"; then \
31           $(mkinstalldirs) "$(DESTDIR)$(htmldir)"; \
32         fi
33         @cp -pr manual/ "$(DESTDIR)$(htmldir)"
34         @cp -pr tutorial/ "$(DESTDIR)$(htmldir)"
35
36 # rule to uninstall the documentation
37 uninstall-local:
38         @rm -rf $(DESTDIR)$(htmldir)
39
40 endif