aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-28 21:02:41 -0500
committerJack Lloyd <[email protected]>2017-11-29 06:59:19 -0500
commit77beb29372dfc301041e257a2290e7f69a2bf723 (patch)
treee0211b78ec9a90aece4bfacca1c5c8c8f095f3cd /configure.py
parenta2ae90739a43c7afaf72c15efc0f5843698b73d1 (diff)
Add flags to disable building/installing documentation
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.py b/configure.py
index 4040f895c..03f935e35 100755
--- a/configure.py
+++ b/configure.py
@@ -268,6 +268,10 @@ PKG_CONFIG_FILENAME = 'botan-%d.pc' % (Version.major())
def make_build_doc_commands(source_paths, build_paths, options):
+
+ if options.with_documentation == False:
+ return ""
+
def build_manual_command(src_dir, dst_dir):
if options.with_sphinx:
sphinx = 'sphinx-build -c $(SPHINX_CONFIG) $(SPHINX_OPTS) '
@@ -448,6 +452,13 @@ def process_command_line(args): # pylint: disable=too-many-locals
build_group.add_option('--without-doxygen', action='store_false',
dest='with_doxygen', help=optparse.SUPPRESS_HELP)
+ build_group.add_option('--with-documentation', action='store_true',
+ help=optparse.SUPPRESS_HELP)
+
+ build_group.add_option('--without-documentation', action='store_false',
+ default=True, dest='with_documentation',
+ help='Skip building/installing documentation')
+
build_group.add_option('--maintainer-mode', dest='maintainer_mode',
action='store_true', default=False,
help="Enable extra warnings")
@@ -1987,6 +1998,7 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch,
'libdir': options.libdir or osinfo.lib_dir,
'includedir': options.includedir or osinfo.header_dir,
'docdir': options.docdir or osinfo.doc_dir,
+ 'with_documentation': options.with_documentation,
'out_dir': options.with_build_dir or os.path.curdir,
'build_dir': build_config.build_dir,
@@ -2952,7 +2964,7 @@ def set_defaults_for_unset_options(options, info_arch, info_cc): # pylint: disab
logging.info('Guessing target processor is a %s/%s (use --cpu to set)' % (
options.arch, options.cpu))
- if options.with_sphinx is None:
+ if options.with_sphinx is None and options.with_documentation == True:
if have_program('sphinx-build'):
logging.info('Found sphinx-build (use --without-sphinx to disable)')
options.with_sphinx = True
@@ -3031,6 +3043,12 @@ def validate_options(options, info_os, info_cc, available_module_policies):
if options.build_fuzzers == 'klee' and options.os != 'llvm':
raise UserError('Building for KLEE requires targetting LLVM')
+ if options.with_documentation == False:
+ if options.with_doxygen:
+ raise UserError('Using --with-doxygen plus --without-documentation makes no sense')
+ if options.with_sphinx:
+ raise UserError('Using --with-sphinx plus --without-documentation makes no sense')
+
# Warnings
if options.os == 'windows' and options.compiler == 'gcc':
logging.warning('Detected GCC on Windows; use --os=cygwin or --os=mingw?')