0.6.22 release
[platform/upstream/libexif.git] / doc / Makefile.am
1 ########################################################################
2 # Conditional rules, depending on tool availability
3 ########################################################################
4
5 DOXYGEN_FILES =
6 DOXYGEN_STAMPS =
7 DOXYGEN_UPLOAD =
8
9 DOXYGEN_INSTALL_TARGETS =
10 DOXYGEN_UNINSTALL_TARGETS =
11
12 DOXYGEN_CLEAN_TARGETS =
13
14 DOXYGEN_TARBALLS =
15
16 # FIXME: Depending on the source files would be sufficient, but only
17 #        maintainable with a completely non-recursive build.
18 #        Depending on libexif.la works at least.
19 $(top_builddir)/libexif/libexif.la:
20         cd $(top_builddir)/libexif && $(MAKE) libexif.la
21
22 if BUILD_DOCS
23 if HAVE_DOXYGEN
24
25 DOXYGEN_UPLOAD += $(HTML_APIDOC_DIR).uploaded
26
27 DOXYGEN_STAMPS += $(HTML_APIDOC_DIR).stamp
28 $(HTML_APIDOC_DIR).stamp: Doxyfile $(top_builddir)/libexif/libexif.la
29         $(DOXYGEN) $<
30         echo > $@
31
32 DOXYGEN_TARBALLS += $(HTML_APIDOC_DIR).tar.gz
33 $(HTML_APIDOC_DIR).tar.gz: $(HTML_APIDOC_DIR).stamp
34         (cd $(DOXYGEN_OUTPUT_DIR) && $(AMTAR) chof - $(HTML_APIDOC_DIR) | GZIP=--best gzip -c) > $@
35
36 if ENABLE_INTERNAL_DOCS
37 DOXYGEN_UPLOAD += $(HTML_APIDOC_INTERNALS_DIR).uploaded
38
39 DOXYGEN_STAMPS += $(HTML_APIDOC_INTERNALS_DIR).stamp
40 $(HTML_APIDOC_INTERNALS_DIR).stamp: Doxyfile-internals $(top_builddir)/libexif/libexif.la
41         $(DOXYGEN) $<
42         echo > $@
43
44 DOXYGEN_TARBALLS += $(HTML_APIDOC_INTERNALS_DIR).tar.gz
45 $(HTML_APIDOC_INTERNALS_DIR).tar.gz: $(HTML_APIDOC_INTERNALS_DIR).stamp
46         (cd $(DOXYGEN_OUTPUT_DIR) && $(AMTAR) chof - $(HTML_APIDOC_INTERNALS_DIR) | GZIP=--best gzip -c) > $@
47
48 DOXYGEN_INSTALL_TARGETS += install-apidocs-internals
49 install-apidocs-internals: $(HTML_APIDOC_INTERNALS_DIR).stamp
50         mkdir -p "$(DESTDIR)$(docdir)"
51         find "$(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_INTERNALS_DIR)" \
52                 \( -type d -exec chmod 0755 {} \; \) -or \
53                 \( -type f -exec chmod 0644 {} \; \)
54         (unset CDPATH; cd "$(DOXYGEN_OUTPUT_DIR)" && tar cpf - "$(HTML_APIDOC_INTERNALS_DIR)") \
55                 | (cd "$(DESTDIR)$(docdir)" && tar xpf -)
56
57 DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs-internals
58 uninstall-apidocs-internals:
59         rm -rf "$(DESTDIR)$(docdir)/$(HTML_APIDOC_INTERNALS_DIR)"
60
61 endif
62
63 DOXYGEN_INSTALL_TARGETS += install-apidocs
64 install-apidocs: $(HTML_APIDOC_DIR).stamp
65         mkdir -p "$(DESTDIR)$(docdir)"
66         find "$(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)" \
67                 \( -type d -exec chmod 0755 {} \; \) -or \
68                 \( -type f -exec chmod 0644 {} \; \)
69         (unset CDPATH; cd "$(DOXYGEN_OUTPUT_DIR)" && tar cpf - "$(HTML_APIDOC_DIR)") \
70                 | (cd "$(DESTDIR)$(docdir)" && tar xpf -)
71
72 DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs
73 uninstall-apidocs:
74         rm -rf "$(DESTDIR)$(docdir)/$(HTML_APIDOC_DIR)"
75
76 DOXYGEN_CLEAN_TARGETS += clean-apidocs
77 clean-apidocs:
78         rm -rf $(DOXYGEN_OUTPUT_DIR)
79         rm -f $(HTML_APIDOC_DIR).tar.gz $(HTML_APIDOC_INTERNALS_DIR).tar.gz
80
81 $(DOXYGEN_UPLOAD): $(DOXYGEN_STAMPS)
82         find $(DOXYGEN_OUTPUT_DIR) \( -type d -exec chmod a+rx,go-w,g+s {} \; \) \
83                 -or \( -type f -exec chmod a+r {} \; \)
84         rsync -avz --progress $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)/ sf:/home/users/h/hu/hun/libexif/htdocs/api/
85 if ENABLE_INTERNAL_DOCS
86         rsync -avz --progress $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_INTERNALS_DIR)/ sf:/home/users/h/hu/hun/libexif/htdocs/internals/
87 endif
88         ssh "sf" "find /home/groups/l/li/libexif/htdocs/internals /home/groups/l/li/libexif/htdocs/api \( -type d -exec chgrp libexif {} \; -exec chmod g+rwxs,a+rx {} \; \) -or \( -type f -exec chgrp libexif {} \; -exec chmod g+rw {} \; \( -name '*.html' -or -name '*.png' -or -name '*.php' -or -name '*.jpg' -or -name '*.css' -name '*.dot' -name '*.map' \) -exec chmod a+r {} \; \)"
89
90 endif # HAVE_DOXYGEN
91 endif # BUILD_DOCS
92
93
94 ########################################################################
95 # Common part
96 ########################################################################
97
98 EXTRA_DIST = Doxyfile.in Doxyfile-internals.in footer.html README.apidocs $(HTML_APIDOC_DIR).tar.gz
99
100 doc_DATA = $(DOXYGEN_FILES)
101
102 all-local: $(DOXYGEN_STAMPS)
103
104 install-data-local: $(DOXYGEN_INSTALL_TARGETS)
105
106 uninstall-local: $(DOXYGEN_UNINSTALL_TARGETS)
107
108 clean-local: $(DOXYGEN_CLEAN_TARGETS)
109
110 upload: $(DOXYGEN_UPLOAD)
111
112 CLEANFILES = $(DOXYGEN_FILES) $(DOXYGEN_STAMPS)
113