aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/src/yecc.erl
diff options
context:
space:
mode:
authorTuncer Ayaz <[email protected]>2011-08-01 21:04:49 +0200
committerTuncer Ayaz <[email protected]>2011-09-08 14:02:16 +0200
commit48de2c2182e703c07d67471db3e2f154cc5df99e (patch)
treeeb033ef7c2ae5e8ebd6933c65a303db481afb921 /lib/parsetools/src/yecc.erl
parent8aebe008eba3152b37858822df4fdb4f0b51e0b9 (diff)
downloadotp-48de2c2182e703c07d67471db3e2f154cc5df99e.tar.gz
otp-48de2c2182e703c07d67471db3e2f154cc5df99e.tar.bz2
otp-48de2c2182e703c07d67471db3e2f154cc5df99e.zip
yecc: honour -Werror passed from erlc
Diffstat (limited to 'lib/parsetools/src/yecc.erl')
-rw-r--r--lib/parsetools/src/yecc.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl
index 72cff3af92..d714420680 100644
--- a/lib/parsetools/src/yecc.erl
+++ b/lib/parsetools/src/yecc.erl
@@ -133,12 +133,15 @@
%%% Interface to erl_compile.
compile(Input0, Output0,
- #options{warning = WarnLevel, verbose=Verbose, includes=Includes}) ->
+ #options{warning = WarnLevel, verbose=Verbose, includes=Includes,
+ specific=Specific}) ->
Input = shorten_filename(Input0),
Output = shorten_filename(Output0),
Includefile = lists:sublist(Includes, 1),
+ Werr = proplists:get_bool(warnings_as_errors, Specific),
Opts = [{parserfile,Output}, {includefile,Includefile}, {verbose,Verbose},
- {report_errors, true}, {report_warnings, WarnLevel > 0}],
+ {report_errors, true}, {report_warnings, WarnLevel > 0},
+ {warnings_as_errors, Werr}],
case file(Input, Opts) of
{ok, _OutFile} ->
ok;