From 48de2c2182e703c07d67471db3e2f154cc5df99e Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Mon, 1 Aug 2011 21:04:49 +0200 Subject: yecc: honour -Werror passed from erlc --- lib/parsetools/src/yecc.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/parsetools/src') 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; -- cgit v1.2.3