robuster doxygen targets
authorHans Ulrich Niedermann <hun@n-dimensional.de>
Mon, 21 May 2007 18:50:45 +0000 (20:50 +0200)
committerHans Ulrich Niedermann <hun@n-dimensional.de>
Mon, 21 May 2007 18:50:45 +0000 (20:50 +0200)
doc/Makefile.am

index c36ebe5..35c4fdd 100644 (file)
@@ -6,6 +6,11 @@ DOXYGEN_FILES =
 DOXYGEN_STAMPS =
 DOXYGEN_UPLOAD =
 
+DOXYGEN_INSTALL_TARGETS =
+DOXYGEN_UNINSTALL_TARGETS =
+
+DOXYGEN_CLEAN_TARGETS =
+
 if HAVE_DOXYGEN
 
 DOXYGEN_STAMPS += $(HTML_APIDOC_DIR).stamp
@@ -44,22 +49,31 @@ $(HTML_APIDOC_INTERNALS_DIR).tar.gz: $(DOXYGEN_OUTPUT_DIR).stamp
 DOC_APIDOC_HTML = api.html
 DOC_APIDOC_INTERNALS_HTML = internals.html
 
+if ENABLE_INTERNAL_DOCS
+DOXYGEN_INSTALL_TARGETS += install-apidocs-internals
 install-apidocs-internals: $(HTML_APIDOC_INTERNALS_DIR).stamp
        $(INSTALL) -m 0755 -d $(DESTDIR)$(docdir)/$(DOC_APIDOC_INTERNALS_HTML)
        $(INSTALL) -m 0644 $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_INTERNALS_DIR)/* $(DESTDIR)$(docdir)/$(DOC_APIDOC_INTERNALS_HTML)/
+endif
 
+DOXYGEN_INSTALL_TARGETS += install-apidocs
 install-apidocs: $(HTML_APIDOC_DIR).stamp
        $(INSTALL) -m 0755 -d $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)
        $(INSTALL) -m 0644 $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)/* $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)/
 
+if ENABLE_INTERNAL_DOCS
+DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs-internals
 uninstall-apidocs-internals:
        cd $(DESTDIR)$(docdir) && rm -f $(DOC_APIDOC_INTERNALS_HTML)/*
        rmdir $(DESTDIR)$(docdir)/$(DOC_APIDOC_INTERNALS_HTML)
+endif
 
+DOXYGEN_UNINSTALL_TARGETS += uninstall-apidocs
 uninstall-apidocs:
        cd $(DESTDIR)$(docdir) && rm -f $(DOC_APIDOC_HTML)/*
        rmdir $(DESTDIR)$(docdir)/$(DOC_APIDOC_HTML)
 
+DOXYGEN_CLEAN_TARGETS += clean-apidocs
 clean-apidocs:
        rm -rf $(DOXYGEN_OUTPUT_DIR)
        rm -f $(HTML_APIDOC_DIR).tar.gz
@@ -68,18 +82,11 @@ $(DOXYGEN_UPLOAD): $(DOXYGEN_STAMPS)
        find $(DOXYGEN_OUTPUT_DIR) \( -type d -exec chmod a+rx,go-w,g+s {} \; \) \
                -or \( -type f -exec chmod a+r {} \; \)
        rsync -avz --progress $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_DIR)/ sf:/home/users/h/hu/hun/libexif/htdocs/api/
+if ENABLE_INTERNAL_DOCS
        rsync -avz --progress $(DOXYGEN_OUTPUT_DIR)/$(HTML_APIDOC_INTERNALS_DIR)/ sf:/home/users/h/hu/hun/libexif/htdocs/internals/
+endif
        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 {} \; \)"
 
-else
-
-# Dummy targets for non-doxygen case
-install-apidocs:
-install-apidocs-internals:
-uninstall-apidocs:
-uninstall-apidocs-internals:
-clean-apidocs:
-
 endif
 
 
@@ -93,11 +100,11 @@ doc_DATA = $(DOXYGEN_FILES) README.apidocs
 
 all-local: $(DOXYGEN_STAMPS)
 
-install-data-local: install-apidocs install-apidocs-internals
+install-data-local: $(DOXYGEN_INSTALL_TARGETS)
 
-uninstall-local: uninstall-apidocs uninstall-apidocs-internals
+uninstall-local: $(DOXYGEN_UNINSTALL_TARGETS)
 
-clean-local: clean-apidocs
+clean-local: $(DOXYGEN_CLEAN_TARGETS)
 
 upload: $(DOXYGEN_UPLOAD)