Class: Rake::Leaves::QmakeTask

Inherits:
TaskLib
  • Object
show all
Defined in:
lib/leaves/qt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from TaskLib

#upaste

Constructor Details

#initialize {|_self| ... } ⇒ QmakeTask

Returns a new instance of QmakeTask.

Yields:

  • (_self)

Yield Parameters:



14
15
16
17
18
19
# File 'lib/leaves/qt.rb', line 14

def initialize
  @makefile = "Makefile"
  
  yield self if block_given?
  define
end

Instance Attribute Details

#makefileObject

Returns the value of attribute makefile.



12
13
14
# File 'lib/leaves/qt.rb', line 12

def makefile
  @makefile
end

#specObject

Returns the value of attribute spec.



11
12
13
# File 'lib/leaves/qt.rb', line 11

def spec
  @spec
end

Instance Method Details

#defineObject



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/leaves/qt.rb', line 21

def define
  define_build
  task :compile => [:qmake]
  
  file_create @makefile do
    cmd = "qmake"
    cmd << " -spec #{@spec}" if @spec
    sh cmd
  end
  task :qmake => [@makefile]
  
  self
end