Permalink
Browse files

Nicer clean target for the Rakefile

  • Loading branch information...
1 parent ee49059 commit d9e908a36509d50cc65b6064fb0a1c4edf32d417 @pneff committed May 26, 2008
Showing with 8 additions and 5 deletions.
  1. +8 −5 Rakefile
View
@@ -1,3 +1,11 @@
+require 'rake/clean'
+# Cleanup
+CLEAN.include('**/*.pyc')
+CLEAN.include('parser/servicegenLexer.py')
+CLEAN.include('parser/servicegenParser.py')
+CLEAN.include('parser/servicegen.tokens')
+CLEAN.include('parser/servicegen__.g')
+
task :default => 'test'
task :test => 'parser/servicegenLexer.py' do
@@ -8,8 +16,3 @@ file 'parser/servicegenLexer.py' => 'parser/servicegen.g' do |t|
sh "java org.antlr.Tool parser/servicegen.g"
end
-task :clean do
- generated = ['parser/servicegenLexer.py', 'parser/servicegen.tokens',
- 'parser/servicegen__.g', 'parser/servicegenParser.py']
- rm_f generated
-end

0 comments on commit d9e908a

Please sign in to comment.