Class: SourceLib

Inherits:
Object
  • Object
show all
Defined in:
lib/rakepp/sourcelib.rb

Direct Known Subclasses

Exe, SharedLib

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compiler, base, name, sources, libs, includes, privateDefines = [], forceLib = false) ⇒ SourceLib

Returns a new instance of SourceLib.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rakepp/sourcelib.rb', line 4

def initialize(compiler, base, name, sources, libs, includes, privateDefines=[], forceLib=false)
  @name = name
  @sources = sources
  @libs = libs
  @includes = includes.collect do |i|
    if (i[0].chr == '/')
      i
    else
      File.join(base, i)
    end
  end
  @privateDefines = privateDefines
  @forceLib = forceLib
  compiler.add_tasks(self)
end

Instance Attribute Details

#forceLibObject (readonly)

Returns the value of attribute forceLib.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def forceLib
  @forceLib
end

#includesObject (readonly)

Returns the value of attribute includes.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def includes
  @includes
end

#libsObject (readonly)

Returns the value of attribute libs.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def libs
  @libs
end

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def name
  @name
end

#outFileObject

Returns the value of attribute outFile.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def outFile
  @outFile
end

#privateDefinesObject

Returns the value of attribute privateDefines.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def privateDefines
  @privateDefines
end

#sourcesObject (readonly)

Returns the value of attribute sources.



2
3
4
# File 'lib/rakepp/sourcelib.rb', line 2

def sources
  @sources
end

Instance Method Details

#tr_includesObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rakepp/sourcelib.rb', line 20

def tr_includes
  res = Array.new(@includes)
  LibHelper.tr_libs(libs).each do |lib|
    if !res.include?(lib) then
      lib.includes.each do |i|
        res << i unless res.include?(i)
      end
    end
  end
  return res
end