diff --git a/Rakefile b/Rakefile index 5b82ba158..422e101fc 100644 --- a/Rakefile +++ b/Rakefile @@ -264,15 +264,6 @@ def generate_helper_files end def define_default_task - if !c(:DEFAULT_TARGET).empty? - desc "Build target '#{c(:DEFAULT_TARGET)}' by default" - task :default => c(:DEFAULT_TARGET) - - return - end - - desc "Build everything" - # The applications themselves targets = $applications.clone targets += $tools.map { |name| "src/tools/#{$application_subdirs[name]}#{name}" + c(:EXEEXT) } @@ -309,11 +300,20 @@ def define_default_task targets += $benchmark_programs - task :default => targets do - build_duration = Time.now - $build_start - build_duration = sprintf("%02d:%02d.%03d", (build_duration / 60).to_i, build_duration.to_i % 60, (build_duration * 1000).to_i % 1000) + task :default_targets => targets - puts "Done after #{build_duration}. Enjoy :)" + if !c(:DEFAULT_TARGET).empty? + desc "Build target '#{c(:DEFAULT_TARGET)}' by default" + task :default => c(:DEFAULT_TARGET) + + else + desc "Build everything" + task :default => :default_targets do + build_duration = Time.now - $build_start + build_duration = sprintf("%02d:%02d.%03d", (build_duration / 60).to_i, build_duration.to_i % 60, (build_duration * 1000).to_i % 1000) + + puts "Done after #{build_duration}. Enjoy :)" + end end return if %r{drake(?:\.exe)?$}i.match($PROGRAM_NAME)