[gnutls-devel] [PATCH 1/2] build: always install man(1)

Alon Bar-Lev alon.barlev at gmail.com
Fri Dec 18 11:14:08 CET 2015


currently these man pages are installed only if --enable-doc
is provided, while these are not actually docs, do not require any
special dependency, nor consume large space.

add --disable-manpages to enable/disable manpages installation, install
the man(1) regardless of --enable-doc.

Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
 .gitignore               | 1 +
 Makefile.am              | 4 ++++
 configure.ac             | 5 +++++
 doc/Makefile.am          | 2 +-
 doc/manpages/Makefile.am | 2 ++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 2c84b0e..b50a6fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -135,6 +135,7 @@ doc/manpages/ocsptool.1
 doc/manpages/p11tool.1
 doc/manpages/psktool.1
 doc/manpages/srptool.1
+doc/manpages/tpmtool.1
 doc/ocsp-api.texi
 doc/pgp-api.texi
 doc/pkcs11-api.texi
diff --git a/Makefile.am b/Makefile.am
index d61fded..f39916f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,10 @@ if HAVE_GUILE
 SUBDIRS += guile
 endif
 
+if ENABLE_MANPAGES
+SUBDIRS += doc/manpages
+endif
+
 if ENABLE_DOC
 SUBDIRS += doc
 endif
diff --git a/configure.ac b/configure.ac
index efacc30..4c928ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,11 @@ AM_PROG_CC_C_O
 AC_PROG_YACC
 AC_PROG_SED
 
+AC_ARG_ENABLE(manpages,
+  AS_HELP_STRING([--disable-manpages], [don't install manpages]),
+    enable_manpages=$enableval, enable_manpages=yes)
+AM_CONDITIONAL(ENABLE_MANPAGES, test "$enable_manpages" != "no")
+
 AC_ARG_ENABLE(doc,
   AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
     enable_doc=$enableval, enable_doc=yes)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index da2aecc..d81d220 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -24,7 +24,7 @@ EXTRA_DIST = TODO certtool.cfg gnutls.pdf gnutls.html	\
 	gnutls-guile.pdf gnutls-guile.html stamp_enums stamp_functions \
 	doc.mk
 
-SUBDIRS = examples cyclo scripts manpages credentials latex
+SUBDIRS = examples cyclo scripts credentials latex
 if ENABLE_GTK_DOC
 SUBDIRS += reference
 endif
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index db1f71b..3299269 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -1116,7 +1116,9 @@ APIMANS += gnutls_x509_trust_list_verify_crt.3
 APIMANS += gnutls_x509_trust_list_verify_crt2.3
 APIMANS += gnutls_x509_trust_list_verify_named_crt.3
 
+if ENABLE_DOC
 dist_man_MANS += $(APIMANS)
+endif
 
 $(APIMANS): stamp_mans
 
-- 
2.4.10




More information about the Gnutls-devel mailing list