build-process: pass '--enable-documentation' to ONLY build the documentation.
authorng0 <ng0@infotropique.org>
Sat, 30 Sep 2017 10:38:49 +0000 (10:38 +0000)
committerng0 <ng0@infotropique.org>
Sat, 30 Sep 2017 10:38:49 +0000 (10:38 +0000)
This obviously defaults to NO.
Furthermore add DISTCLEANFILES to 'doc/Makefile.am'.

Adjust contrib/packages/guix/gnunet-doc.scm to it.

Makefile.am
configure.ac
contrib/packages/guix/gnunet-doc.scm
doc/Makefile.am
doc/README.txt

index 567e7b5ff0c24e3dae97631d06ec897983e4e629..0466fcc10b0bb650d70cbb639916c4d03527f718 100644 (file)
@@ -1,6 +1,11 @@
 # This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include
-SUBDIRS  = doc m4 src po pkgconfig
+
+if DOC_ONLY
+  SUBDIRS = doc m4 po pkgconfig
+else
+  SUBDIRS  = doc m4 src po pkgconfig
+endif
 
 if !TALER_ONLY
   SUBDIRS += contrib
index 101fc77cb32b46eebf68e78cbc801b8a809072da..9d1fb9ab35989fb427058f21f992c3b44b0c3947 100644 (file)
@@ -565,6 +565,23 @@ AC_CHECK_LIB([kvm],[kvm_open])
 AC_CHECK_LIB([kstat],[kstat_open])
 
 
+# should the build process be restricted to only building
+# the documentation?
+AC_MSG_CHECKING(whether to build documentation ONLY)
+AC_ARG_ENABLE([documentation],
+   [AS_HELP_STRING([--enable-documentation], [only build the documentation])],
+   [doc_only=${enableval}],
+   [doc_only=no])
+AC_MSG_RESULT($doc_only)
+if test "x$doc_only" = "xyes"
+then
+  AM_CONDITIONAL([DOC_ONLY],true)
+  AC_DEFINE([DOC_ONLY],[1],[Building the documentation])
+else
+  AM_CONDITIONAL([DOC_ONLY],false)
+  AC_DEFINE([DOC_ONLY],[0],[Canonical compilation])
+fi
+
 # should the build process be restricted to the code required
 # for GNU Taler wallets?
 AC_MSG_CHECKING(whether to compile GNU Taler Wallet library ONLY)
index a988e1125a4ee33b95571dc64b5c6050e026dcbb..9974c1b516aaa91fda239af84be7b80d7a83e1b2 100644 (file)
          ("texinfo-5" ,texinfo-5) ; Debian stable
          ("libtool" ,libtool)))
       (arguments
-       `(#:tests? #f ;Don't run tests
+       `(#:configure-flags
+         (list "--enable-documentation")
+         #:tests? #f ;Don't run tests
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'autoconf
index 0fadf1a37997021301fbcd2baeff936b4c98426a..1a8bb64b9f0b02cfc7f9fbdcfdddefa5eb516375 100644 (file)
@@ -104,34 +104,40 @@ gnunet_tutorial_examples =                                        \
        025.c                                                   \
        026.c
 
-info_TEXINFOS = \
-       gnunet.texi \
+info_TEXINFOS =                                                \
+       gnunet.texi                                             \
        gnunet-c-tutorial.texi
 
-# It seems as if either we still have gnunet-c-tutorial markup issues
-# or we have issues that can only occur in systems which are not using Guix
-# or we have version incompabilities.
-#      gnunet-c-tutorial.texi
-
-gnunet_TEXINFOS = \
-       chapters/developer.texi \
-       chapters/installation.texi \
-       chapters/philosophy.texi \
-       chapters/user.texi \
-       fdl-1.3.texi \
+gnunet_TEXINFOS =                                              \
+       chapters/developer.texi                                 \
+       chapters/installation.texi                              \
+       chapters/philosophy.texi                                \
+       chapters/user.texi                                      \
+       fdl-1.3.texi                                            \
        gpl-3.0.texi
 
-EXTRA_DIST =                                                                   \
-       $(gnunet_TEXINFOS)                                                      \
-       outdated-and-old-installation-instructions.txt                          \
-       gnunet-c-tutorial-v1.pdf                                                \
-       $(gnunet_tutorial_examples)                                             \
+EXTRA_DIST =                                                   \
+       $(gnunet_TEXINFOS)                                      \
+       outdated-and-old-installation-instructions.txt          \
+       gnunet-c-tutorial-v1.pdf                                \
+       $(gnunet_tutorial_examples)                             \
        README.txt
 
 
 #      $(DOT_FILES)                                                            \
 #      $(DOT_VECTOR_GRAPHICS)
 
+DISTCLEANFILES =                                               \
+       gnunet.cps                                              \
+       gnunet-c-tutorial.cps                                   \
+       chapters/developer.cps                                  \
+       chapters/installation.cps                               \
+       chapter/philosophy.cps                                  \
+       chapters/user.cps                                       \
+       fdl-1.3.cps                                             \
+       gpl-3.0.cps
+
+# if HAVE_EXTENDED_DOCUMENTATION_BUILDING
 daemon_lego_block.png: images/daemon_lego_block.svg
        convert images/daemon_lego_block.svg images/daemon_lego_block.png &&
        pngcrush images/daemon_lego_block.png images/daemon_lego_block.png
@@ -217,3 +223,10 @@ doc-all-install: doc-all-give-me-the-noise
 #      $(wildcard *.cps)
 
 .PHONY: version.texi
+# if HAVE_EXTENDED_DOCUMENTATION_BUILDING_PDF
+
+# if HAVE_EXTENDED_DOCUMENTATION_BUILDING_HTML
+
+# endif
+# endif
+# endif
index 2abe479dd74c90c7de6e7befb060303e5c37472f..fbbc2442442f1a5d2f05fa693994f3bec8a124a0 100644 (file)
@@ -14,7 +14,7 @@ guix environment gnunet-doc
 
 You need to have Texinfo and Texlive in your path.
 sh bootstrap
-./configure
+./configure --enable-documentation
 cd doc
 make doc-all-give-me-the-noise