Remove generated files
[framework/connectivity/libgphoto2.git] / doc / Makefile.am
1 SUBDIRS = api
2
3 old_EXTRA_DIST = DAEMON build_OS2.txt                                   \
4         camlib_devel.lyx                                                \
5         camlib_devel-portmon.eps camlib_devel-repeater.eps              \
6         camlib_devel.sgml camlib_devel.txt camlib_devel-y.eps           \
7         frontend_devel.lyx frontend_devel.sgml frontend_devel.txt       \
8         libgphoto2.3 libgphoto2_port.3
9
10 man_MANS = libgphoto2.3 libgphoto2_port.3
11
12 # doc_DATA = FAQ faq.xml
13 ########################################################################
14 # Conditional rules, depending on tool availability
15 ########################################################################
16
17 if HAVE_DOXYGEN
18
19 DOXYGEN_FILES =
20 DOXYGEN_STAMPS = $(DOXYGEN_OUTPUT_DIR).stamp
21
22 # FIXME: Depend on source files.
23 $(DOXYGEN_OUTPUT_DIR).stamp: Doxyfile
24         doxygen Doxyfile
25         echo > $@
26
27 $(HTML_APIDOC_DIR).tar.gz: $(DOXYGEN_OUTPUT_DIR).stamp
28         (cd $(DOXYGEN_OUTPUT_DIR) && $(AMTAR) chof - $(HTML_APIDOC_DIR) | GZIP=--best gzip -c) > $@
29
30 DOC_APIDOC_HTML = apidocs.html
31
32 install-apidocs: $(DOXYGEN_OUTPUT_DIR).stamp
33         $(INSTALL) -m 0755 -d $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)
34         $(INSTALL) -m 0644 $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)/* $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)/
35
36 uninstall-apidocs:
37         cd "$(DESTDIR)$(docdir)" && rm -f $(DOC_APIDOC_HTML)/*
38         rmdir $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)
39
40 clean-apidocs:
41         rm -rf $(DOXYGEN_OUTPUT_DIR)
42         rm -f $(DOXYGEN_OUTPUT_DIR).stamp
43         rm -f $(HTML_APIDOC_DIR).tar.gz
44
45
46 # if we ever have more targets, move those out...
47
48 all-local: $(DOXYGEN_STAMPS)
49
50 install-data-local: install-apidocs
51
52 uninstall-local: uninstall-apidocs
53
54 clean-local: clean-apidocs
55
56 doc_EXTRA_DIST = $(HTML_APIDOC_DIR).tar.gz 
57
58 doc_DATA = $(DOXYGEN_FILES) README.apidocs
59
60 CLEANFILES = $(DOXYGEN_FILES) $(DOXYGEN_STAMPS)
61
62 endif
63
64
65 ########################################################################
66 # Common part
67 ########################################################################
68
69 EXTRA_DIST = $(doc_EXTRA_DIST) Doxyfile.in README.apidocs $(old_EXTRA_DIST)