class Daedalus::Blueprint

Public Class Methods

new() click to toggle source
    # File lib/daedalus.rb
990 def initialize
991   @programs = []
992   @compiler = nil
993 end

Public Instance Methods

build(targets=[], jobs=nil) click to toggle source
     # File lib/daedalus.rb
1035 def build(targets=[], jobs=nil)
1036   if !targets.empty?
1037     @programs.each do |x|
1038       if targets.include? x.path
1039         tasks = Tasks.new
1040         x.consider @compiler, tasks
1041 
1042         if tasks.empty?
1043           @compiler.log.info "Nothing to do for #{x.path}"
1044         else
1045           tr = TaskRunner.new @compiler, tasks, jobs
1046           tr.start
1047         end
1048       end
1049     end
1050   else
1051     @programs.each { |x| x.build @compiler }
1052   end
1053 end
clean(targets=[]) click to toggle source
     # File lib/daedalus.rb
1055 def clean(targets=[])
1056   if !targets.empty?
1057     @programs.each do |x|
1058       if targets.include? x.path
1059         x.clean
1060       end
1061     end
1062   else
1063     @programs.each { |x| x.clean }
1064   end
1065 end
describe(targets=[]) click to toggle source
     # File lib/daedalus.rb
1067 def describe(targets=[])
1068   if !targets.empty?
1069     @programs.each do |x|
1070       if targets.include? x.path
1071         x.describe @compiler
1072       end
1073     end
1074   else
1075     @programs.each { |x| x.describe @compiler }
1076   end
1077 end
external_lib(path) { |ex| ... } click to toggle source
    # File lib/daedalus.rb
995 def external_lib(path)
996   ex = ExternalLibrary.new(path)
997   yield ex
998   ex
999 end
file_info(files) click to toggle source
     # File lib/daedalus.rb
1079 def file_info(files)
1080   @programs.each do |x|
1081     x.file_info @compiler, files
1082   end
1083 end
gcc!(cc, cxx, ldshared, ldsharedxx) click to toggle source
     # File lib/daedalus.rb
1005 def gcc!(cc, cxx, ldshared, ldsharedxx)
1006   @compiler = Compiler.new(cc,
1007                            cxx,
1008                            ldshared,
1009                            ldsharedxx,
1010                            Logger.new, self)
1011 end
library_group(path, &block) click to toggle source
     # File lib/daedalus.rb
1001 def library_group(path, &block)
1002   LibraryGroup.new(path, @compiler, &block)
1003 end
program(name, *files) click to toggle source
     # File lib/daedalus.rb
1031 def program(name, *files)
1032   @programs << Program.new(name, files)
1033 end
source_file(file) { |sf| ... } click to toggle source
     # File lib/daedalus.rb
1025 def source_file(file)
1026   sf = SourceFile.new(file)
1027   yield sf if block_given?
1028   sf
1029 end
source_files(*patterns) click to toggle source
     # File lib/daedalus.rb
1013 def source_files(*patterns)
1014   files = []
1015 
1016   patterns.each do |t|
1017     Dir[t].each do |f|
1018       files << SourceFile.new(f)
1019     end
1020   end
1021 
1022   files
1023 end