Commit 60d1df15 authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

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.
parent b3ccc33d
......@@ -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>
......
......@@ -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 = {}
......
......@@ -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
......@@ -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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment