waf: Add '--no-manpages' option
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 18 Jun 2010 10:46:27 +0000 (13:46 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Fri, 18 Jun 2010 10:46:27 +0000 (13:46 +0300)
It is very annoying for me to wait 20 minutes anytime
I need to make a clean build

buildtools/wafsamba/wafsamba.py
buildtools/wafsamba/wscript

index eb2d56e2dba3bc977de911f9575ade1ee3d54f40..592524c7679362295eec2090e9836cf18ed45c7d 100644 (file)
@@ -868,6 +868,12 @@ Build.BuildContext.PKG_CONFIG_FILES = PKG_CONFIG_FILES
 
 def MANPAGES(bld, manpages):
     '''build and install manual pages'''
+    # check if we are to skip man pages generation
+    if 'NO_MANPAGES' in bld.env and bld.env['NO_MANPAGES']:
+        if not 'NO_MANPAGES_WARNED' in bld.env:
+            bld.env['NO_MANPAGES_WARNED'] = True
+            Logs.warn('Skipping man pages generation')
+        return
     bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
     for m in manpages.split():
         source = m + '.xml'
index bad65cac245e2a92f3bcb623c5e821a7e94bb65d..9df9395346225f402989fb8e3eb13e2c2015af40 100644 (file)
@@ -100,6 +100,10 @@ def set_options(opt):
                   help=("Update ABI signature files for libraries"),
                   action='store_true', dest='ABI_UPDATE', default=False)
 
+    gr.add_option('--no-manpages',
+                  help=("Don't generate man pages. Convenient in developer builds."),
+                  action='store_true', dest='NO_MANPAGES', default=False)
+
     gr = opt.add_option_group('cross compilation options')
 
     gr.add_option('--cross-compile',
@@ -204,6 +208,9 @@ def configure(conf):
     except:
         conf.env.ABI_CHECK = False
 
+    # disables making of manpages
+    conf.env.NO_MANPAGES = Options.options.NO_MANPAGES
+
     conf.CHECK_COMMAND(['uname', '-a'],
                        msg='Checking build system',
                        define='BUILD_SYSTEM',