Commits

consus committed 88968e8

docs: Simplify *clean* rules, disable docs by default.

Comments (0)

Files changed (2)

 # ------------------------------------------------------------------------------
 # Documentation
 # ------------------------------------------------------------------------------
-DX_DOXYGEN_FEATURE(ON)
+DX_DOXYGEN_FEATURE(OFF)
 DX_DOT_FEATURE(OFF)
-DX_HTML_FEATURE(ON)
+DX_HTML_FEATURE(OFF)
 DX_CHM_FEATURE(OFF)
 DX_CHI_FEATURE(OFF)
 DX_MAN_FEATURE(OFF)
 
 DX_INIT_DOXYGEN([udev], [], [API])
 
+case $DX_FLAG_doc in
+    1) AC_SUBST(enable_doxygen, yes) ;;
+    0) AC_SUBST(enable_doxygen,  no) ;;
+esac
+
 # ------------------------------------------------------------------------------
 # Report
 # ------------------------------------------------------------------------------
         rule_generator:          ${enable_rule_generator}
         floppy:                  ${enable_floppy}
 
+        documentation:           ${enable_doxygen}
         man pages:               ${enable_manpages}
 ])
 # ------------------------------------------------------------------------------
 
 DX_FILES =
-DX_CLEAN = -r
 
 # --- HTML
 
 if DX_COND_html
 DX_FILES += html
-DX_CLEAN += @DX_DOCDIR@/html
 endif
 
 # --- CHM (and CHI)
 
 if DX_COND_chm
 DX_FILES += chm
-DX_CLEAN += @DX_DOCDIR@/chm
 if DX_COND_chi
 DX_FILES += @PACKAGE@.chi
-DX_CLEAN += @DX_DOCDIR@/@PACKAGE@.chi
 endif
 endif
 
 
 if DX_COND_man
 DX_FILES += man
-DX_CLEAN += @DX_DOCDIR@/man
 endif
 
 # --- RTF
 
 if DX_COND_rtf
 DX_FILES += rtf
-DX_CLEAN += @DX_DOCDIR@/rtf
 endif
 
 # --- XML
 
 if DX_COND_xml
 DX_FILES += xml
-DX_CLEAN += @DX_DOCDIR@/xml
 endif
 
 # --- PS
 
 if DX_COND_ps
 DX_FILES += @PACKAGE@.ps
-DX_CLEAN += @DX_DOCDIR@/@PACKAGE@.ps
 
 DX_PS_GOAL = doxygen-ps
 
 
 if DX_COND_pdf
 DX_FILES += @PACKAGE@.pdf
-DX_CLEAN += @DX_DOCDIR@/@PACKAGE@.pdf
 
 DX_PDF_GOAL = doxygen-pdf
 
 	mv refman.pdf ../@PACKAGE@.pdf
 endif
 
-# --- LATEX (for both PDF and PS)
-
-if DX_COND_latex
-DX_CLEAN += @DX_DOCDIR@/latex
-endif
-
 # ------------------------------------------------------------------------------
 # Targets
 # ------------------------------------------------------------------------------
 
-MOSTLYCLEANFILES = $(DX_CLEAN)
+DX_CLEAN = -r \
+	@DX_DOCDIR@/html \
+	@DX_DOCDIR@/chm \
+	@DX_DOCDIR@/@PACKAGE@.chi \
+	@DX_DOCDIR@/man \
+	@DX_DOCDIR@/rtf \
+	@DX_DOCDIR@/xml \
+	@DX_DOCDIR@/@PACKAGE@.ps \
+	@DX_DOCDIR@/@PACKAGE@.pdf \
+	@DX_DOCDIR@/latex
 
-doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
-doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+MOSTLYCLEANFILES = $(DX_CLEAN)
 
 @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
 	rm -rf $(DX_CLEAN)
 	$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
 
+doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
+doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
 all-local: doxygen-doc
 
 install-data-local: