Skip to content

Commit

Permalink
added a rake task werror, to check the warnings with -Werror set.
Browse files Browse the repository at this point in the history
  • Loading branch information
flaneur2020 committed Apr 5, 2012
1 parent e7c35fe commit d2b6e3d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
werror = '-Werror' if ENV['werror']

cinc = '-Isrc/inc -Isrc/inc/usr'
cflag = %{
-Wall #{werror}
-Wall
-nostdinc -fno-builtin -fno-stack-protector
-finline-functions -finline-small-functions -findirect-inlining -finline-functions -finline-functions-called-once
}.split(/\s/).join(' ')
Expand Down Expand Up @@ -35,6 +33,12 @@ task :clean do
sh "rm -rf bin/* root/bin/* src/kern/entry.S .bochsout"
end

task :werror do
cflag += ' -Werror'
Rake::Task['clean'].invoke
Rake::Task['build'].invoke
end

## helpers ##
task :todo do
sh "grep -r -n '\\(TODO\\|\\<bug\\>\\)' ./src --color"
Expand Down

0 comments on commit d2b6e3d

Please sign in to comment.