1######################################################################## 2# Conditional rules, depending on tool availability 3######################################################################## 4 5DOXYGEN_FILES = 6DOXYGEN_STAMPS = 7DOXYGEN_UPLOAD = 8 9DOXYGEN_INSTALL_TARGETS = 10DOXYGEN_UNINSTALL_TARGETS = 11 12DOXYGEN_CLEAN_TARGETS = 13 14DOXYGEN_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 22if BUILD_DOCS 23if HAVE_DOXYGEN 24 25DOXYGEN_UPLOAD += $(HTML_APIDOC_DIR).uploaded 26 27DOXYGEN_STAMPS += $(HTML_APIDOC_DIR).stamp 28$(HTML_APIDOC_DIR).stamp: Doxyfile $(top_builddir)/libexif/libexif.la 29 $(DOXYGEN) $< 30 echo > $@ 31 32DOXYGEN_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 36if ENABLE_INTERNAL_DOCS 37DOXYGEN_UPLOAD += $(HTML_APIDOC_INTERNALS_DIR).uploaded 38 39DOXYGEN_STAMPS += $(HTML_APIDOC_INTERNALS_DIR).stamp 40$(HTML_APIDOC_INTERNALS_DIR).stamp: Doxyfile-internals $(top_builddir)/libexif/libexif.la 41 $(DOXYGEN) $< 42 echo > $@ 43 44DOXYGEN_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 48DOXYGEN_INSTALL_TARGETS += install-apidocs-internals 49install-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 57DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs-internals 58uninstall-apidocs-internals: 59 rm -rf "$(DESTDIR)$(docdir)/$(HTML_APIDOC_INTERNALS_DIR)" 60 61endif 62 63DOXYGEN_INSTALL_TARGETS += install-apidocs 64install-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 72DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs 73uninstall-apidocs: 74 rm -rf "$(DESTDIR)$(docdir)/$(HTML_APIDOC_DIR)" 75 76DOXYGEN_CLEAN_TARGETS += clean-apidocs 77clean-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/ 85if ENABLE_INTERNAL_DOCS 86 rsync -avz --progress $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_INTERNALS_DIR)/ sf:/home/users/h/hu/hun/libexif/htdocs/internals/ 87endif 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 90endif # HAVE_DOXYGEN 91endif # BUILD_DOCS 92 93 94######################################################################## 95# Common part 96######################################################################## 97 98EXTRA_DIST = Doxyfile.in Doxyfile-internals.in footer.html README.apidocs $(HTML_APIDOC_DIR).tar.gz 99 100doc_DATA = $(DOXYGEN_FILES) 101 102all-local: $(DOXYGEN_STAMPS) 103 104install-data-local: $(DOXYGEN_INSTALL_TARGETS) 105 106uninstall-local: $(DOXYGEN_UNINSTALL_TARGETS) 107 108clean-local: $(DOXYGEN_CLEAN_TARGETS) 109 110upload: $(DOXYGEN_UPLOAD) 111 112CLEANFILES = $(DOXYGEN_FILES) $(DOXYGEN_STAMPS) 113 114