Browse Source

build: Add an configure option to choose the kind of documentation

The option --disable-devel-docs can be used to override the current
default, which is to build development documentation.
Guillem Jover 8 years ago
parent
commit
f3af91bcb3
4 changed files with 24 additions and 3 deletions
  1. 2 0
      configure.ac
  2. 2 0
      debian/changelog
  3. 3 3
      doc/Doxyfile.in
  4. 17 0
      m4/dpkg-build.m4

+ 2 - 0
configure.ac

@@ -32,6 +32,8 @@ DPKG_BUILD_PROG([dselect])
 DPKG_BUILD_PROG([start-stop-daemon])
 DPKG_BUILD_PROG([update-alternatives])
 
+DPKG_BUILD_DEVEL_DOCS
+
 # Allow alternate directories
 DPKG_WITH_DIR([devlibdir], [${libdir}],
               [dpkg development library directory [LIBDIR]])

+ 2 - 0
debian/changelog

@@ -19,6 +19,8 @@ dpkg (1.18.4) UNRELEASED; urgency=low
       Reported by Jérémy Bobbio <lunar@debian.org>. Closes: #801329
     - Use absolute buildir pathnames in PATH variable for the test suite.
     - Descend into scripts directory when cleaning up code coverage files.
+    - Add new configure option --disable-devel-docs to select the kind of docs
+      to generate, default for now is development documentation.
   * Documentation:
     - Move description for “target architecture” from the dpkg-architecture(1)
       ‘-A’ option to the TERMS section. Closes: #799046

+ 3 - 3
doc/Doxyfile.in

@@ -409,7 +409,7 @@ LOOKUP_CACHE_SIZE      = 0
 # normally produced when WARNINGS is set to YES.
 # The default value is: NO.
 
-EXTRACT_ALL            = YES
+EXTRACT_ALL            = @BUILD_DEVEL_DOCS@
 
 # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
 # be included in the documentation.
@@ -931,13 +931,13 @@ STRIP_CODE_COMMENTS    = YES
 # function all documented functions referencing it will be listed.
 # The default value is: NO.
 
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = @BUILD_DEVEL_DOCS@
 
 # If the REFERENCES_RELATION tag is set to YES then for each documented function
 # all documented entities called/used by that function will be listed.
 # The default value is: NO.
 
-REFERENCES_RELATION    = YES
+REFERENCES_RELATION    = @BUILD_DEVEL_DOCS@
 
 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
 # to YES then the hyperlinks from functions in REFERENCES_RELATION and

+ 17 - 0
m4/dpkg-build.m4

@@ -29,6 +29,23 @@ AC_DEFUN([DPKG_BUILD_PROG], [
   AC_MSG_RESULT([$build_]AS_TR_SH([$1]))
 ])# DPKG_BUILD_PROG
 
+# DPKG_BUILD_DEVEL_DOCS()
+# ---------------------
+# Select what type of documentation to build. Either for development including
+# all symbol references, and extracting everything, or production documentation.
+AC_DEFUN([DPKG_BUILD_DEVEL_DOCS], [
+  AC_ARG_ENABLE([devel-docs],
+    AS_HELP_STRING([--disable-devel-docs], [build release docs]),
+    [build_devel_docs=$enable_devel_docs],
+    [build_devel_docs=yes]
+  )
+  AS_IF([test "x$build_devel_docs" = "xyes"], [
+    AC_DEFINE([BUILD_DEVEL_DOCS], [YES], [Define to YES if building devel docs.])
+  ], [
+    AC_DEFINE([BUILD_DEVEL_DOCS], [NO])
+  ])
+])# DPKG_BUILD_DOCS_MODE
+
 # DPKG_WITH_DIR(DIR, DEFAULT, DESCRIPTION)
 # -------------
 # Allow specifying alternate directories.