mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-22 02:48:20 +00:00
Rakefile: provide default_targets
target even if default target is overriden
This commit is contained in:
parent
70cfb3c012
commit
5ff981a942
20
Rakefile
20
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,12 +300,21 @@ def define_default_task
|
||||
|
||||
targets += $benchmark_programs
|
||||
|
||||
task :default => targets do
|
||||
task :default_targets => targets
|
||||
|
||||
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)
|
||||
return if !Rake.application.top_level_tasks.empty? && (Rake.application.top_level_tasks != ["default"])
|
||||
|
Loading…
Reference in New Issue
Block a user