diff options
author | Tuncer Ayaz <[email protected]> | 2011-08-01 20:50:22 +0200 |
---|---|---|
committer | Tuncer Ayaz <[email protected]> | 2011-09-08 14:02:16 +0200 |
commit | 8aebe008eba3152b37858822df4fdb4f0b51e0b9 (patch) | |
tree | 0f8852b61677f6b39dc4c9bc8f0748a728aa4710 /lib/parsetools/src | |
parent | 3d28c22f0c05955216b743148cfd4c656e4c1e4a (diff) | |
download | otp-8aebe008eba3152b37858822df4fdb4f0b51e0b9.tar.gz otp-8aebe008eba3152b37858822df4fdb4f0b51e0b9.tar.bz2 otp-8aebe008eba3152b37858822df4fdb4f0b51e0b9.zip |
leex: honour -Werror passed from erlc
Diffstat (limited to 'lib/parsetools/src')
-rw-r--r-- | lib/parsetools/src/leex.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/parsetools/src/leex.erl b/lib/parsetools/src/leex.erl index 942e9928b1..e3e10eb204 100644 --- a/lib/parsetools/src/leex.erl +++ b/lib/parsetools/src/leex.erl @@ -73,12 +73,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 = assure_extension(shorten_filename(Input0), ".xrl"), Output = assure_extension(shorten_filename(Output0), ".erl"), Includefile = lists:sublist(Includes, 1), + Werr = proplists:get_bool(warnings_as_errors, Specific), Opts = [{scannerfile,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, _} -> ok; |