[jhbuild] config: add disable_Werror config option



commit 60d1df159609fbc0927a63312e593a2be960d7f4
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Feb 9 07:07:06 2015 -0500

    config: add disable_Werror config option
    
    Add a disable_Werror configuration option (default True) which causes
    --disable-Werror to be passed to each automake build.
    
    Support for this switch was recently added to AX_COMPILER_FLAGS as a way
    to unconditionally disable all fatal warnings.  By default, -Werror is
    enabled for builds done out of git (which is what jhbuild spends most of
    its time doing).
    
    The idea is to prevent -Werror from ruining the day for people who
    simply want to use jhbuild as a mechanism to build the latest version of
    GNOME, while allowing advanced users to re-enable the feature (and also
    maintaining -Werror for those who do manual git checkouts).
    
    In the case that the module doesn't know about this switch, it will be
    safely ignored.

 doc/C/index.docbook           |   16 ++++++++++++++++
 jhbuild/config.py             |    2 +-
 jhbuild/defaults.jhbuildrc    |    3 +++
 jhbuild/modtypes/autotools.py |    3 +++
 4 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/doc/C/index.docbook b/doc/C/index.docbook
index 5053654..816a6e6 100644
--- a/doc/C/index.docbook
+++ b/doc/C/index.docbook
@@ -1718,6 +1718,22 @@ Optional packages: (JHBuild will build the missing packages)
             </simpara>
           </listitem>
         </varlistentry>
+        <varlistentry id="cfg-disable-Werror">
+          <term>
+            <varname>disable_Werror</varname>
+          </term>
+          <listitem>
+            <simpara>
+              A boolean value (default <literal>True</literal>) which controls if
+              <literal>--disable-Werror</literal> will be passed to automake builds.  Many packages use this
+              flag as a way to disable fatal compiler warnings.  The value of <literal>True</literal> is
+              selected as a resonable default for those using jhbuild as a means to get an up-to-date 
version of
+              software packages without being side-tracked by build failures in other people's modules.
+              Settings this value to <literal>False</literal> may make sense for those using jhbuild as part 
of
+              a continuous integration or testing system.
+            </simpara>
+          </listitem>
+        </varlistentry>
         <varlistentry id="cfg-dvcs-mirror-dir">
           <term>
             <varname>dvcs_mirror_dir</varname>
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 613a9ce..23b6cde 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -65,7 +65,7 @@ _known_keys = [ 'moduleset', 'modules', 'skip', 'tags', 'prefix',
                 'print_command_pattern', 'static_analyzer',
                 'module_static_analyzer', 'static_analyzer_template',
                 'static_analyzer_outputdir', 'check_sysdeps', 'system_prefix',
-                'help_website', 'conditions', 'extra_prefixes'
+                'help_website', 'conditions', 'extra_prefixes', 'disable_Werror'
               ]
 
 env_prepends = {}
diff --git a/jhbuild/defaults.jhbuildrc b/jhbuild/defaults.jhbuildrc
index 2522b4d..70134b9 100644
--- a/jhbuild/defaults.jhbuildrc
+++ b/jhbuild/defaults.jhbuildrc
@@ -237,3 +237,6 @@ system_prefix = '/usr'
 # String may contain the variable %(module)s
 help_website = ('Gnome Live!',
                 'http://live.gnome.org/JhbuildIssues/%(module)s')
+
+# Whether '--disable-Werror' should be passed to automake modules
+disable_Werror = True
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index df40cfb..58b21ca 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -115,6 +115,9 @@ class AutogenModule(MakeModule, DownloadableModule):
         autogenargs = self.autogenargs + ' ' + self.config.module_autogenargs.get(
                 self.name, self.config.autogenargs)
 
+        if self.config.disable_Werror:
+            autogenargs = autogenargs + ' ' + '--disable-Werror'
+
         vars = {'prefix': os.path.splitdrive(buildscript.config.prefix)[1],
                 'autogen-sh': self.autogen_sh,
                 'autogenargs': autogenargs}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]