From 90a2295c1004f57668b491908d304a986cc87d52 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sat, 30 Sep 2017 10:38:49 +0000 Subject: [PATCH] build-process: pass '--enable-documentation' to ONLY build the documentation. This obviously defaults to NO. Furthermore add DISTCLEANFILES to 'doc/Makefile.am'. Adjust contrib/packages/guix/gnunet-doc.scm to it. --- Makefile.am | 7 +++- configure.ac | 17 ++++++++++ contrib/packages/guix/gnunet-doc.scm | 4 ++- doc/Makefile.am | 49 ++++++++++++++++++---------- doc/README.txt | 2 +- 5 files changed, 58 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 567e7b5ff..0466fcc10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 101fc77cb..9d1fb9ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/contrib/packages/guix/gnunet-doc.scm b/contrib/packages/guix/gnunet-doc.scm index a988e1125..9974c1b51 100644 --- a/contrib/packages/guix/gnunet-doc.scm +++ b/contrib/packages/guix/gnunet-doc.scm @@ -128,7 +128,9 @@ ("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 diff --git a/doc/Makefile.am b/doc/Makefile.am index 0fadf1a37..1a8bb64b9 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 diff --git a/doc/README.txt b/doc/README.txt index 2abe479dd..fbbc24424 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -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 -- 2.25.1