Class: Rake::Leaves::NmakeTask
Instance Attribute Summary collapse
-
#macrodefs ⇒ Object
Returns the value of attribute macrodefs.
-
#makefile ⇒ Object
Returns the value of attribute makefile.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = nil) {|_self| ... } ⇒ NmakeTask
constructor
A new instance of NmakeTask.
Methods inherited from TaskLib
Constructor Details
#initialize(name = nil) {|_self| ... } ⇒ NmakeTask
Returns a new instance of NmakeTask.
73 74 75 76 77 78 79 |
# File 'lib/leaves/vstudio.rb', line 73 def initialize(name = nil) @name = name @makefile = "Makefile.msvc" yield self if block_given? define end |
Instance Attribute Details
#macrodefs ⇒ Object
Returns the value of attribute macrodefs.
70 71 72 |
# File 'lib/leaves/vstudio.rb', line 70 def macrodefs @macrodefs end |
#makefile ⇒ Object
Returns the value of attribute makefile.
69 70 71 |
# File 'lib/leaves/vstudio.rb', line 69 def makefile @makefile end |
#target ⇒ Object
Returns the value of attribute target.
71 72 73 |
# File 'lib/leaves/vstudio.rb', line 71 def target @target end |
Instance Method Details
#define ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/leaves/vstudio.rb', line 81 def define desc "Build using Microsoft Program Maintenance Utility (NMAKE.EXE)." task upaste("build", @name) => [upaste("compile", @name)] task upaste("compile", @name) do cmd = "nmake /f \"#{@makefile}\"" cmd << " #{@macrodefs}" if @macrodefs cmd << " #{@target}" if @target cmd << " 2>&1" sh cmd end task upaste("clean", @name) do sh "nmake /f \"#{@makefile}\" clean 2>&1" end self end |