mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-21 18:45:49 +00:00
Rakefile: provide default_targets
target even if default target is overriden
This commit is contained in:
parent
70cfb3c012
commit
5ff981a942
26
Rakefile
26
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)
|
||||
|
Loading…
Reference in New Issue
Block a user