Make fig2dev optional?
Colin Davis
e1ven at e1ven.com
Tue Jul 8 14:08:47 CEST 2014
Sorry about that!
I went back to revise as you suggested, and ended up rewriting multiple time ;(
Building the docs on OSX are still more difficult than it should be, since the default apps Apple ships are very old.
After playing with it, it seems like it's probably best to just add a flag to skip building the documentation.
I'm not sure if something along this line could be added, but it'd make it simpler, rather than trying to patch xfig, makeinfo, etc.
https://gist.githubusercontent.com/e1ven/e971b3dd56452e15ac49/raw/598fdce8a14f1bafba5f462d12459b8079d7a1f9/disable-docs.patch
From b34dd80872f833a3955a2a4fcf322e3a93a963c7 Mon Sep 17 00:00:00 2001
From: Colin Davis <e1ven at e1ven.com>
Date: Tue, 8 Jul 2014 07:54:34 -0400
Subject: [PATCH] Allow the --disable-docs config option to bypass building
documentation
---
Makefile.am | 10 ++++++++--
configure.ac | 8 ++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 937bdaf..0f9a45e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,8 +25,14 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon \
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
GITLOG_TO_CHANGELOG=gitlog-to-changelog
-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
-SUBDIRS = compat mpi cipher random src doc tests
+DIST_SUBDIRS = m4 compat mpi cipher random src tests
+SUBDIRS = compat mpi cipher random src tests
+
+if BUILD_DOCS
+then
+DIST_SUBDIRS += doc
+SUBDIRS += doc
+endif
EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \
ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \
diff --git a/configure.ac b/configure.ac
index c5952c7..1a41460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -646,6 +646,14 @@ AC_ARG_ENABLE(amd64-as-feature-detection,
amd64_as_feature_detection=yes)
AC_MSG_RESULT($amd64_as_feature_detection)
+# Implementation of the --disable-docs switch.
+AC_MSG_CHECKING([whether to build documentation])
+AC_ARG_ENABLE(docs,
+ AC_HELP_STRING([--disable-docs],
+ [Disable the building of documentation]),
+ [:],enable_docs=yes)
+AC_MSG_RESULT($enable_docs)
+AM_CONDITIONAL([BUILD_DOCS], [test x"${enable_docs}" == xyes])
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
[A human readable text with the name of the OS])
--
2.0.1
On Jul 8, 2014, at 3:32 AM, Aki Tuomi <cmouse at cmouse.fi> wrote:
> Usually conditionals like these are named HAVE_FIG2DEV. Can you perhaps consider
> renaming your conditional?
>
> Kind regards,
> Aki Tuomi
More information about the Gcrypt-devel
mailing list